Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

The connection name 'LocalSqlServer' was not found in the applications configuration

Vote:
 

Hi,

I creted new project and changed configuration (changed IIS Express to IIS; local db to SQL SErver 2014).

I gets next error after I have entered domain credentials.

Error after enter credentials

I also updated EPiServer to the latest version.

Could you please help me to solve this error?

Thanks for any help

#123259
Jun 30, 2015 12:21
Vote:
 

Hi, are you sure the connection string name is LocalSqlServer?

In a standard EPiServer installation I think the name of the connectionString is EPiServerDB:

<connectionStrings>
   <add name="EPiServerDB" connectionString="the connection string" providerName=System.Data.SqlClient" />
</connectionStrings>
#123260
Edited, Jun 30, 2015 12:36
Vote:
 

Connection string name in my application is EPiServerDB. 

I don't know the reason but application tryinng to use data from machine.config

#123262
Jun 30, 2015 12:47
Vote:
 

Solution:

Add <clear /> before DefaultProfileProvider

    <profile defaultProvider="DefaultProfileProvider">      
      <providers>
        <clear />
        <add name="DefaultProfileProvider" type="System.Web.Providers.DefaultProfileProvider, System.Web.Providers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="EPiServerDB" applicationName="/" />
      </providers>
    </profile>

Thanks

#123264
Jun 30, 2015 13:03
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.