Resolve Remote Server Error: Unable to Log In, WebException, 500 Internal Server Error

Use this article to resolve a remote server error (500 Internal Server Error) that might occur when users attempt to log in to the Synergize portal:

  • Access to the Portal server (http://"synergize server name"/synergizeportal) is unavailable.

  • Recycling the Synergize Portal application pool and resetting IIS are not successful.

  • When checking SPS, the Portal Automation process produces the following errors:

  1. Search for exception in the Portal Server logs at:

    C:\ProgramData\Microdea\PortalServer\Logs

     

    Example:

    [2025-01-26 13:01:00.152] Synergize Portal Server, TokenController.Post

    [2025-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()

    [2025-01-26 13:01:00.152] Synergize Portal Server

    [2025-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()

    [2025-01-26 13:01:24.778] Synergize Portal Server

    Text

Description automatically generated

  2. Open the following folder:

    C:\ProgramData\Microdea\PortalServer

     

  3. Rename the tokens.json file to tokens.json.bak.

  4. The system will create a new json file for tokens. Old tokens are likely being used over and over again.

  5. Restart the Portal Automation process in the SPS designer.

  6. Log in to Portal server (http://"synergize server name"/synergizeportal) and the Portal client application.

  7. Once Portal is up and running again, the json.bak file can be deleted.