Troubleshoot Azure app service API from Kudu debug console cmd

Subin Joseph 1 Reputation point
2022-05-06T18:12:53.547+00:00

HI Team ,

I have published Angular + Dotnet core API in azure app service .
When i try to access my API using https://{{}servername}.azurewebsites.net/API/swagger/index.html ,
I am getting below message
"The page cannot be displayed because an internal server error has occurred."

how can i trouble shoot and find the route cause ?
(app insights doesn't give anything).

I remember there was some commands to run API dll/exe from azure kudu debug console cmd so that we will get the reason why API is down ..

Please help me with the proper command to find the API failure .

Thanks in advance

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,333 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,434 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Ryan Hill 29,846 Reputation points Microsoft Employee
    2022-06-03T01:32:25.877+00:00

    Hi @Subin Joseph ,

    Enable Application Logging and Web server logging which you can find out more about under Enable diagnostics logging for apps in Azure App Service. If your swagger isn't working, seeing what's going on with the request should help. If you used the SwaggerGen fluent API, then you can change your logging level in your dotnet core to perhaps see what happens with the route. You can enable logging, HTTP logging, and W3C logging for starters.

    There aren't any special commands tied to Kudu that I'm aware of so I'm thinking it's one of the various dotnet commands you may be referring to. However, you can leverage the App Service Diagnostics tools as well to investigate what's going on.

    0 comments No comments

  2. Edgar Barrientos 0 Reputation points
    2025-03-06T16:52:03.8666667+00:00

    Steps:

    1. Open Kudo
    2. Go to DEBUG CONSOLE (Top Menu), then CMD
    3. This will open a black command window.
    4. CD site
    5. CD wwwroot
    6. DIR to list contents. Find your dll in the list to ensure you will be able to run it.
    7. DOTNET your.dll
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.