1

When ever i tried to login to Sitecore local with admin/b credentials I was landing on a error page stating that "Error: An error occurred". enter image description here

When I analysed in the log file I found that the issue is because of "Sitecore Ticket" queue.

24500 21:33:55 ERROR String or binary data would be truncated.
The statement has been terminated.
Exception: System.Exception
Message: String or binary data would be truncated.
The statement has been terminated.
Source: Sitecore.Kernel
   at Sitecore.Data.DataProviders.Sql.DataProviderCommand.ExecuteNonQuery()
   at Sitecore.Data.DataProviders.Sql.SqlDataApi.<>c__DisplayClass33_0.<Execute>b__0()
   at Sitecore.Data.DataProviders.NullRetryer.Execute[T](Func`1 action, Action recover)
   at Sitecore.Data.Properties.SqlPropertyStore.SetStringValueCore(String prefixedName, String value)
   at Sitecore.Data.Properties.PropertyStore.SetStringValue(String name, String value)
   at Sitecore.Web.Authentication.DefaultTicketManager.CreateTicket(String userName, String startUrl, Boolean persist)
   at Sitecore.Owin.Authentication.Pipelines.CookieAuthentication.SignedIn.CreateTicket.Process(SignedInArgs args)
   at (Object , Object )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
   at Sitecore.Owin.Authentication.Security.Cookies.DefaultCookieAuthenticationProvider.ResponseSignedIn(CookieResponseSignedInContext context)
   at Microsoft.Owin.Security.Cookies.CookieAuthenticationHandler.<ApplyResponseGrantAsync>d__f.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Owin.Security.Infrastructure.AuthenticationHandler.<ApplyResponseCoreAsync>d__b.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Owin.Security.Infrastructure.AuthenticationHandler.<ApplyResponseAsync>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Owin.Security.Infrastructure.AuthenticationHandler.<TeardownAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Owin.Security.Infrastructure.AuthenticationMiddleware`1.<Invoke>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNet.Identity.Owin.IdentityFactoryMiddleware`2.<Invoke>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNet.Identity.Owin.IdentityFactoryMiddleware`2.<Invoke>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Owin.Mapping.MapMiddleware.<Invoke>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Sitecore.Owin.Middlewares.GlobalExceptionHandlerMiddleware.<Invoke>d__4.MoveNext()

Issue: Sitecore has an agent that automatically clean expired authentication tickets known as Sitecore.Tasks.CleanupAuthenticationTicketsAgent, however, the agent fails to clean them up, so the expired records remain in the Properties table. Large numbers of “SC_TICKET” records may lead to performance degradation of the login process.

And as we observed, it also cause the useless error to happen Error: An error occurred

Deleting the Sitecore ticket queue from Core DB resolved my issue. Use the following query to delete SC_ticket.

Solution USE [your_core_database_name]; DELETE FROM [dbo].[Properties] WHERE [dbo].[Properties].[Key] like '%SC_TICKET%'

2
  • Hi Bharath, welcome to Sitecore Stack Exchange. Please do not put question and answer in the question. If you have a question, but also have the answer... please state the question (as you have), but place the resolution and answer to the question in an Answer. Keep in mind Answers should also be detailed as well. – Pete Navarra Nov 20 '20 at 14:33
  • you can post an answer to your own question – Mohamed Ahmed Dec 2 '20 at 5:50
0

Issue: Sitecore has an agent that automatically clean expired authentication tickets known as Sitecore.Tasks.CleanupAuthenticationTicketsAgent, however, the agent fails to clean them up, so the expired records remain in the Properties table. Large numbers of “SC_TICKET” records may lead to performance degradation of the login process.

And as we observed, it also cause the useless error to happen Error: An error occurred

Deleting the Sitecore ticket queue from Core DB resolved my issue. Use the following query to delete SC_ticket.

Solution USE [your_core_database_name]; DELETE FROM [dbo].[Properties] WHERE [dbo].[Properties].[Key] like '%SC_TICKET%'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.