Configure HttpOnly Cookies in ASP Classic and .net with web.confi

Do you want to configure httpOnly Cookies in ASP Classic and .net with web.config.

For .NET

<system.web>
    <httpCookies httpOnlyCookies="true" />

</system.web>

For Classic ASP include following

<system.webServer>
    <rewrite>
    <outboundRules>
        <rule name="Add HttpOnly" preCondition="No HttpOnly">
            <match serverVariable="RESPONSE_Set_Cookie" pattern=".*" negate="false" />
            <action type="Rewrite" value="{R:0}; HttpOnly" />
            <conditions>
            </conditions>
        </rule>
        <preConditions>
            <preCondition name="No HttpOnly">
                <add input="{RESPONSE_Set_Cookie}" pattern="." />
                <add input="{RESPONSE_Set_Cookie}" pattern="; HttpOnly" negate="true" />
            </preCondition>
        </preConditions>
    </outboundRules>
</rewrite>

If your application bulit on both Classic ASP and .Net then include both in web.config.



Contact us for any question on this topic

Search for any Payment Gateway PayPal, CCAvenue, WorldPay, Technology Help

Click here to Contact for any Integration Help

Earn Rs 51 and Help a Needy and more on further referral (INDIA ONLY) I’m inviting you to join Tez, a simple and secure payments app by Google. Here’s my code UG0W9 - just enter it before your first transaction. Once you’ve sent your first payment, we’ll each get ₹51! https://g.co/tez/UG0W9