RedirectFromLoginPage or Response.Redirect do not work with IIS10

422 views Asked by At

We have a couple of legacy WebForm apps using FormsAuthentication that we are updating to the latest .NET version and moving from Server 2008 R2 to Server 2016.

After successfully logging in the user is correctly forwarded to the secure section of the app, both in the existing version of the app (.NET 4.5.1) and in debug (.NET 4.6.1), but when deployed on the server the user can authenticate but forwarding fails - it will sit at the login page until the session timeout pop-up appears..

Authentication is

FormsAuthentication.SetAuthCookie(vUserName.ToString, False)

In the original app redirection is

FormsAuthentication.RedirectFromLoginPage(vUserName, False)

We have also tried

Response.Redirect(FormsAuthentication.GetRedirectUrl(vUserID, False), False)

Both work in debug (IIS 7) but neither work as deployed in IIS 10

Deployment does enable Forms Authentication for that site... I'm guessing they changed something in IIS 10, but can't figure it out...

Thanks

1

There are 1 answers

0
gchq On

I updated 33 NuGet packages, and it threw the toys out over ToolkitScriptManager (removed in v15.1 https://ajaxcontroltoolkit.codeplex.com/wikipage?title=ToolkitScriptManager%20Removed%20in%20v15.1%2C%20Use%20ScriptManager)

Replaced all incidents of ToolkitScriptManager with ScriptManager and it now runs on IIS 10 - Server 2016