Re: ADO SQLConnection works only in Windows, but not in WEB
- From: "Chris Mullins" <cmullins@xxxxxxxxx>
- Date: Tue, 10 Oct 2006 19:44:15 -0700
The ASP.Net application is running as user "'YOUR-136F2019DC\ASPNET'
When you run the code in a web app, it's running as,
"YOUR-136F2019DC\doruroman".
Guess which of these uses has access to the SQL Server database?
Your options are:
1 - Grant your ASPNET user access to the database
2 - Run ASP.Net as a different user. Grant that user access to the database.
3 - Use SQL Authentication rather than Integreated Security.
(user=sqluser;password=nopassword)
Much more info can be found at:
http://msdn2.microsoft.com/en-us/library/ht43wsex.aspx
--
Chris Mullins, MCSD.NET, MCPD:Enterprise
http://www.coversant.net/blogs/cmullins
"Dan Aldean" <doruroman@xxxxxxxxxx> wrote in message
news:OdYlH1N7GHA.200@xxxxxxxxxxxxxxxxxxxxxxx
Hi,
I use the same connection string in a Windows and then in a WEB
application to connect to SQL Server.
When I try it in the WEB it doesn't work,
private SqlConnection conTest = new SqlConnection(@"data
source=YOUR-136A4423DC\localhost;initial catalog=TestDB;integrated
security=SSPI;persist security info=False;workstation
id=YOUR-136A4423DC;packet size=4096");
conTest.Open();
the error on open is:
Login failed for user 'YOUR-136F2019DC\ASPNET'.
what is different and raises the error?
Thanks
.
- Follow-Ups:
- Re: ADO SQLConnection works only in Windows, but not in WEB
- From: Dan Aldean
- Re: ADO SQLConnection works only in Windows, but not in WEB
- References:
- ADO SQLConnection works only in Windows, but not in WEB
- From: Dan Aldean
- ADO SQLConnection works only in Windows, but not in WEB
- Prev by Date: Why can't I add these modules?
- Next by Date: Re: Why can't I add these modules?
- Previous by thread: ADO SQLConnection works only in Windows, but not in WEB
- Next by thread: Re: ADO SQLConnection works only in Windows, but not in WEB
- Index(es):
Relevant Pages
|