Friday, February 17, 2012

Integrating Classic ASP with ASP.Net Forms Authentication

If you are still running applications that require Classic ASP, you may want to run them side-by-side your ASP.Net applications while you are in the process of upgrading or converting them completely over to ASP.Net.

You can do that quite easily with ASP.Net Forms Authentication and Integrated Mode now available in IIS 7/IIS 7.5

You can learn more about how to accomplish this here:

If you want to get starting with your own Classic ASP application using ASP.Net Forms Authentication, there is a convenient Visual Studio Project Template I created available here:


  1. How do we pass the autentication token/ticket to the Classic ASP pages?

    I have to support a classic ASP application written about 12 years ago which was on IIS 6.0 but was moved to IIS 7.5 recently. They want to replace the basic authentication with Forms based authentication validating against Active Directory directly.

    When I use the Integrated mode as specified, I just get redirected back to my login page even after the user is authenticated successfully. I am assuming that is because the authentication ticket is not available to my ASP pages?

    Please do let me know..I am not sure if this is even possible at this point. We do not have the time to rewrite the application

  2. I would highly recommend this book which outlines and provides some details on how to integrate both an ASP and ASP.NET Application and pass around authentication tokens (in IIS 7/7.5):
    Professional ASP.NET 3.5 Security, Membership and Role Management in C# and VB:

  3. Hi There,

    Thanks for responding. I did order the book. Have not received it yet. To take a step back though, is it possible to implement Forms authentication in classic ASP alone? I am on a limited timeline here and some folks online seem to be suggesting it is not possible to integrate the two and pass information between the two..


  4. You have to use ASP.NET pages to handle the FormsAuthentication logic otherwise it is not considered FormsAuthentication. In addition, in IIS 7.0 and above, you must add the following section to your Web.config:

    (Ch. 7, pg. 395)

    To pass data to ASP from ASP.Net, you can write a custom Http Handler and pass data around using the Request Headers so that the information will show up in the ASP Request.ServerVariables collectino (Ch 7, pg. 392)

    1. Here is the link to the book on the Wrox Press site:,descCd-DOWNLOAD.html