Project Description
ASP.NET implementation of HTTP authentication (basic scheme only).

Getting started

1. Download and add a reference to HttpAuthentication.dll or install the NuGet package

2. Configure the HttpModule in web.config (you can skip this if you installed the NuGet package):

<configuration>
  <system.web>
    <httpModules>
      <add name="HttpAuthentication" 
           type="HttpAuthentication.HttpAuthenticationModule, HttpAuthentication" />
    </httpModules>
  </system.web>
</configuration>
IIS requires a different configuration, see the section 'Running on IIS' below.

3. Add some credentials to the web.config file:

<configuration>
  <system.web>
    <authentication>
      <forms>
        <credentials passwordFormat="SHA1">
          <user name="Foo" password="e496fd20136d4bb7828ebb0ab925b1bd977208e4" />
        </credentials>
      </forms>
    </authentication>
  </system.web>
</configuration>
This is the same section that is used for Forms authentication, but notice that we have not enabled Forms authentication.

You don't have to configure the module after it's added to web.config for it to work. The module is enabled by default and uses the Basic scheme.

Next steps

Go to Documentation to learn more.

--

Last edited Jun 1, 2012 at 7:40 PM by michielvoo, version 88