C# 未调用IHttpModule
在我的程序中,我需要检查每个请求,如果url中有语言参数,则需要获取它并保存在会话中。这是我的密码。在VS2010开发服务器中,一切正常。但是,当我尝试在IIS 7中调试时,public void InitHttpApplication上下文方法没有得到调用。有什么想法吗 R.C Web.configC# 未调用IHttpModule,c#,asp.net,.net,C#,Asp.net,.net,在我的程序中,我需要检查每个请求,如果url中有语言参数,则需要获取它并保存在会话中。这是我的密码。在VS2010开发服务器中,一切正常。但是,当我尝试在IIS 7中调试时,public void InitHttpApplication上下文方法没有得到调用。有什么想法吗 R.C Web.config 试试这个,对我有用 <configuration> <system.web> <globalization uiCulture="auto" cultu
试试这个,对我有用
<configuration>
<system.web>
<globalization uiCulture="auto" culture="auto" enableClientBasedCulture="true"/>
<httpModules>
<add name="Globalizer" type="Globalizer" />
</httpModules>
<compilation debug="true" targetFramework="4.0"/>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name = "Globalizer" type="Globalizer"/>
</modules>
<validation validateIntegratedModeConfiguration="false"/>
</system.webServer>
</configuration>
<configuration>
<system.web>
<globalization uiCulture="auto" culture="auto" enableClientBasedCulture="true"/>
<httpModules>
<add name="LanguageSettingModule" type="Globalizer, App_Code" />
</httpModules>
<compilation debug="true" targetFramework="4.0"/>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<validation validateIntegratedModeConfiguration="false"/>
</system.webServer>
</configuration>
<configuration>
<system.web>
<globalization uiCulture="auto" culture="auto" enableClientBasedCulture="true"/>
<httpModules>
<add name="Globalizer" type="Globalizer" />
</httpModules>
<compilation debug="true" targetFramework="4.0"/>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name = "Globalizer" type="Globalizer"/>
</modules>
<validation validateIntegratedModeConfiguration="false"/>
</system.webServer>
</configuration>