error: 50 – Local Database Runtime error occurred.

SQL Server 2012 Express

SQL Server 2012 Express

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50 – Local Database Runtime error occurred. Cannot create an automatic instance. See the Windows Application event log for error details.

If you google the error you will find many articles claiming solution.
One of them is the following which is closest to final resolution of this problem.
Windows 7 SP1 causes IntelliTrace Collection to fail on IIS

The only thing that you should change is the IdentityType.
Meaning they suggest that you edit applicationHost.config file found in %windir%\system32\inetsrv\config\ specifically the ApplicationPools section.

<add name="ASP.NET v4.0" managedRuntimeVersion="v4.0">
   <processModel identityType="ApplicationPoolIdentity" loadUserProfile="true" setProfileEnvironment="true" />

It may work for someone but it didn’t for me. Then i had to play around with these settings. Finally when i changed the IdentityType to NetworkService i was able to use My newly created database (SQL Server 2012 express – localDB)


<add name="ASP.NET v4.0" managedRuntimeVersion="v4.0">
   <processModel identityType="NetworkService" loadUserProfile="true" setProfileEnvironment="true" />

Hope this helps someone

5 thoughts on “error: 50 – Local Database Runtime error occurred.

  1. Hi,
    Try the following link

    This could also happen when there are multiple versions of local db are installed, and system try to connects to the first version installed, though it has been upgraded.

    So use the default name.

  2. I also spent about two days trying to track down this error. Amongst the standard replies I found (most of them erroneous, incomplete, and misleading was this Gem…

    Once quick fix and the problem was solved. Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *