locked
How to implement AppHarbor.Web.Security module into asp.net webforms application. RRS feed

  • Question

  • User816824226 posted

    Hello dev’s,

    I am developing asp.net4.5 web forms application. For that i have my own user’s data tables in my MSSQL DB and am using entity framework 4 for my DAL. Know i want to use AppHarbor.Web.Security module for my custom user authentication. But in there sample i did not find any webforms implementation.so can anyone help me to implement this module into asp.net webforms application.

    Friday, May 9, 2014 12:19 AM

Answers

  • User-1818759697 posted

    Hi,

    To use AppHarbor.Web.Security,  You simply need to add a reference to AppHarbor.Web.Security assembly (and bin-deploy it) and make these changes to your root Web.config

    file:

    In <system.webServer> section, add the following to the <modules> element:

    <add name="AppHarbor.Web.Security.CookieAuthenticationModule" 
         type="AppHarbor.Web.Security.CookieAuthenticationModule, AppHarbor.Web.Security"
         preCondition="integratedMode" />
    

    (if you are using IIS6 or Cassini, you need to add:

    <add name="AppHarbor.Web.Security.CookieAuthenticationModule" 
         type="AppHarbor.Web.Security.CookieAuthenticationModule, AppHarbor.Web.Security" />
    

    in <httpModules> section under <system.web>.  You can safely add both if you want to.  It won't hurt. This is useful when you are testing in Cassini and deploying on IIS on AppHarbor.)  Also, make sure mode="None" attribute is set on your <authentication> tag (under <system.web>).

    For detailed information, you could refer to:

    https://github.com/appharbor/AppHarbor.Web.Security

    Regards

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, May 12, 2014 9:41 PM