2013-12-09 3 views
2

IIS7이 설치된 Windows Server 2008을 새로 설치했습니다. 거기에 "클래식 ASP"를 설치하고 디버깅 옵션 "브라우저로 오류 보내기"를 True로 변경했습니다. , 아니 관리 코드 : 나는 응용 프로그램에 디렉토리를 konverted 내가 (.NET 버전을 만든 응용 프로그램 풀을 할당기본 ASP - 사용자 지정 오류 페이지

-- C:\inetpub\wwwroot\stadtbibliothek 
- index.asp -> <% Response.Write "Hello World" %> 
- 500-100.asp -> <% Response.Write "Error" %> 

:

1

나는이 개 파일 디렉토리를 생성 pipelinecode : classic).

그런 다음 원격 클라이언트 (http://svr-name.domain/stadtbibliothek/)에서 페이지를 테스트하고 "Hello World"가 표시되었습니다.

<?xml version="1.0" encoding="UTF-8"?> 
<configuration> 
    <system.webServer> 
     <defaultDocument> 
      <files> 
       <add value="index.asp" /> 
      </files> 
     </defaultDocument> 
       <httpErrors> 
        <remove statusCode="500" subStatusCode="100" /> 
        <error statusCode="500" subStatusCode="100" prefixLanguageFilePath="" path="/error.asp" responseMode="ExecuteURL" /> 
       </httpErrors> 
    </system.webServer> 
</configuration> 

:

2. 나는 index.asp 파일에 오류와 "stadtbibliothek"폴더에 web.config 파일 (없음이 루트가 없다)를 추가 솔루션 :

밝혀졌다 나는 단지 경로에 폴더 이름을 포함하는 데 필요한 :

의견을 보내 주셔서 감사합니다.

답변

1

documentation에서 :

경로 : 필수 문자열 속성을.

statusCode 및 subStatusCode 특성으로 지정된 HTTP 오류에 대한 응답으로 제공되는 파일 경로 또는 URL을 지정합니다. 파일 응답 모드를 선택하는 경우 사용자 지정 오류 페이지의 경로를 지정합니다. ExecuteURL 응답 모드를 선택한 경우 경로의 서버 상대 URL이 (예 : /404.htm)입니다. 리디렉션 응답 모드를 선택하는 경우 절대 URL을 입력해야합니다 ( 예 : www.contoso.com/404.htm). 이에

<error statusCode="500" subStatusCode="100" prefixLanguageFilePath="" path="/error.asp" responseMode="ExecuteURL" /> 

:

<error statusCode="500" subStatusCode="100" prefixLanguageFilePath="" path="/stadtbibliothek/error.asp" responseMode="ExecuteURL" /> 

에 한번이 줄을 변경

0

나는 당신이 customErrors에를해야한다고 생각 :

<?xml version="1.0" encoding="UTF-8"?> 
<configuration> 
    <system.webServer> 
    * 
    * 
    * 
    </system.webServer> 
    <system.web> 
    <customErrors mode="On"/> 
    </system.web> 
</configuration> 
관련 문제