500.19 오류가 발생하면 IIS7의 오류입니다
-
20-09-2019 - |
문제
설정 : Windows 7, IIS7. 내장 된 웹 서버가 아닌 로컬 IIS 서버를 통해 볼 수있는 앱에서 작업 중입니다. 그래서 내 앱 URL입니다 http://localhost/foo/bar.aspx
. 거기 있습니다 아니요 <customErrors>
내 web.config의 섹션이었고 IIS의 설정을 변경하지 않았습니다.
오류가 발생하면 항상 다음 오류 화면이 나타납니다.
HTTP 오류 500.19- 내부 서버 오류
절대 물리적 경로 "C:\inetpub\custerr
"허용되지 않습니다system.webServer/httpErrors
web.config 파일의 섹션. 대신 상대 경로를 사용하십시오.
여기 내 applicationhost.config
내용물:
<httpErrors errorMode="Custom" lockAttributes="allowAbsolutePathsWhenDelegated,defaultPath">
<error statusCode="401" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="401.htm" />
<error statusCode="403" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="403.htm" />
<error statusCode="404" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="404.htm" />
<error statusCode="405" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="405.htm" />
<error statusCode="406" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="406.htm" />
<error statusCode="412" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="412.htm" />
<error statusCode="500" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="500.htm" />
<error statusCode="501" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="501.htm" />
<error statusCode="502" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="502.htm" />
</httpErrors>
자세한 오류를 볼 수 있도록이 구성 오류를 제거하려면 어떻게해야합니까?
해결책
나는 지난 며칠 동안이 문제를 다루고 있으며 해결책을 찾았습니다. web.config 파일은 오류 페이지 중 하나에 대한 절대 경로를 지정할 수 있습니다. 테스트중인 응용 프로그램의 Web.config가 아닐 수 있습니다. 저에게는 웹 사이트의 web.config 파일이었습니다.
불쾌한 web.config 파일을 찾으면 절대 경로를 제거 할 수 있고 문제를 해결해야합니다.
훨씬 쉬운 해결책은 변경하는 것입니다 ApplicationHost.config 설정할 파일
allowAbsolutePathsWhenDelegated
속성true
:<httpErrors allowAbsolutePathsWhenDelegated="true" errorMode="Custom" lockAttributes="allowAbsolutePathsWhenDelegated,defaultPath">
다른 팁
도메인 컨트롤러에 Active Directory 인증서 서비스를 설치했을 때도 같은 문제가있었습니다. 둘 다 Port 443을 사용하고있었습니다. 인증서 서비스 용을 서버 IP 주소로 변경하고 Exchange 서버를 할당되지 않은 상태로 두었습니다. 그것은 내 문제를 해결했습니다.
IIS 8.5에서도 같은 문제가있었습니다. 수정은 사용자 정의 오류 페이지를 참조하는 Web.config 파일 (웹 사이트의 루트 디렉토리에 위치)의 항목을 삭제하는 것이 었습니다. 항목은 사용자 정의 페이지를 변경하려고 시도했을 때 시스템에 의해 만들어졌습니다.
이 오류를 해결하는 데 도움이 된 것은 설정입니다 allowAbsolutePathsWhenDelegated
사실.
이동 IIS> 구성 편집기> 섹션 유형 : System.WebServer/httperrors 그리고 설정 allowAbsolutePathsWhenDelegated
에게 진실. 초기화 iis 좋은 측정을 위해.