2010-07-21 4 views
1

WinSrv2k3 상자에 일련의 사이트를 호스팅하는 IIS6이 있으며 그 중 하나는 VB/.NET2 사이트입니다. 이 기사에서는 가상 디렉터리를 만들고 매우 간단한 C# /. NET3.5 사이트의 디렉터리를 지적했습니다.IIS6 가상 디렉터리가 응용 프로그램으로 액세스 할 수 없습니다.

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 

내가 볼 문제 : 나는 나를 (이 가상 디렉터리에 하나의 ASMX입니다)하지만 브라우저에서 페이지를 액세스 할 때, 내가 할 정상적인 사이트와 페이지를 볼 수 있도록 사이트를 기다리고 있었다 예외가 발생하는 web.config는 가상 디렉터리의 web.config가 아니라 상위 웹 사이트의 .config로 나타납니다. 그러나 나는 왜 그런지 이해하지 못한다.

웹 사이트 내에서 가상 디렉터리가 아닌 일반 페이지에 액세스 할 때 IMSControls DLL을 가상 디렉터리에서로드 할 수 없다는 것을 나타내는 일반적인 렌더링 및 수행을 수행하지만 다시 설명 할 수없는 이유는 무엇입니까? 심지어 그 과정에 참여할 수도 있습니다.

답변

0

좋아, 글쎄, 시작이 잘못되어, 검색이 어려워서 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

,

http://msdn.microsoft.com/en-us/library/ms178685.aspx

관련 문제