ASP.NET and custom ISAPI filter authentication

Discussion in 'ASP .Net' started by Michael Shutt, Jun 26, 2003.

  1. We have an existing ISAPI filter that performs authentication for all pages
    on our web site, including pages we are now writing for ASP.NET. The filter
    is pretty basic, receiving the user name and password in clear text and
    checking them against a database of users. The filter has been in use for
    some time with classic ASP pages.

    From classic ASP pages, the application can retrieve the login name that the
    user entered from Request.ServerVariables("AUTH_USER"), which I assume
    simply parses the http Authorization header. The account used by the
    authentication filter for impersonation can be retreived using
    Request.ServerVariables("LOGON_USER").

    The problem we are running into with ASP.NET is that no matter what
    authentication mode we set in the Web.Config file (Windows or None), we are
    having problems accessing the login name entered by the user.
    Request.ServerVariables("AUTH_USER") will always return blank, and
    IIdentity.Name will either be blank or will contain the name of the
    impersonation account.

    We were planning on writing our own implementation of the IPrincipal and
    IIdentity interfaces so that we can set the IIdentity.Name property
    correctly, but I am trying to figure which authorization mode is correct and
    how we should extract the login name entered by the user. I would prefer to
    not parse the http headers in our code just to extract the login name, but I
    can't find any other way to do it.

    Any suggestions?

    TIA

    MJS
    Michael Shutt, Jun 26, 2003
    #1
    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. Anonieko Ramos
    Replies:
    0
    Views:
    1,201
    Anonieko Ramos
    May 12, 2004
  2. Jon Maz
    Replies:
    2
    Views:
    4,578
    Jon Maz
    Sep 30, 2004
  3. Yet another C# coder

    ISAPI Filter in C# .NET 2.0

    Yet another C# coder, Oct 12, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    9,526
    Bruce Barker
    Oct 12, 2005
  4. Guest
    Replies:
    0
    Views:
    310
    Guest
    Sep 14, 2007
  5. Bill Belliveau

    Securing content via .NET ISAPI filter

    Bill Belliveau, Apr 27, 2005, in forum: ASP .Net Security
    Replies:
    0
    Views:
    112
    Bill Belliveau
    Apr 27, 2005
Loading...

Share This Page