Hi Scott,
I learned you ran the same connection code (and connection string) on the
same client machine to connect to a SQL Server 2000 database via a
firewall. The WinForm application works fine, but the ASP.Net application
throws an error.
This problem is strange. Please make sure the server name is correct and
the user account used in the connection string is listed in the SQL Server
logins list.
In Query Analyzer, you can use the following sql statements to check the
logins list on the destination server.
Use master
Select * from syslogins
Please help collect the following information so that I can narrow down
this problem.
1. Please try to create a sample connection web project using the
connection string directly without variables. Please make sure the server
name and user account/password is correct. Did the same problem persist?
2. How did you configure the alias? Did you use named pipes? If so, Please
configure a TCP/IP alias and forcing the connection string to use TCP/IP.
To do this, add the following attribute to the connection string:
"Network Library =dbmssocn"
What's the result?
3. If it is possible, please try the standard SQL client tools, such as
Query Analyzer, connecting to the SQL Server via firewall using the same
sql account. Did the same problem occur again?
I also found the following articles for your reference.
315159 BUG: Named Pipes Do Not Work When Worker Process Runs Under ASPNET
http://support.microsoft.com/?id=315159 328306 INF: Potential Causes of the "SQL Server Does Not Exist or Access
http://support.microsoft.com/?id=328306 I am looking forward to hearing from you soon.
Regards,
Michael Shao
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security This posting is provided "as is" with no warranties and confers no rights.