The LoginBox custom control

The loginbox custom control can be added to a page to enable ASP.Net Forms authenticaton on a template page. This will redirect to a QueryString Redirect as passed to the page.

The following location security should be added to the Web.Config

<location path="Secure">
    <system.web>
      <authorization>
        <allow roles="Members"/>
        <deny users="*" />
      </authorization>
    </system.web>


And URL Rewrite rules for all pages added under the Membership folder:

   <add name="Rewrite3" virtualUrl="^~/Members/(.*).aspx$" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/Secure/Secure.aspx?Page=$1" ignoreCase="true"/>
      <add name="Rewrite4" virtualUrl="^~/Members/(.*).aspx(.*)$" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/Secure/Secure.aspx?Page=$1&amp;$2" ignoreCase="true"/>   
 
Members need to be added by the Site Settings Users Screen and can be bulk imported.