I have successfully used connection strings in the web.config <appSettings> of a C#, ASP.NET file.
However, I am trying to create a new connection to a named instance of SQL Server 2005 and I am receiving the error when I try to run it through the browser:
SQL 2005 instance connection string in web.config System.Data.SqlClient.SqlException: SQL Server does not exist or access denied.
This is my appSettings code:<add key="conn" value="server=serverName\SQLNamedInstance;UID='sa';PWD='password';database=databaseName"/>
I have ensured that the box that this SQL server is on has the SQL Server Browser enabled.I have verified that the UID and pwd are valid through Query Analyzer.I have tried using the IP address and port number instead of the server and sqlserver instance name and that did not work-but I do not really know if I had the syntax correct.
At this point, I'm not sure if it's an issue with SQL2005 or if it's due to using a named instance of sql.
I would really appreciate any advice. Thanks.