PDA

Click to See Complete Forum and Search --> : Web Service & SQL Server Authentication


tHeFaRo
Aug 22nd, 2003, 05:26 AM
Hi there

I have this weird problem. I created a Web Service that extracts data from the SQL Server and then return it as a XML document.

The problem is when the Web Service gets to the code to open the Connection to the server it gives this error.

System.Data.SqlClient.SqlException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.


Now my Win32 application works just fine, using the same code. Thus I believe the problem might be the settings of IIS.

But unfortunately I don't even know where to start looking.

Some help would really be appreciated.

Thanx in advance

Lethal
Aug 22nd, 2003, 03:41 PM
If you are trying to open a connection via sql server authentication (note: not windows), you need to grant access to that account in your db. If you are using windows authentication, you need to grant access to the asp.net account.

J Staniforth
Sep 2nd, 2003, 05:46 AM
Sorry misread