Click here to Skip to main content
15,893,190 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

In my app., I have used LINQ to Sql classes. Database is remotely located. When I am running app, it runs fine in localhost and but when I am uploading app on server then it gives me below error:

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)


all things are running fine in localhost and can successfully connect with the sql server but after hosting gives me above error.

Thanks for help.
Posted
Comments
Bh@gyesh 20-Jun-14 2:57am    
Where you are hosting your application? i.e. you need to change connection string in web.config file. Can you please provide more information abt SQL connection?

1 solution

Enable named pipes from sql server configuration manager in the server.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900