Created a Login View. OnClick of Login button looked up and set CurrentUser and Navigated to Home View. Home View shows "Session Expired" message.

The stack trace noticed in "Developer Tools" of Chrome (CTRL+SHIFT+I), "Network" Tab, "Preview" Section was:

ExceptionDisplayDetails
(0) FullName: "System.FormatException"
Message: "String was not recognized as a valid DateTime."
Name: "FormatException"
Source: "mscorlib"
StackTrace: " at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
at System.Convert.ToDateTime(String value)
at GraphiteGTC.Core.Utility.TimeAwareCryptographer.DecryptString(String encryptedString)
at GraphiteGTC.Core.Utility.TimeAwareCryptographer.DecryptInteger(String encryptedInteger)
at AuthorizationTestApp.View.Controllers.BaseController.RetrieveCurrentUser(List`1 uiParameters) in c:\Users\joyso\AppData\Local\Graphite GTC\Build\TestGroup\AuthorizationTestApp\B20190124062624\CSharp\Web\Controllers\BaseController.cs:line 45"

(1) FullName: "GraphiteGTC.Core.CustomException.SessionTokenException"
Message: "Error decrypting session token"
Name: "SessionTokenException"
Source: "AuthorizationTestApp"
StackTrace: " at AuthorizationTestApp.View.Controllers.BaseController.RetrieveCurrentUser(List1 uiParameters) in c:\Users\joyso\AppData\Local\Graphite GTC\Build\TestGroup\AuthorizationTestApp\B20190124062624\CSharp\Web\Controllers\BaseController.cs:line 48
at AuthorizationTestApp.View.Controllers.HomeController.OnLoadView(List1 uiParameters) in c:\Users\joyso\AppData\Local\Graphite GTC\Build\TestGroup\AuthorizationTestApp\B20190124062624\CSharp\Web\Controllers\AuthorizationTestApp\HomeController.cs:line 26
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass42.<begininvokesynchronousactionmethod>b41()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass37.<>cDisplayClass39.<begininvokeactionmethodwithfilters>b33()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass4f.<invokeactionmethodfilterasynchronously>b49()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass25.<>cDisplayClass2a.<begininvokeaction>b20()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass25.<begininvokeaction>b22(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.<>cDisplayClass1d.<beginexecutecore>b18(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.<>cDisplayClass4.<makevoiddelegate>b3(IAsyncResult ar)
at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.<>cDisplayClass4.<makevoiddelegate>b3(IAsyncResult ar)
at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.<>cDisplayClass8.<beginprocessrequest>b3(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.<>cDisplayClass4.<makevoiddelegate>b3(IAsyncResult ar)
at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)"

ExceptionType: "SessionTokenError"
LoadPreviousPage: "No"
TimeoutRedirect: "/Content/Login.html"

asked 25 Jan, 16:21

ChrisG's gravatar image

ChrisG
1001k506570
accept rate: 57%


This happens due to improper Culture Information set to Virtual Account representing the ApplicationPoolIdentity of your website.

Graphite Studio Applications use this Culture Information to generate the Session Token to manage session state in a stateless manner. When Decrypting the token there is an exception caused since the algorithm uses the Date.Convert based on a CultureInfo that does not exist.

This is a bug - please use the following work around.

Check app pool of your application in IIS.

  1. Open IIS Manager.
  2. Click "Application Pools"
  3. Right Click your "Application Pool" and choose "Advanced Settings"
  4. In "Process Mode" group change "Identity" from "ApplicationPoolIdentity" to "LocalService"
  5. Reset your Application Pool
link

answered 25 Jan, 16:45

ChrisG's gravatar image

ChrisG
1001k506570
accept rate: 57%

edited 18 Feb, 04:31

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×3
×1
×1
×1

Asked: 25 Jan, 16:21

Seen: 395 times

Last updated: 18 Feb, 04:31

Powered By:   Graphite