Friday 9 March 2012

Switching Between HTTP and HTTPS Automatically: Version 2

configSections for .NET 1.1

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    ...
    <configSections>
        ...
        <section
            name="secureWebPages"

            type="Ventaur.Web.Security.SecureWebPageSectionHandler,
            WebPageSecurity"
            allowLocation="false" />

    </configSections>

    ...


</configuration>

configSections for .NET 2.0

<?xml version="1.0"?>

<configuration>
    ...
    <configSections>

        ...
        <section
          name="secureWebPages"

          type=
            "Ventaur.Web.Security.Configuration.SecureWebPageSettings,
          WebPageSecurity" />
    </configSections>

    ...

</configuration>

httpModules on IIS 6.x and Earlier or IIS 7 in "Classic" Mode

<?xml version="1.0" encoding="utf-8" ?>

    <system.web>

        ...
        <httpModules>

            ...
            <add
                name="WebPageSecurity"
                type="Ventaur.Web.Security.SecureWebPageModule,
                    WebPageSecurity" />

        </httpModules>
        ...
    </system.web>

    ...
</configuration>

modules on IIS 7.x and Later in "Integrated" Mode

<?xml version="1.0" encoding="utf-8" ?>
    <system.webServer>

        ...
        <modules>

            ...
            <add
                name="WebPageSecurity"
                type="Ventaur.Web.Security.SecureWebPageModule,
                    WebPageSecurity"
                preCondition="managedHandler" />

        </modules>
        ...
    </system.webServer>

    ...
</configuration>
 
For Reference......
http://www.codeproject.com/Articles/7206/Switching-Between-HTTP-and-HTTPS-Automatically-Ver 
 

 

No comments:

Post a Comment