이 문제에 대한 모순 된 조언을 통해 많은 시간을 들여 내 솔루션을 게시 할 것입니다..NET 4.5에서 HttpModule이 호출되지 않았습니다.
내 환경은 MVC 4 응용 프로그램에서 작동하는 .NET 4.5, Visual Studio 2012입니다. 내가 과거에했던 것처럼하는 HTTP 모듈을 생성하고, 그렇게 같이의 Web.config에 추가 :
<configuration>
<system.web>
<httpModules>
<add name="MyModule" type="Services.MyModule, Services" />
</httpModules>
</system.web>
</configuration>
그러나, 응용 프로그램 모듈의 초기화를 호출되지 않습니다().
<configuration>
<system.webServer>
<modules>
<add name="MyModule" type="MyModule" type="Services.MyModule, Services" />
</modules>
</system.webServer>
</configuration>
응용 프로그램을 재-달리고, 예상대로() 초기화라고 : 결국, 난과 같이, 모듈 대신 <system.webServer>
내부해야한다는 조언, 대신 <httpModules>
의 <modules>
라는 이름의 요소를 발견했다. FWIW, 방향과 현재 페이지이다 http://msdn.microsoft.com/en-us/library/ms227673.aspx
HTH
: 하나의 질문과 답변 – cheesemacfly
<줄을 추가 할 때는 두 가지 유형을 사용할 수 없습니다. 그것은 구문이 틀리며 컴파일되지 않습니다. 나는 이것이 심지어 작동했기 때문에 놀랐다 – Fandango68