Click here to Skip to main content
14,333,637 members
Rate this:
Please Sign up or sign in to vote.
See more: , +
I am Getting this one 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)

the website runs perfectly but whenever i click on add to cart option on my website then it shows the error,plz plz solve anyone...........
Posted
Comments
Gunjan Bhasin 11-Feb-13 0:48am
   
check your connection string.
garimagupta66 11-Feb-13 1:14am
   
i have checked the connection string ,the entire pages runs fine but error is when i m click on add to cart option.....
Rate this:
Please Sign up or sign in to vote.

Solution 3

Check the three points listed below:
1. Make sure your database engine is configured to accept remote connections(I you are using centralized database)
Quote:
•Start -> All Programs -> SQL Server 2005 -> Configuration Tools -> SQL Server Surface Area Configuration
•Click on Surface Area Configuration for Services and Connections
•Select the instance that is having a problem -> Database Engine -> Remote Connections
•Enable local and remote connections
•Restart instance

2. Check the SQL Server service account
Quote:
•If you are not using a domain account as a service account (for example if you are using NETWORK SERVICE), you may want to switch this first before proceeding

3.If you are using a named SQL Server instance, make sure you are using that instance name in your connection strings in your ASweb P.NET application
Quote:
•Usually the format needed to specify the database server is machinename\instancename
•Check your connection string as well.

Refer the link below:
A network-related or instance-specific error occurred while establishing a connection to SQL Server[^]


--Amit
   
Comments
garimagupta66 11-Feb-13 1:54am
   
Thanx amit but need to know i will do this on Local database or where the server is host????????
_Amy 11-Feb-13 1:55am
   
This should be performed on the server. Because your server is unable to connect SQL Database Engine. :)
garimagupta66 11-Feb-13 2:19am
   
Thanx
_Amy 11-Feb-13 2:20am
   
Welcome. :)
Rate this:
Please Sign up or sign in to vote.

Solution 1

The reasons for throwing this issue could be wrong server name, disabled remote connection and firewall blocking.

Please go through this link[^].

Update:

http://technet.microsoft.com/en-us/library/cc739791%28v=ws.10%29.aspx#BKMK_4[^]

http://msdn.microsoft.com/en-us/library/cc646023.aspx[^]
   
v3
Comments
garimagupta66 11-Feb-13 1:13am
   
so how can i able remote connection and firewall block?????plz plz ans me.......
garimagupta66 11-Feb-13 1:51am
   
Thanx for this ans but actually need to know this will be i do on Local Database or on server.
Rate this:
Please Sign up or sign in to vote.

Solution 2

so how can i able remote connection and firewall block?????plz plz ans me.......
   
Rate this:
Please Sign up or sign in to vote.

Solution 4

Actually i need to know this problem is on my end or where the database is host.our database is host on Znet Live and they said this is our end problem mean a programming error so plz plz tell me wheree this changes i do it in my Local PC or this will be do by the Support..........
   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100