在VS2010调试.NET 4.0程序的时候
加载在httpModules的程序能正常执行,但是部署到IIS7的时候,
就需要把httpModules转移到system.webServer下面的modules
<httpModules>
<add name="ClassLibrary1" type="ClassLibrary1.Class1, ClassLibrary1"/>
<add name="LoginModule" type="WebApplication4.LoginModule, WebApplication4"/>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpModules>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<remove name="ScriptModule"/>
<add name="ClassLibrary1" preCondition="managedHandler" type="ClassLibrary1.Class1, ClassLibrary1" />
<add name="LoginModule" preCondition="managedHandler" type="WebApplication4.LoginModule, WebApplication4"/>
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</modules>
要设定2个modules一个用于VS2010,一个用于部署IIS7.
而且,修改modules还会出现500.19错误
%windir%\system32\inetsrv\appcmd unlock config -section:system.webServer/modules
%windir%\system32\inetsrv\appcmd unlock config -section:system.webServer/handlers
通过运行以上命令可解决
并且 .net 4.0 的程序池必须设定为“集成”,
如果设定为“经典”
会出现
HTTP 错误 500.21 – Internal Server Error
处理程序“SimpleHandlerFactory-ISAPI-4.0_32bit”在其模块列表中有一个错误模块“IsapiModule”
具体原因还在继续学习中。
记得在MSDN看到过,忘了。
Wow, where marks the end of the year?
Who will win the Cup of European Champions Cup?
I simply want to mention I am just beginner to weblog and seriously enjoyed this web blog. Probably I’m going to bookmark your blog post . You certainly come with great writings. Bless you for sharing your web page.
One thing I’d prefer to discuss is that fat reduction plan fast can be achieved by the perfect diet and exercise. Ones size not merely affects appearance, but also the complete quality of life. Self-esteem, depressive disorders, health risks, and physical skills are damaged in putting on weight. It is possible to just make everything right and still gain. Should this happen, a problem may be the primary cause. While a lot food and never enough body exercise are usually at fault, common health conditions and widespread prescriptions could greatly amplify size. Thanks a bunch for your post right here.