1

Session Id keep changing in each request while accessing the asp.net mvc application from cordova (android/ios webview). This happened only after windows 10 update, before it was working fine.

Session works fine when i try to access from chrome/firefox browser with phonegap windows client, but it's not working if I installed the app in android/ios device.

Palanikumar
  • 6,940
  • 4
  • 40
  • 51

1 Answers1

1

Based on the answer https://stackoverflow.com/a/59300799/1019435

In web.config add the blow line under system.web
Have to install URL Rewrite for IIS.

 <rewrite>
    <outboundRules>
      <rule name="AddSameSiteCookieFlag">
        <match serverVariable="RESPONSE_Set-Cookie" pattern="((.*)(ASP.NET_SessionId)(=.*))(SameSite=Lax)" />
        <action type="Rewrite" value="{R:1};SameSite=" />
      </rule>
    </outboundRules>
</rewrite>

or

<sessionState cookieSameSite="None" />
Palanikumar
  • 6,940
  • 4
  • 40
  • 51