access resource with managed identity with .NET core 6.0

Testa 551 Reputation points
2022-11-28T14:01:02.667+00:00

Hi,

The customer is trying to use Managed Identity to access to Azure Resource by following the links below.
"https://learn.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview-for-developers?tabs=portal%2Cdotnet",
"https://learn.microsoft.com/en-us/azure/app-service/scenario-secure-app-access-storage?tabs=azure-portal".

But they face "HTTP Error 500.30 - ASP.NET Core app failed to start" error after updating code. I also tried and faced the same issue.
The customer is using 3.1 and I am using 6.0.
(Without adding anything to use Managed Identity, there is no issue to deploy. Once adding something in code, it returns error message)

1, Is there any step we should take which is not listed in the link above?

2, Where to add the code in the link below? It is not "Program.cs"?
"https://learn.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview-for-developers?tabs=portal%2Cdotnet#accessing-a-blob-in-azure-storage"

3, The link to the sample code in Github is pointing to the same url, instead of the github page. Is there any sample code?
"https://learn.microsoft.com/en-us/azure/app-service/scenario-secure-app-access-storage?tabs=azure-portal#access-blob-storage"

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,127 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,316 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AgaveJoe 26,031 Reputation points
    2022-11-28T18:19:59.927+00:00

    But they face "HTTP Error 500.30 - ASP.NET Core app failed to start" error after updating code. I also tried and faced the same issue.

    I assume there is a problem with the updated code. Perhaps the ASP.NET Core shared framework version the updates target are not installed on the server.

    500.30 In-Process Startup Failure

    Do standard troubleshooting. Look in the event log for errors. Enable logging and view the logs. Try running the app from the command line of the server has the SDK installed.

    0 comments No comments