Groups | Blog | Home
all groups > sql server (alternate) > april 2004 >

sql server (alternate) : SQL Web Services


mattscott45 NO[at]SPAM hotmail.com
4/28/2004 6:12:42 AM
I Need help with accessing an SQL server from a web method.

Trying to connect from localhost to ms sql server 2000 sp1 and get the
error:
System.Data.SqlClient.SqlException: SQL Server does not exist or
access denied.
at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&
isInTransaction)
at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString
options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at WebService2.Service1.GetPass(String name) in
c:\inetpub\wwwroot\webservice2\service1.asmx.cs:line 65

Using windows authentication.
CONFUSED!!!!
Simon Hayes
4/28/2004 7:15:15 PM

[quoted text, click to view]
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnec
tionString
[quoted text, click to view]

It's not clear from your post if the web service and MSSQL are on the same
server or not, but you can check the MSSQL error log to see if there is a
failed login from your web service account (assuming you have enabled this
logging). If so, then the problem is probably that the web service account
has not been granted login rights in MSSQL, or perhaps that the password is
incorrect. If there is no failed login attempt in the log, then you should
look at name resolution, and if the web service is connecting with the
correct protocol and/or to the correct port. You can use osql.exe to check
basic connectivity.

Simon

AddThis Social Bookmark Button