Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am unable to connect sql server 2005 (remote) from windows server 2008 r2 IIS. I can connect this server from visual studio 2010 and local sql server with same connection string. IIS server failed to connect remote server. I couldn't understand, why?

Please help me!!!



I am using the following connection string in web config :
<add name="remote" connectionstring="Data Source=server_name\instance_name;Initial Catalog=db_name;Integrated Security=false;user id=user_id; password=123;" />


Facing this 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Posted
Updated 25-Nov-12 17:59pm
v2

1 solution

step 1: open cmd and ping your sql server. check if it is available.

step 2 : create a DSN file and try connecting to a DB . http://antigame.com/content/support/library/data/v76/help/windows%20dsn.aspx[^]

step 3 : if 1 passes and step 2 fails. enable TCP/IP and Namedpipe communication on server.

if step 1 fails --> bring the sql server on same LAN
 
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