Re: IIS With Basic Authentication Set/FormsAuthentication - HELP PLS!?

From: Ken Schaefer (
Date: 09/04/05

  • Next message: David Wang [Msft]: "Re: IIS With Basic Authentication Set/FormsAuthentication - HELP PLS!?"
    Date: Sun, 4 Sep 2005 22:49:32 +1000

    When IIS "protects" things, it is using mechanisms that are built into the
    HTTP specification. Since all requests to the server involve HTTP in some
    way, this is how you get all your resources (images, documents, ASP.NET
    pages etc) protected.

    On the other hand, currently, only requests for resources mapped to the
    ASP.NET ISAPI filter can take advantage of functionality built into the .NET
    Framework (forms based authentication). So this means that images etc that
    are handled by the static file handler are not protected.

    This will change in IIS7, where there will be a single, unified event
    pipeline, and you can hook into this pipeline using managed code (i.e. the
    forms authentication HTTP module supplied with .NET).


    IIS Blog:
    "Chad Beckner" <> wrote in message 
    :  So, in effect, how does that protect files in a directory (.gif, .htm,
    : etc)?  That, to me, doesn't seem to provide "true"security of an area, 
    : IIS does...  Does anyone know if this has changed in 2.0?
    :  For now, I guess I can keep using the ISAPI filter that I built... Unless
    : anyone else has a better solution.  However, I am disappointed that I 
    : set up this kind of security in .NET/FormsAuthentication like I can with 
    : Basic.  I want to protect ALL files (and not have everything be processed
    : through the isapi_aspnet dll) in a particular area and have them
    : authenticate before accessing it, but without a "windows logon" prompt.
    : Thanks for the help,
    : Chad
    : "Sam Santiago" <> wrote in message
    : news:Oi0PhrNsFHA.2008@TK2MSFTNGP10.phx.gbl...
    : When you use Forms authentication you have to set IIS to Anonymous
    : authentication.  Check out this article for a discussion on the 
    : between ASP.NET authentication and IIS authentication:
    : If you think you can customize ASP.NET to use forms with Basis
    : Authentication you'll probably have to write an HTTP Module.  Check out 
    : article for a discussion on Modules and Handlers:
    : Good luck.
    : -- 
    : _______________________________
    : Sam Santiago
    : _______________________________
    : "Chad Beckner" <> wrote in message
    : news:uQIFS58rFHA.3352@TK2MSFTNGP14.phx.gbl...
    : > Hi everyone,
    : >
    : >  First off, sorry for the cross-post...
    : >
    : >  I am developing a site (ASP.NET) in which the root will be set with
    : > Anonymous AND/OR Basic permissions.  Past that I will have an 
    : > (directory) in which I will be developing applications, which will have
    : > IIS
    : > Basic Authentication set (this can't be avoided).  In the past, I have
    : > been
    : > able to use a ISAPI Filter to add the response headers dynamically, and
    : > add
    : > the authentication to the request, therefore, allowing users into the
    : > secure
    : > directory, and all of this is form based, there is no browser prompt for
    : > their username/password (and it adds it to every request, images, .htm
    : > files, .asp files, etc).  Now I am trying to do this with ASP.NET (VB),
    : > again, trying to avoid the browser prompt, and add the authentication to
    : > every request (again, images, .htm files, aspx files, etc).  However, I
    : > have
    : > been unsuccessful using FormsAuthentication with the directory set to 
    : > Basic Authentication (since IIS sees the request first, I get a browser
    : > prompt. I want to replace this with a redirect to a login form).  I have
    : > been able to get the FormsAuthentication to set the cookie, but when it
    : > tries to go into the Basic secured directory, I get a browser prompt. 
    : > help would be greatly appreciated!! (Do I need to write another ISAPI
    : > Filter, can I use FormsAuthentication to do this??  Suggestions?)
    : >
    : >  I have looked at hundreds of articles (or at least it seems!), and am 
    : > 100% how to write an ISAPI filter in .NET, if that needs to be done. 
    : > pointers to live artices, code, etc. would be very helpful.
    : >
    : >  Overall, basically, I want to use Basic Authentication protocol and
    : > FormsAuthentication to access an IIS-set Basic Authentication directory,
    : > but
    : > I want to use a form instead of the normal windows logon prompt.  Our
    : > users
    : > share computers, so having them being able to "save their password" is a
    : > major security concern, which is why I need a login form page.
    : >
    : > Thanks!
    : >
    : > Chad
    : >
    : >

  • Next message: David Wang [Msft]: "Re: IIS With Basic Authentication Set/FormsAuthentication - HELP PLS!?"