자세한 500 오류 메시지, ASP + IIS 7.5
IIS 7.5, 2008rc2, 클래식 ASP, 500 오류 메시지 :
내부 서버 오류가 발생하여 페이지를 표시 할 수 없습니다.
좀 더 자세한 오류를 얻으려면 IIS를 구성하는 방법을 알아야합니다.
ASP 구성의 모든 디버깅 옵션을 true로 설정하려고했습니다.
그러나 그것은 효과가 없었습니다. 누구든지 나를 도울 수 있습니까?
나는 같은 문제에 직면했고 Alex K와 같은 방식으로 고쳤다 .
따라서 "브라우저에 오류 보내기"가 작동하지 않으면 다음과 같이 설정하십시오.
오류 페이지-> 500-> 기능 설정 편집-> "상세한 오류"
또한 전송 된 오류 페이지의 내용이 매우 짧고 IE를 사용하는 경우 IE는 서버에서 전송 한 유용한 내용을 무시하고 대신 일반 오류 페이지를 표시합니다. IE의 옵션에서 이것을 끄거나 다른 브라우저를 사용할 수 있습니다.
원격 서버에있는 경우 다음과 같이 web.config 파일을 구성 할 수 있습니다.
<configuration>
<system.webServer>
<httpErrors errorMode="Detailed" />
<asp scriptErrorSentToBrowser="true"/>
</system.webServer>
<system.web>
<customErrors mode="Off"/>
<compilation debug="true"/>
</system.web>
IIS 관리자의 사이트 홈 화면에서 "ASP"를 두 번 클릭하고 "디버깅 속성"을 펼친 후 "오류를 브라우저로 보내기"를 활성화 한 다음 "적용"을 클릭하십시오.
홈 화면의 "오류 페이지"에서 "500"을 선택한 다음 "기능 설정 편집"을 선택하고 "상세 오류"를 선택하십시오.
IIS 8.0 (Windows Server 2012)에도 동일한 단계가 적용됩니다.
Vaclav 와 Alex의 답변을 시도한 후에도 IE에서 "Show friendly HTTP error messages"를 비활성화해야했습니다.
에서 의 Web.config 에서
<system.webServer>
줄을 바꾸거나 추가하십시오
<httpErrors errorMode="Detailed"></httpErrors>
와
<httpErrors existingResponse="PassThrough" errorMode="Detailed"></httpErrors>
IIS7은 기본적으로 응용 프로그램에서 생성 된 4xx 및 5xx와 같은 HTTP 상태 코드를 파이프 라인 위로 가로 채기 때문입니다.
그런 다음 "ASP"섹션에서 " 브라우저로 오류 보내기 "를 활성화 하고 " 오류 페이지 / 기능 설정 편집 "에서 "상세 오류"를 선택하십시오.
또한 웹 사이트 폴더에 대한 쓰기 권한 을 IIS_IUSRS 기본 제공 그룹에 부여하십시오.
TLDR : 먼저 파이프 라인에서 오류가 발생하는 위치를 확인하고 (오류와 유사한 화면의 스크린 샷을 스크롤하여 스크롤) 새로운 것을 가져 오기 위해 변경을 반복하십시오.
먼저 실제로 어떤 오류 메시지가 표시되는지 확인하십시오.
여기에있는 파일이 보이면 ...
% SystemDrive % \ inetpub \ custerr \\ 500.htm
... 일반적으로 다음과 같습니다.
... IIS ** 에 현재 구성된 오류 페이지가 표시되고 customErrors 설정, ASP 오류 세부 사항 설정 또는 "친숙한 HTTP 오류"브라우저 설정을 변경할 필요가 없습니다.
누군가 스크린 샷을 변경 한 경우를 대비하여 스크린 샷을 신뢰하는 대신 위의 참조 경로를보고 싶을 수도 있습니다.
"예, 위에서 설명한 오류가 보입니다 ..."
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.
- 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".
- 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.
- 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
- 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.
"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 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.
try setting the value of the "existingResponse" httpErrors attribute to "PassThrough". Mine was set at "Replace" which was causing the YSOD not to display.
<httpErrors errorMode="Detailed" existingResponse="PassThrough">
One thing nobody's mentioned is as a very quick and temporary fix, you can view the error on the localhost of that web server.
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.
Fot people who have tried EVERYTHING and just CANNOT get the error details to show, like me, it's a good idea to check the different levels of configuration. I have a config file on Website level and on Application level (inside the website) check both. Also, as it turned out, I had Detailed Errors disabled on the highest node in IIS (just underneath Start Page, it has the name that is the same as the webservers computername). Check the Error Pages there.
Found it.
관리자로 cmd를 실행하고 system32 \ inetsrv 폴더로 이동하여 다음을 실행하십시오.
appcmd.exe set config -section:system.webServer/httpErrors -allowAbsolutePathsWhenDelegated:true
이제 자세한 ASP 오류를 볼 수 있습니다.
서버에서 브라우저를 실행하고 로컬 IP로 프로젝트의 URL을 테스트하면 일반적으로 오류 페이지 (예 : 500 오류 페이지)없이 해당 프로젝트의 모든 오류가 수신됩니다.
참고 URL : https://stackoverflow.com/questions/2640526/detailed-500-error-message-asp-iis-7-5
'IT story' 카테고리의 다른 글
사용 가능한 포트를 찾는 방법은 무엇입니까? (0) | 2020.05.17 |
---|---|
Objective-C에서 절대 값으로 변환 (0) | 2020.05.17 |
테이블 열 너비 설정 (0) | 2020.05.17 |
Jquery 코드가 머리글이나 바닥 글에 들어가야합니까? (0) | 2020.05.17 |
각 사용자의 최신 레코드 날짜에 대해 SQL을 쿼리하는 방법 (0) | 2020.05.17 |