"sqlnerd" <ma*********@hotmail.com> wrote in message
news:4f**************************@posting.google.c om...
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.Get PooledConnection(SqlConnec
tionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at WebService2.Service1.GetPass(String name) in
c:\inetpub\wwwroot\webservice2\service1.asmx.cs:li ne 65
Using windows authentication.
CONFUSED!!!!
Help pls!
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