IIS6 가상 디렉터리 응용 프로그램으로 액세스 할 수 없습니다
-
18-09-2020 - |
문제
IIS6이있는 WINSRV2K3 상자가 VB / .NET2 사이트 중 하나입니다.이 내용에서는 가상 디렉터리를 만들었고 매우 간단한 C # /. NET3.5 사이트 디렉토리에서 그것을 가리켰습니다.나는 사이트가 정상적인 사이트로 페이지를 볼 수 있도록 (가상 디렉터리에 하나의 ASMX만이 있습니다) 브라우저에서 페이지에 액세스 할 때는 다음과 같습니다.
Server Error in '/TestVbSite' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load file or assembly 'IMSControls' or one of its dependencies. The system cannot find the file specified. (D:\sites\TestVbSite\web.config line 211)
Source Error:
Line 209: </httpHandlers>
Line 210: <httpModules>
Line 211: <add name="UrlRewritingModule" type="IMS.Controls.HttpModules.UrlRewritingModule, IMSControls" />
Line 212: </httpModules>
Line 213: </system.web>
Source File: D:\sites\TestVbSite\web.config Line: 211
.
내가 볼 수있는 문제는 예외를 던지고있는 web.config가 가상 디렉터리의 web.config가 아닌 상위 웹 사이트의 .config로 표시된다는 것입니다.그러나 나는 그 이유를 이해하지 못합니다.
웹 사이트에서 일반 페이지에 액세스 할 때 (가상 디렉터리 아래에 있지 않음) 정상적으로 렌더링하고 수행하십시오. IMSControls DLL이 가상 디렉터리에서로드 할 수 없지만 다시이 문제가 있는지 이해하지 못합니다.과정에 참여하십시오.
해결책
확인, 그럼, 거짓이 시작된 후, 무거운 Googling은 나에게 올바른 일을 찾아 보았습니다 : web.config 상속.
기본적으로, 가상 디렉터리가 부모 사이트의 web.config의 속성을 상속하는 것을 막으려면 상위 사이트의 web.config는 새로운 (나에게) 태그에 묶여있는 <system.web>
요소가 있어야합니다.:
<location path="." inheritInChildApplications="false">
<system.web>
...
</system.web>
</location>
.
유용한 링크 :
http:///forums.asp.net/t/1164283.aspx
http://dotnetslackers.com/security/re-55457_stopping_asp_net_web_config_inheritance.aspx