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


I have hosted web applicatio to our production server.
then tried to connect application to the SQL server 2005 database.

application get connected if firewall is disabled.
but it could not connected if firewall is enabled, It gives error message as below:

"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)"


My connection string in web.config file is:
<add key="connectionString" value="uid=username;pwd=Password;Database=Databasename;Server=Servername\Databasename;Persist Security Info=true;"/>

please advise me.
appreciate your help...
Posted
Updated 1-Aug-12 5:43am
v3
Comments
[no name] 1-Aug-12 12:06pm    
The obvious thing to do would be to have your IT guy configure the firewall to allow the connection...

Hi,
Add exception for "sqlservr.exe" and "sqlbrowser.exe" in your firewall

Path in SQL Server 2005 :
C:\Program Files\Microsoft SQL Server\90\Shared\sqlbrowser.exe
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn \sqlservr.exe
 
Share this answer
 
hi,

Check ur sql 2005 port enabled for using thro' ur application
 
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