SYMPTOMS
Users are unable to log into Synergize Portal with the following error:
There are no issues with logging into Web Explorer, however access to the Portal server (http://"synergize server name"/synergizeportal) is also unavailable. When checking SPS, the Portal Automation process produces the following error:
As well, recycling the Synergize Portal application pool and resetting IIS are not successful.
After searching for "exception" when checking the Portal Server logs (C:\ProgramData\Microdea\PortalServer\Logs), the following is found:
"[2015-01-26 13:01:00.152] Synergize Portal Server, TokenController.Post
[2015-01-26 13:01:00.152]
EXCEPTION: The type initializer for 'Microdea.Portal.Server.Helpers.TokenStore' threw an exception.
at Microdea.Portal.Server.Helpers.TokenStore.Add(Token token)
at Microdea.Portal.Server.Controllers.TokenController.Post()
INNER EXCEPTION: Object reference not set to an instance of an object.
at Microdea.Portal.Server.Helpers.TokenStore.DeserializeTokens()
at Microdea.Portal.Server.Helpers.TokenStore..cctor()
[2015-01-26 13:01:00.152] Synergize Portal Server
[2015-01-26 13:01:00.152]
EXCEPTION: The type initializer for 'Microdea.Portal.Server.Helpers.TokenStore' threw an exception.
at Microdea.Portal.Server.Helpers.TokenStore.Add(Token token)
at Microdea.Portal.Server.Controllers.TokenController.Post()
at lambda_method(Closure , Object , Object[] )
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass13.<GetExecutor>b__c(Object instance, Object[] methodParameters)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.<>c__DisplayClass5.<ExecuteAsync>b__4()
at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1 func, CancellationToken cancellationToken)
INNER EXCEPTION: Object reference not set to an instance of an object.
at Microdea.Portal.Server.Helpers.TokenStore.DeserializeTokens()
at Microdea.Portal.Server.Helpers.TokenStore..cctor()
[2015-01-26 13:01:24.778] Synergize Portal Server"
RESOLUTION
Go to C:\ProgramData\Microdea\PortalServer and change existing "tokens.json" file to "tokens.json.bak".
It will create new json file for tokens as old tokens are likely being used over and over again.
To verify it works, restart the Portal Automation process in the SPS designer, log into Portal server (http://"synergize server name"/synergizeportal) as well as the Portal client application.
Once Portal is up and running again, the json.bak file can be deleted.