title: How to deploy ASP.NET MVC 4 application using localDB to local IIS on Windows 7?
body: <p>When I try to run my ASP.NET MVC 4 application using Local IIS on Windows 7 with Visual Studio 2013. I run into the following error when the application tries to connect to localDB\v11.0</p>
  
  <blockquote>
    <p>Server Error in '/' Application.</p>
    
    <p>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. )</p>
    
    <p>The 2 event logs are</p>
    
    <p>Unexpected error occurred while trying to access the LocalDB instance
    registry configuration. See the Windows Application event log for
    error details.</p>
    
    <p>and</p>
    
    <p>Cannot get a local application data path. Most probably a user profile
    is not loaded. If LocalDB is executed under IIS, make sure that
    profile loading is enabled for the current user.</p>
  </blockquote>
  
  <p>Most solutions I found online references this post: <a href="http://blogs.msdn.com/b/sqlexpress/archive/2011/12/09/using-localdb-with-full-iis-part-1-user-profile.aspx">http://blogs.msdn.com/b/sqlexpress/archive/2011/12/09/using-localdb-with-full-iis-part-1-user-profile.aspx</a></p>
  
  <p>The only difference I see between the described situation and my situation is that the described error code is 0 whereas my error code is 50. However, the proposed solution does not work for me.</p>
  
  <p>I cannot get past this error even if I set modify setProfileEnvironment to true and I've spent hours of time playing around with different processModel parameters and application pools.</p>