Last post Oct 27, 2006 02:18 PM by nberardi
Oct 26, 2006 01:31 PM|wyx2000|LINK
I need the module to handle webdav call, but since it is just http call, I think it is a general question about how to authenticate user.
If I create webdav folder on IIS, I can turn on basic authentication or window integrated authentication.
But my webdav is a virtual one, I use a httpmodule to handle user request. So I need handle the authentication too.
My question is how to create a httpmodule to capture the basic authentication or window integrated authentication request from client side ( most likely the request will come from "Microsoft Data Access Internet Publishing Provider DAV or "Microsoft-WebDAV-MiniRedir/5.1.2600")
Oct 27, 2006 09:56 AM|nberardi|LINK
public class PortalModule : IHttpModule
#region IHttpModule Members
/// <summary>Initializes a module and prepares it to handle requests.</summary>
/// <param name="application">An <see cref="System.Web.HttpApplication"/> that provides access to the methods, properties, and events common to all application objects within an ASP.NET application.</param>
public void Init (HttpApplication application)
application.AuthorizeRequest += new EventHandler(Application_AuthorizeRequest);
/// <summary>Disposes of the resources (other than memory) used by the module that implements <b>IHttpModule</b>.</summary>
/// <remarks><b>Dispose</b> performs any final cleanup work prior to removal of the module from the execution pipeline.</remarks>
public void Dispose ()
private void Application_AuthorizeRequest(object sender, EventArgs e)
HttpContext Context = ((HttpApplication)sender).Context;
IPrincipal myUser = Context.User;
// use the myUser object to figure out if they are authenticted
Oct 27, 2006 02:14 PM|wyx2000|LINK
That is a normal webpage autorization. I am working on a webdav. When you turn on webdav on your site, you can choose "basic authentication" or "integrated window authentication". When user connect the folder, a window will show to ask for username and
password, just like when you login to window. I want to handle those.
Oct 27, 2006 02:18 PM|nberardi|LINK