Unable to run Asp.net App in localhost after Azure AD migration

Tv, NagarajX 1 Reputation point
2022-04-18T14:00:47.717+00:00

193915-azureadissue.png

[TaskCanceledException: A task was canceled.]
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +173
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +64
Microsoft.IdentityModel.Protocols.<GetDocumentAsync>d__8.MoveNext() in C:\agent2_work\56\s\src\Microsoft.IdentityModel.Protocols\Configuration\HttpDocumentRetriever.cs:89

[IOException: IDX20804: Unable to retrieve document from: 'https://login.microsoftonline.com/46c98d88-e344-4ed4-8496-4ed7712e255d/v2.0/.well-known/openid-configuration'.]
Microsoft.IdentityModel.Protocols.<GetDocumentAsync>d__8.MoveNext() in C:\agent2_work\56\s\src\Microsoft.IdentityModel.Protocols\Configuration\HttpDocumentRetriever.cs:96
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +102

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,073 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Takahito Iwasa 4,841 Reputation points MVP
    2022-04-18T20:30:04.97+00:00

    Hi, @Tv, NagarajX

    I understand that your ASP.NET app is an OIDC-based application that utilizes Azure AD tokens.

    There are several possible causes for this problem.

    • Azure AD authentication is not configured properly in the first place
    • Execution environment network issues

    The following SO articles discuss various possibilities. Find the one that matches your case.

    https://stackoverflow.com/questions/54647917/how-to-fix-idx20804-unable-to-retrieve-document-from-pii-is-hidden-error


  2. Monalla-MSFT 12,596 Reputation points
    2022-04-26T13:59:49.243+00:00

    @Tv, NagarajX - Thanks for reaching out.

    Have you tried the below steps when you tried migrating ASP.NET applications?

    • The App Service Migration Assistant is designed to simplify your journey to the cloud through a free, simple, and fast solution to migrate ASP.Net applications from on-premises to the cloud. You can quickly:
    • Assess whether your app is a good candidate for migration by running a scan of its public URL.
    • Download the Migration Assistant to begin your migration.
    • Use the tool to run readiness checks and general assessment of your app’s configuration settings, then migrate your app or site to Azure App Service via the tool.

    For more information on how the tool works, database migration please follow this doc for more information: introducing-the-app-service-migration-assistant-for-asp-net-applications

    Hope this helps. and please feel free to reach out if you have any further questions.

    ------------------------------------------------------------------

    If the above response was helpful, please feel free to "Accept as Answer" and "Upvote" the same so it can be beneficial to the community

    0 comments No comments