G
Guest
Hi all
I have an ASP.NET application accessing a SQL named instance that runs o
the web server. To allow easy deployment from the development environment t
production, a SQL alias "My_Alias" has been set up using the Client Networ
Utility. The alias is configured to use a Named Pipes connection pointing t
the named instance. Both EM and isqlw recognise My_Alias
The application attempts to connect as follows
<snip
Dim myConnection As SqlConnection = Ne
SqlConnection(ConfigurationSettings.AppSettings("MyConnectionString")
</snip
where the connection string is defined in Web.config
<snip><add key="MyConnectionString
value="Server=My_Alias;Trusted_Connection=true;database=MyDatabase" /></snip
This fails with error "System.Data.SqlClient.SqlException: SQL Server doe
not exist or access denied
If I replace "My_Alias" in the connection string with the instance nam
"MyServer\MyInstance" all is well. Why is it failing with the alias? I hav
tried an alias name without an underscore, and also tried explicitly settin
the network library to named pipes in the connection string. Have also foun
that My_Alias will work if I configure it for a TCPIP connection... but
want the efficiency of named pipes because client and server are the sam
machine
Microsoft .NET Framework Version:1.0.3705.0; ASP.NET Version:1.0.3705.
Windows 2000 Server SP
SQL 2000 Standard SP
I have an ASP.NET application accessing a SQL named instance that runs o
the web server. To allow easy deployment from the development environment t
production, a SQL alias "My_Alias" has been set up using the Client Networ
Utility. The alias is configured to use a Named Pipes connection pointing t
the named instance. Both EM and isqlw recognise My_Alias
The application attempts to connect as follows
<snip
Dim myConnection As SqlConnection = Ne
SqlConnection(ConfigurationSettings.AppSettings("MyConnectionString")
</snip
where the connection string is defined in Web.config
<snip><add key="MyConnectionString
value="Server=My_Alias;Trusted_Connection=true;database=MyDatabase" /></snip
This fails with error "System.Data.SqlClient.SqlException: SQL Server doe
not exist or access denied
If I replace "My_Alias" in the connection string with the instance nam
"MyServer\MyInstance" all is well. Why is it failing with the alias? I hav
tried an alias name without an underscore, and also tried explicitly settin
the network library to named pipes in the connection string. Have also foun
that My_Alias will work if I configure it for a TCPIP connection... but
want the efficiency of named pipes because client and server are the sam
machine
Microsoft .NET Framework Version:1.0.3705.0; ASP.NET Version:1.0.3705.
Windows 2000 Server SP
SQL 2000 Standard SP