I am trying to connect my asp.net web application with sql server but i am getting this error every time
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: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server)
My SQL Server is also configured and allows remote connections and is running as well in the configuration Manager. Visual Studio throws an error of unrecognized symbol due to '\' in my server name (.\SQLExpress
). I tried using different names of server like
server=DESKTOP-1MQQSA7\SQLExpress
server =.
server=SQLEXPRESS
Sql server running server name
Visual Studio showing the database name = desktop-1mqqsa7\sqlexpress