Windows authentication with ability to override

R

Ryan

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
 
D

Dominick Baier

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
 
R

Ryan

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
 
M

Michael D'Angelo

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top