Windows authentication with ability to override

Discussion in 'ASP .Net Security' started by Ryan, Jul 30, 2006.

  1. Ryan

    Ryan Guest

    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
    Ryan, Jul 30, 2006
    #1
    1. Advertising

  2. 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

    > 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
    Dominick Baier, Jul 30, 2006
    #2
    1. Advertising

  3. Ryan

    Ryan Guest

    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



    Dominick Baier wrote:
    > 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
    >
    > > 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
    Ryan, Jul 30, 2006
    #3
  4. 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.

    "Ryan" <> wrote in message
    news:...
    > 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
    >
    >
    >
    > Dominick Baier wrote:
    >> 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
    >>
    >> > 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

    >
    Michael D'Angelo, Aug 1, 2006
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U2NhcmVjcm93?=

    Do asp.net have ability to access client CDRW/DVDRW?

    =?Utf-8?B?U2NhcmVjcm93?=, Jan 28, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    312
    Hermit Dave
    Jan 28, 2004
  2. Les Caudle
    Replies:
    0
    Views:
    601
    Les Caudle
    Mar 7, 2004
  3. Eric Caron

    Lost ability to debug projects

    Eric Caron, Jun 17, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    332
    Eric Caron
    Jun 17, 2005
  4. Bob Maxie
    Replies:
    5
    Views:
    432
    Bob Maxie
    Sep 24, 2005
  5. Replies:
    2
    Views:
    1,077
    Stefan Schulz
    Aug 18, 2005
Loading...

Share This Page