2009-11-15 3 views
17

.aspx 페이지를 실행할 때 다음과 같은 오류가 발생합니다.URL 재 작성 - web.config 오류

이 섹션 선언

없기 때문에 오류 Code0x8007000d 구성 섹션 '재 작성'나는 다음과 같은 코드가 간단한 v.aspx 페이지가 읽을 수없는

:

을 Response.Write을 (요청 ("Q")는)

내 호스팅 서버 (그들이 주장 무엇 그건) (7)이 활성화 URL 재 작성 기능과 함께 설치 IIS와 같은

참고 : 내 web.config 파일은 아래에 다음 줄이있는 노드는 I에 유래를 검색했지만 해결책을 찾지 못했습니다

<rewrite> 
     <rules> 
     <rule name="RewriteUserFriendlyURL1" stopProcessing="true"> 
      <match url="^([^/]+)/?$" /> 
      <conditions> 
      <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> 
      <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> 
      </conditions> 
      <action type="Rewrite" url="v.aspx?q={R:1}" /> 
     </rule> 
     </rules> 
    </rewrite> 

에서 블루 구불 구불 한 라인을 가지고있다.

누군가 해결책이 될 수 있습니다.

TIA

답변

27

가 있는지 확인하여 <rewrite><system.webServer></system.webServer> 섹션에 묶여 있습니다.

<configuration> 
    <system.webServer> 
     <rewrite> 
      <rules> 
      <rule name="RewriteUserFriendlyURL1" stopProcessing="true"> 
      <match url="^([^/]+)/?$" /> 
      <conditions> 
       <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> 
       <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> 
       </conditions> 
       <action type="Rewrite" url="v.aspx?q={R:1}" /> 
      </rule> 
      </rules> 
     </rewrite> 
    </system.webServer> 
</configuration> 
+2

섹션으로 묶습니다. –

3

system.webServer의 다시 쓰기 섹션은 IIS7에서 지원되지만 IIS6에서는 지원되지 않습니다. 이 오류는 IIS6 만 실행중인 서버에이 사이트를 배포하여 발생했을 가능성이 큽니다.

+0

IIS8에서도이 문제가 발생했습니다. 설치를하면 문제가 해결되었습니다. – Kai

16

URL 재 작성 모듈 http://www.iis.net/download/URLRewrite을 설치하고 정렬해야합니다. 내 문제가 해결되었습니다.

+0

내 고침도 고마워! – Scott

+2

나를 위해 일했지만 웹 플랫폼 설치 프로그램을 사용하여 추가했습니다. – Kieran

+0

다운로드 URL이 제거되었으므로 여기에서 다운로드 할 수 있습니다. https://www.microsoft.com/en-eg/download/confirmation.aspx? id = 7435 –