IIS7 with vs2013 built-in LOCALDB using error hints: Network-related or instance-specific errors when establishing a connection to SQL Server. The server was not found or could not be accessed. Verify that the instance name is correct, and that SQL Server is configured to allow remote connections. (Provider:sql Network Interfaces, error:50-a Local Database Runtime error has occurred.) Cannot create an automatic instance. See the Windows Application event log for error details. )
Debug run in VS is normal, put in IIS in the case of request database failure;
Workaround:
Find the application pool for the corresponding website, and find the mark selection in the Advanced settings as LocalSystem .
Unfortunately, at the moment, according to the information I have queried, LocalDB was not designed to work with IIS, only in the development environment, and not in the production environment (IIS).
IIS7 with vs2013 built-in LocalDB