Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to view detailed errors #106

Closed
Fredoid opened this issue May 31, 2018 · 1 comment
Closed

Unable to view detailed errors #106

Fredoid opened this issue May 31, 2018 · 1 comment

Comments

@Fredoid
Copy link

Fredoid commented May 31, 2018

Hi,
I am running classic ASP.Net MVC application with .Net Framework 4.0 into an aspnet:latest docker container. Website seems to work fine into the container because I can navigate into it.

Sometimes the application raises errors and exceptions but I can't view them. My browser display the standard iis error The page cannot be displayed because an internal server error has occurred in a white page .

I've tried those following solutions in my web.config

  • system.web/customError mode="Off"
  • system.webServer/httpErrors errorMode="Detailed" and existingResponse="PassThrough"
  • system.webServer/asp appAllowClientDebug=true and scriptErrorSentToBrowser=true

I have olso tested unlocking IIS Feature Delegation

c:\Windows\system32\inetsrv\appcmd unlock config –section:httpErrors
c:\Windows\system32\inetsrv\appcmd unlock config -section:system.webServer/asp
c:\Windows\system32\inetsrv\appcmd unlock config -section:system.webServer/httpErrors
c:\Windows\system32\inetsrv\appcmd unlock config -section:system.web/customErrors

Nothing change, same issue, The page cannot be displayed because an internal server error has occurred.

For information, with PS Get-EventLog I can see real exception with stack trace and full of information, but my problem is that I would like to view errors details directly in my browser as I always worked with VS and IIS.

No more idea on my side, and you ?

Thanks,
Fred

@shirhatti
Copy link
Contributor

By default on IIS you only see detailed error pages on localhost. You can enable detailed error pages for all remote clients by setting this in your web.config. Just be careful not to enable this in production as you'll be leaking implementation details

<configuration>
  <system.webServer>
    <httpErrors errorMode="Detailed" />
  </system.webServer>
</configuration>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants