SQL Server Local DB cannot be accessed after publishing to the server side

Source: Internet
Author: User
Project background

Windows-certified Web application, LocalDB created through Visual Studio 2013 is located in the App_Data directory

Phenomenon

There is no problem with local debugging. After publishing to the server (Windows server 2008R2, IIS7.5), the browser access throws an exception a network-related or instance-specific error occurred while Establi Shing a connection to SQL Server. The server was not found or is not accessible. Verify 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.

Reason

LocalDB is running based on user mode, and IIS uses the service account by default, thus losing access to LocalDB.

Solutions

Open the corresponding Web application pool properties in IIS, set the identity to a specific domain user, and set the value of load user profile to True to restore the program to normal operation

SQL Server Local DB cannot be accessed after publishing to the server side

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.