当用户点击记住我时,Sitecore登录失败

时间:2016-01-21 02:04:41

标签: sitecore

我正在尝试解决用户在Sitecore登录页面上单击“记住我”时获取堆栈跟踪的问题。

如果我使用不正确的登录信息,我只能复制该问题。

Server Error in '/' Application.

userName

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.InvalidOperationException: userName

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 


[InvalidOperationException: userName]
   Sitecore.Caching.UserProfile.UserProfileCache.RemoveUser(String userName) +223
   Sitecore.Caching.CacheManager.ClearSecurityCache(String userName) +32

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
   System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +76
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +211
   System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +35
   Sitecore.Nexus.Pipelines.NexusPipelineApi.Resume(PipelineArgs args, Pipeline pipeline) +379
   Sitecore.Pipelines.Pipeline.Start(String pipelineName, PipelineArgs args, Boolean atomic) +197
   Sitecore.sitecore.login.LoginPage.Login_LoggingIn(Object sender, LoginCancelEventArgs e) +`enter code here`377
   System.Web.UI.WebControls.Login.AttemptLogin() +79
   System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +93
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +84
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3804

1 个答案:

答案 0 :(得分:2)

在新的Sitecore版本中,为了提高登录页面的安全性,Sitecore建议禁用记住我复选框:

  1. 打开sitecore.config文件
  2. Login.DisableRememberMe设置设为true

请注意,这还将忽略任何现有的“记住我” cookie,所有用户都将不得不重新登录。

了解更多详细信息,here