Troubles with Security Model - Advice Needed Please
From: Joe (Joe_at_Joe.com)
Date: 03/18/04
- Next message: r song: "Re: Role-based authentication"
- Previous message: Jibey Jacob: "IIS not functioning"
- Next in thread: Michał Januszczyk: "RE: Troubles with Security Model - Advice Needed Please"
- Reply: Michał Januszczyk: "RE: Troubles with Security Model - Advice Needed Please"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 17 Mar 2004 16:12:19 -0700
I'm having trouble with my security model, and I was hoping I could find some help.
My ASP.NET app (that uses RS) is going to be running in an intranet environment. So, to develop and test it, I have installed everything locally (i.e., IIS, RS, SQL Server, VS .NET 2003) on my Win2k Server.
In IIS, I have disabled anonymous access so that only Integrated Windows authentication is used. Then in my Web.config file I've set it up to use Windows authentication, as such:
<appSettings>
<add key="connectionString" value="database=DatabaseName;Integrated Security=SSPI;server=localhost;Trusted_Connection=true" />
</appSettings>
<system.web>
<authentication mode="Windows" />
<authorization>
<deny users="?" />
</authorization>
<identity impersonate="true" />
</system.web>
When I try to access a database (installed on localhost), I get the following error:
System.Data.SqlClient.SqlException: Cannot open database requested in login 'DatabaseName'. Login fails. Login failed for user 'MACHINENAME\ASPNET'.
It's as if it is using the default ASP.NET worker process account (which is not what I want). I need it to authenticate me as my logged in user (which has access to the database).
One more piece of info., if I check the user identity by calling HttpContext.Current.User.Identity.Name, it is correct.
So, my questions are: what am I doing wrong? how do I set up IIS, Web.config, database connection, etc. so that everything is properly authenticated to the logged in user?
Thanks in advance for your help.
- Next message: r song: "Re: Role-based authentication"
- Previous message: Jibey Jacob: "IIS not functioning"
- Next in thread: Michał Januszczyk: "RE: Troubles with Security Model - Advice Needed Please"
- Reply: Michał Januszczyk: "RE: Troubles with Security Model - Advice Needed Please"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|