all groups > asp.net security > july 2006 >
You're in the

asp.net security

group:

Windows authentication with ability to override


Windows authentication with ability to override Ryan
7/30/2006 2:53:16 PM
asp.net security: Hello everybody, here is my question:

We are using windows authentication and an Active Directory membership
provider so our users don't have to login to the site. This works
great, but now we need the ability to login as another user. I have
tried simply adding a login control to a test page; the user is
authenticated, but the identity never changes. I am assuming this is by
design, but I am probably missing something simple. Is there a way to
accomplish this? We could use forms authentication, but I believe the
user would have to login to the site . . .

I hope this is the appropriate group to post to; I am new to this 2.0
stuff . . .

Thanks for any help you can offer.

Have a nice day,
Ryan
Re: Windows authentication with ability to override Ryan
7/30/2006 3:42:26 PM
Hello, thanks for replying so quickly.

The identity I am expecting to change is:

HttpContext.Current.User.Identity.Name

I could be confused, a co-worker of mine wrote the web.config, so i was
guessing as to the authentication being magically tied to the
membership node (<membership
defaultProvider="MembershipADProvider"><providers><add
name="MembershipADProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider,
System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="ADConnectionString"
connectionUsername="lookupuser" connectionPassword="lookuppassword"
enableSearchMethods="true"
attributeMapUsername="sAMAccountName"/></providers></membership>) and
no, we don't have to login unless using mozilla-based browsers.

hmmm, I just tested and the membership node doesn't seem to do anything
(still authenticates if removed). I see, the authentication used with
the IIS anonymous off is what does the trick.

Okay, I want to make sure I have this correct. If we would like the
users to not have to manually login, we have to use windows
authentication. If we want the users to be able to login as a user that
is not logged into their computer, we have to use forms or none . . .

I think this article describes a solution:
http://www.15seconds.com/issue/050203.htm

Thanks again,
Ryan



[quoted text, click to view]
Re: Windows authentication with ability to override Dominick Baier
7/30/2006 10:08:05 PM
Hi,

which identity never changes??

btw - you cannot use Windows auth *and* AD membership - i guess you are using
Windows auth when you user don't have to login.

dominick

[quoted text, click to view]

Re: Windows authentication with ability to override Michael D'Angelo
8/1/2006 9:34:26 AM
You can either have them auto-logon, or prompt for logon and allow them to
use either the account they logged in with or another one. You can't do
both.

[quoted text, click to view]

AddThis Social Bookmark Button