|
-
May 3rd, 2005, 01:25 PM
#1
WebService cannot connect to a remote SQL Database.
I have an ASP.NET Web Service and I’m trying to connect to a database on a remote machine (MS SQL Server on 2003 Windows Server machine). I added a ASPNET account to Windows and to SQL Server but it doesn’t work and gives me an exception: “Server doesn’t exist or access denied”.
At the same time I can easily connect to this database from a regular C# application.
Please help!!!
-
May 4th, 2005, 12:34 PM
#2
Re: WebService cannot connect to a remote SQL Database.
Check your connect string. Remember that a [web]service doesn't run as a typical user account. Your normal app may work due to you being logged in and running the db connection off your credentials. For ASP.NET, it's typically the ASP.NET account or the NETWORK SERVICE, or possibly LOCALSYSTEM depending on your setup. Otherwise, use SQL Authentication.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|