Hey Guys !!
Today we faced an issue in one of our Web API hosted in Azure as PaaS (Web App Services). We were not getting detailed error message , we were just getting message as "Server Error in '/' Application. Runtime Error"
To overcome this issue, we were in need to know the exact reason of issue, as because by default we can not get the detailed error message on web page.
So, we did some changes in our web.config file.
We just opened the web.config file from https://ourappiXYZ.scm.azurewebsites.net/
To open the web.config file, we logged in with scm and clicked on "Debug Console" >> "CMD", as per below screen shot
Then, we clicked on site folder and then "wwwroot" folder, and then edit the web.config file.
To open the web.config file, we logged in with scm and clicked on "Debug Console" >> "CMD", as per below screen shot
Then, we clicked on site folder and then "wwwroot" folder, and then edit the web.config file.
In web.confif file, we added
<customErrors mode="Off" /> , inside the <system.web>
<system.web>
<customErrors mode="Off" />
</system.web>
and then we added <httpErrors errorMode="Detailed" /> inside <system.webServer>,
<system.webServer>
<httpErrors errorMode="Detailed" />
</system.webServer>
So , as consolidated ,we had to do the following tags as ..
<system.web>
<customErrors mode="Off" />
</system.web>
<system.webServer>
<httpErrors errorMode="Detailed" />
</system.webServer>
After doing these chnages, we were able to get the exact error on web page and were able to do fix the issue.
We undo/rollbacked the changes, once we fixed the issue.
This comment has been removed by the author.
ReplyDeleteOur DevOps Training in Noida incorporates *online classes, classroom sessions, real-life case studies, develop and deploy software using DevOps* and lots more.
ReplyDeleteThanks for sharing such a great post. It is very useful and informative. Valuable information you have shared. Also, check out
ReplyDeleteDevops Services
Great article that explains in detail, how to resolve an Error in WebAPI Azure App Services appears. It can definitely help someone who is facing such issues.
ReplyDeleteMore information on DevOps companies in India
DevOps services and solutions