ArgumentNullException in RewriteModule when callback from openid authentication

Vote:
 

I have a site running EPiServer CMS 6 R2. They wanted SSO from Azure AD.

I went with the solution with openid and owin.

When pressing the login in with azure button, i get redirected to the microsoft login screen and authenticate myself. And after that i get redirected to a static page on the site. Where the purpose is to add additional user information and create the user in our db.

But when I get redirected to the site I get an error in th URLRewriteModule.

2015-11-06 13:41:18,498 DEBUG [53] EPiServer.Web.UrlRewriteModuleBase.BeginRequestEventHandler - Starting request with Url http://localhost:17000/ExternalLogin.aspx
2015-11-06 13:41:18,503 DEBUG [53] EPiServer.Web.UrlRewriteModule.HttpUrlRewriteToInternal - Returning URL http://localhost:17000/ExternalLoginHandler.ashx
2015-11-06 13:41:18,506 DEBUG [53] EPiServer.Web.UrlRewriteModuleBase.BeginRequestEventHandler - Exiting with no rewrite, Url is http://localhost:17000/ExternalLogin.aspx
2015-11-06 13:41:18,511 ERROR [53] CMSProject.Website.Global.Application_Error - System.ArgumentNullException: Value cannot be null.
Parameter name: input
at System.Text.RegularExpressions.Regex.IsMatch(String input)
at EPiServer.UrlBuilder.Init(String url)
at EPiServer.Web.UrlRewriteModule.HttpUrlRewriteToExternal(String url, Boolean removeId, RebaseKind typeOfUrl)
at EPiServer.Web.UrlRewriteModuleBase.EndRequestEventHandler(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
2015-11-06 13:41:18,518 ERROR [53] EPiServer.Global.Global_Error - 1.2.5 Unhandled exception in ASP.NET
System.ArgumentNullException: Value cannot be null.
Parameter name: input
at System.Text.RegularExpressions.Regex.IsMatch(String input)
at EPiServer.UrlBuilder.Init(String url)
at EPiServer.Web.UrlRewriteModule.HttpUrlRewriteToExternal(String url, Boolean removeId, RebaseKind typeOfUrl)
at EPiServer.Web.UrlRewriteModuleBase.EndRequestEventHandler(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

I have no idea why I get this. The information from the authorization is stored in form data of the request, could it be this that's creating the issue. Because i can navigate to the page without this.

I have tried using a handler(ashx) as well and still get the error.

#141021
Nov 06, 2015 13:57
Vote:
 

For 6 R2 you will be out of luck. Best option is to upgrade Epi. You can setup a bridge concept like this: http://krompaco.nu/2014/10/owin-authentication-on-older-episerver-sites/

#162172
Oct 11, 2016 23:47
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.