SQL Network Interfaces, error: 50##
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.
This error happens when you add/install OWIN to your Asp.NET MVC web application. The first idea is that there must be something wrong with MSSQL server or TCP/IP, ports, firewall... you name it. DO NOT CHANGE ANYTHING! If it worked ok and other webprojects are working ok then there is no problem with MSSQL server neither TCP/IP.
Visual Studio 2015 > Clean Solution on the Solution didn´t help. You have to use
Open folder in File Explorer and go to
/bin and delete everything. Then, just to be sure, go to
/obj and delete
/Release too. Magic happens and the site works.
- you can connect ot the server with the Management Studio using Windows Authentication
- other websites or projects work with the same MSSQL server
- TCP/IP port is open
- a connection string in web.config hasn´t been changed
- no changes on firewall