Click here to Skip to main content
15,906,816 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I used LINQ to insert,update data to database(Sql server),
it is working fien with our local server,but as i deployed it to client server....it stopd working.....
it give me an 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)'
as soon as i change to our traditional add/edit(sqlcommand)...it works fine....but i could not find what`s the problem???

plz reply,if anyone have any idea about it....bcoz i used it almost everywhere to add/edit data to database

Thanks in advance,
Sunita
Posted

Ok, I am not C# guru. :D depending on error I can say that you should check SQL server configuration.
 
Share this answer
 
i checked SQL configuration.......its the same n my issue is why it is giving error now.........erlier it was working fine..why??????
 
Share this answer
 
try to verify if you sql server accept remote machine or tcpip connection (from sql mconfiguration manager)? :)
 
Share this answer
 
Did you verify that the connection string is correct? It sounds like the connection string may not be appropriate for their server, or their server is configured incorrectly.
 
Share this answer
 
v3

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