IIS6 and IIS7 form interoperability

Background:

I have two web applications configured on different web servers that are currently IIS6. Appendix 1 (A1 - a2.domain.com) uses the auth cookie forms set by Appendix 2 (A2 - a2.domain.com).

In A1 web.config, I have:

<authentication mode="Forms">
<forms name=".ASPXAUTH" domain="domain.com"  protection="All" path="/" loginUrl="http://a2.domain.com/login.aspx" timeout="60" />
</authentication>

In A2 web.config I have:

<authentication mode="Forms">
<forms name=".ASPXAUTH" domain="domain.com"  protection="All" path="/" loginUrl="login.aspx" timeout="60" />
</authentication>

These two applications also use machineKey values ​​in web.config

It works without a problem.

Problem:

I am updating A1 to use .NET 4.0 and starting in IIS7, and now authentication of shared forms does not work. I am still redirected to the correct login page in A2 and I see that it sets the auth cookie, but when I return to A1, authentication fails (from Event Viewer):

Error requesting forms for the request. Reason: ticket was invalid.

I tried:

  • A1 IIS6 ( - auth .NET IIS6)

  • A1 IIS7 , A2 A1 A1 loginUrl = "login.aspx" ( )

, , cookie auth IIS6, IIS7.

- , ?

+3
1

.NET 4.0 . , ticketCompatibilityMode :

<forms 
    loginUrl="/Login.aspx" 
    timeout="2880" 
    ticketCompatibilityMode="Framework20"
    domain="domain.com"
/>
+2

Source: https://habr.com/ru/post/1776869/


All Articles