ASP.NET Core: Display more detailed information about the error after publishing project on Azure


After deploying ASP.NET CORE project on Azure, I start getting bunch of 500 internal errors for webapi’s, I investigated the failures in chrome dev tool and couldn’t find any detailed information there.


The html response from server was:



So in-order to check out actual exception, I added couple of line in web.config file of project

<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false">
        <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />

Yo can also add ASPNETCORE_ENVIRONMENT variable as App settings in Application Settings section of WebApp in Azure Portal.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s