Detailed 500 error message, ASP + IIS 7.5

后端 未结 13 1165
北荒
北荒 2020-11-22 03:52

IIS 7.5 , 2008rc2, classic asp, 500 error msg:

The page cannot be displayed because an internal server error has occurred.

I nee

相关标签:
13条回答
  • 2020-11-22 04:15

    I have come to the same problem and fixed the same way as Alex K.

    So if "Send Errors To Browser" is not working set also this:

    Error Pages -> 500 -> Edit Feature Settings -> "Detailed Errors"

    enter image description here

    Also note that if the content of the error page sent back is quite short and you're using IE, IE will happily ignore the useful content sent back by the server and show you its own generic error page instead. You can turn this off in IE's options, or use a different browser.

    0 讨论(0)
  • 2020-11-22 04:15

    Found it.

    http://blogs.iis.net/ksingla/archive/2009/02/16/iis-7-5-updates-to-custom-errors-and-compression.aspx

    run cmd as administrator, go to your system32\inetsrv folder and execute:

    appcmd.exe set config -section:system.webServer/httpErrors -allowAbsolutePathsWhenDelegated:true
    

    Now I can see detailed asp errors .

    0 讨论(0)
  • 2020-11-22 04:15

    In my case it was permission issue. Open application folder properties -> Security tab -> Edit -> Add

    • IIS AppPool\[DefaultAppPool or any other apppool] (if use ApplicationPoolIdentity option)
    • IUSRS
    • IIS_IUSRS
    0 讨论(0)
  • 2020-11-22 04:21

    Double click "ASP" in the site's Home screen in IIS admin, expand "Debugging Properties", enable "Send errors to browser", and click "Apply".

    Under "Error Pages" on the home screen select "500", then "Edit feature settings" and select "Detailed Errors".

    Note that the same steps apply for IIS 8.0 (Windows Server 2012).

    0 讨论(0)
  • 2020-11-22 04:22

    You may also verify that if you changed your main website folder (c:\inetpub\wwwroot) to another folder you must give read permission to the IIS_IUSRS group in the new folder.

    0 讨论(0)
  • 2020-11-22 04:23

    TLDR:First determine where in the pipeline you're getting the error from (scroll looking for screenshots of something that resembles your error), make changes to get something new, repeat.

    First determine what error message you are actually seeing.

    If you are seeing the file located here...

    %SystemDrive%\inetpub\custerr\\500.htm

    ...which generally looks like this:

    ...then you know you are seeing the currently configured error page in **IIS ** and you do NOT need to change the ASP.net customErrors setting, asp error detail setting, or "show friendly http errors" browser setting.

    You may want to look at the above referenced path instead of trusting my screenshot just in case somebody changed it.

    "Yes, I see the above described error..."

    In this case, you are seeing the setting of <httpErrors> or in IIS Manager it's Error Pages --> Edit Feature Settings. The default for this is errorMode=DetailedLocalOnly at the server node level (as opposed to the site level) which means that while you will see this configured error page while remote, you should be able to log on locally to the server and see the full error which should look something like this:

    You should have everything that you need at that point to fix the current error.

    "But I don't see the detailed error even browsing on the server"

    That leaves a couple of possibilities.

    1. The browser you are using on the server is configured to use a proxy in its connection settings so it is not being seen as "local".
    2. You're not actually browsing to the site you think you are browsing to - this commonly happens when there's a load balancer involved. Do a ping check to see if dns gives you an IP on the server or somewhere else.
    3. You're site's httpErrors settings is set for "Custom" only. Change it to "DetailedLocalOnly". However, if you have a configuration error, this may not work since the site level httpErrors is also a configuration item. In that case proceed to #4
    4. The default for httpErrors for all sites is set for "Custom". In this case you need to click on the top level server node in IIS Manager (and not a particular site) and change the httpErrors settings there to DetailedLocalOnly. If this is an internal server and you're not worried about divulging sensitive information, you could also set it to "Detailed" which will allow you to see the error from clients other than the server.
    5. You're missing a module on the server like UrlRewrite (this one bites me a lot, and it often gives the generic message regardless of the httpErrors settings).

    "Logging on to the server is not an option for me"

    Change your site's httpErrors to "Detailed" so you can see it remotely. But if it doesn't work your error might already be a config error, see #3 immediately above. So you might be stuck with #4 or #5 and you're going to need somebody from your server team.

    "I'm not seeing the error page described above. I'm seeing something different"

    If you see this...

    ...and you expect to see something like this...

    ...then you need to change "Send errors to browser" to true in IIS Manager, under Site --> IIS --> ASP --> Debugging Properties

    If you see this...

    or this...

    ...you need to disable friendly errors in your browser or use fiddler's webview to look at the actual response vs what your browser chooses to show you.

    If you see this...

    ...then custom errors is working but you don't have a custom error page (of course at this point were talking about .net and not classic asp). You need to change your customErrors tag in your web.config to RemoteOnly to view on the server, or Off to view remotely.

    If you see something that is styled like your site, then custom errors is likely On or RemoteOnly and it's displaying the custom page (Views->Shared->Error.cshtml in MVC for example). That said, it is unlikely but possible that somebody changed the pages in IIS for httpErrors so see the first section on that.

    0 讨论(0)
提交回复
热议问题