All Articles

Unable to reach identity server error on Sitecore 10

Error Description

After a successful installation of Sitecore 10, I was being redirected back from the Sitecore Identity Server.

Whenever I tried to hit https://sitecore-instance/sitecore/login, I was being redirected to https://sitecore-instance/sitecore/login?fbc=1 instead of the Sitecore Identity Server.

This did not stop me from logging in to Sitecore, but the issue had to be resolved.

In the logs I found the below exception message:

3320 10:26:12 ERROR Unable to reach an external identity provider.
Exception: System.InvalidOperationException
Message: IDX20803: Unable to obtain configuration from: '[PII is hidden]'.
Source: Microsoft.IdentityModel.Protocols

I checked all the configurations, and everything was fine.

I tried to access the identity server over the browser and got the below error:

HTTP 502.5 Error on Sitecore Identity Server

It turned out, I was getting an HTTP 502.5 Error on the Sitecore Identity Server.

HTTP 502.5 error on Sitecore Identity Server

I tried restarting the Identity Server, but that did not solve the problem.

I checked the Event Viewer if there were any logs for the above-mentioned error, and found the below error logged:

Application 'MACHINE/WEBROOT/APPHOST/SITECORE-IDENTITYSERVER'
with physical root 'D:\Inetpub\wwwroot\sitecore-identityserver\'
failed to start process with commandline 'dotnet .\Sitecore.IdentityServer.Host.dll',
ErrorCode = '0x80004005 : 80008096.

I opened a Command Prompt instance, changed the directory to the identity server root, and executed the same command mentioned in the error. I got the below message:

dotnet .\Sitecore.IdentityServer.Host.dll
It was not possible to find any compatible framework version
The specified framework 'Microsoft.AspNetCore.App', version '2.1.16' was not found.
  - Check application dependencies and target a framework version installed at:
      C:\Program Files\dotnet\
  - Installing .NET Core prerequisites might help resolve this problem:
      https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
  - The .NET Core framework and SDK can be installed from:
      https://aka.ms/dotnet-download
  - The following versions are installed:
      2.1.12 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]

I installed the .NET Core 3.1 Desktop Runtime on my machine to check if it was a hosting issue.

Turned out, the hosting bundle was the only thing missing.

The error was resolved and now I can access my Sitecore Identity Server instance.

Happy Sitecoring!

Published Feb 10, 2021

Sitecore MVP Technology 2024-23. Web Developer with rich experience in Sitecore and ASP.NET MVC.