I have an app deployed to Azure and it uses ADFS (Active Directory Federated Services) for authentication.
When the user tries to navigate to the app on Azure, it redirects the user to the ADFS authentication page. User enters their credentials and clicks OK, and ADFS redirects the user to the landing page of my app.
Everything is working fine up to this point. I'm getting a generic server error on the app once the user hits the landing page. PROBLEM: I need to see the detailed errors. I try setting <customErrors="off" />
, repackage my app and redeploy, but that doesn't give me detailed errors:
Here's what I've tried: I've tried packaging my app in Debug mode (after Release mode didn't work), I've edited both web.config's (in the root of the solution, as well as in the Views folder, just to cover all bases). Nothing worked.
What am I doing wrong?
Log detailed errors To save the error page or failed request tracing for Windows apps in the Azure portal, navigate to your app and select App Service logs. Under Detailed Error Logging or Failed Request Tracing, select On, then select Save. Both types of logs are stored in the App Service file system.
If you want to change web. config files you can use the Azure portal, there is a tool called "App Service Editor" in preview or Kudu that lets you edit any of the files you've deployed.
This type of unexpected error may occurs on local or remote server. In asp.net, we can find the exact error message by setting mode="Off" with in customErrors tag in web. config of our application.
To access App Service diagnostics, navigate to your App Service web app or App Service Environment in the Azure portal. In the left navigation, click on Diagnose and solve problems.
A couple of things to try:
customerErrors
attribute is set correctly? The
Identity and Access tooling in Visual Studio seems to like to reset
that back to "Off"
(every time you update via the tool).web.config
settings for the site?
Browsing to the site from the server might also provide a more
friendly error message.I fixed this error by ftp'ing into my azure website and deleting the wwwroot folder and then publishing my website via visual studio.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With