Hello,
When you run the function as a vb.net app, you are accessing the db as
your own windows user (which probably have access to the database).
When the web service is trying to access the database, it uses the
user 'NT AUTHORITY/NETWORK SERVICE'.
You should create a new user in the sql server that has access to
database and specify this user in the connectionstring when creating
the sqlconnection object, like specified in:
(
http://msdn.microsoft.com/library/de...sopentopic.asp)
Best regards,
Knut-Olav Traa
knut-olav.traa [AT] bekk.no
"Altman" <> wrote in message news:<>...
> I am a newbie to both SQL Server and webservices. I have mostly done
> programing in Foxpro, VB6, and a little C++, and VB.net. I have been able
> to make a simple webservice work but now I am trying to go one step further
> and return XML string of a table. I am trying to return the Customer table
> of the northwind database. I am creating the webservice on a XP machine and
> loading it to a Win 2003 server. The error I am getting is Login failed for
> user 'NT AUTHORITY/NETWORK SERVICE'. This is my function
....
>
> If I do the same function in a vb.net app it works, what am I doing wrong?