Failed Login produces System Error

Kayla Johnson asked on June 19, 2018 21:49

I have a simple logon form web part on the Logon.aspx page of our client's site. When you fail to provide correct credentials though it redirects to /CMSMessages/Error.aspx?aspxerrorpath=/CMSPages/PortalTemplate.aspx

I don't see where this is set anywhere in the settings. We don't even have a PortalTemplate.aspx Page.

Recent Answers


Brenden Kehren answered on June 20, 2018 03:09

What version are you on? Have you checked the event logs in Kentico? Seems like the login process is erroring out which is why it's redirecting you.

0 votesVote for this answer Mark as a Correct answer

Kayla Johnson answered on June 20, 2018 15:26

We are on 9. I say it's erroring out when the user incorrectly logs in because the error log message says "Not Authenticated"

Message: Exception of type 'System.Web.HttpUnhandledException' was thrown.
Exception type: System.Web.HttpUnhandledException
Stack Trace: 
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean         includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean     includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.cmspages_portaltemplate_aspx.ProcessRequest(HttpContext context) in     c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET     Files\root\e0225442\59b957da\App_Web_portaltemplate.aspx.67ab7734.uu-ocm66.0.cs:line 0
at     System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Message: Not Authenticated.

Exception type: System.Exception
Stack Trace: 
at CMSModuleLoader.CustomSecurityHandler.OnAuthentication(Object sender, AuthenticationEventArgs     e) in         D:\CoffmanTech\Alliance\Kentico\CMS\Old_App_Code\ALS_Custom\CMSExtensions\CMSCustomSecurityModuleLoader.cs:line 74
at CMS.Base.AbstractHandler.CallEventHandler[TArgs](EventHandler1 h, TArgs e)
at CMS.Base.AbstractHandler.Raise[TArgs](String partName, List1 list, TArgs e, Boolean important)
at CMS.Base.SimpleHandler`2.RaiseExecute(TArgs e)
at CMS.Base.SimpleHandler`2.RaiseExecute(TArgs e)
at CMS.Base.SimpleHandler`2.StartEvent(TArgs e)
at CMS.Membership.AuthenticationHandler.StartEvent(UserInfo& userInfo, String username, String password, String passcode, String siteName)
at CMS.Membership.AuthenticationHelper.AuthenticateUser(String userName, String password, String siteName, Boolean login, AuthenticationSourceEnum source)
at CMS.MembershipProvider.CMSMembershipProvider.ValidateUser(String username, String password)
at CMSWebParts_Membership_Logon_LogonForm.Login1_Authenticate(Object sender, AuthenticateEventArgs e) in D:\CoffmanTech\Alliance\Kentico\CMS\CMSWebParts\Membership\Logon\LogonForm.ascx.cs:line 635
at System.Web.UI.WebControls.Login.AttemptLogin()
at System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e)
at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on June 20, 2018 16:18

Looks like you should start here with your debugging:

CMS\Old_App_Code\ALS_Custom\CMSExtensions\CMSCustomSecurityModuleLoader.cs : line 74

I'm willing to bet your custom security handler has an error or bad logic in it.

0 votesVote for this answer Mark as a Correct answer

Kayla Johnson answered on June 20, 2018 19:08

I'm not sure what that is. I am just developing on the web version of kentico. We don't have the VS version.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on June 20, 2018 20:42

In the upper right corner when you log into Kentico, there is a ?, click it and it will show you the version.

You will need access to the file system on the server to debug the issue you're experiencing because it's specifically coming from a custom file added as a global handler.

0 votesVote for this answer Mark as a Correct answer

Kayla Johnson answered on June 20, 2018 22:48

I'm confused as to how we can have a custom file if we did not create it. We don't have access to the .cs files

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on June 20, 2018 22:50

You may not have put it there but someone did. The error is stating specifically where the file is and what line the error is on (would be on the server running the site).

D:\CoffmanTech\Alliance\Kentico\CMS\Old_App_Code\ALS_Custom\CMSExtensions\CMSCustomSecurityModuleLoader.cs

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.