“500 Internal Server Error” when adding HttpModule in my Website?

假如想象 提交于 2019-12-01 17:00:26

Got it guys :)

I was facing this problem since last October 2008, but finally I got this why? Instead of adding modules like I have added above in my question, use the following new module syntax made for IIS7 (godaddy is using IIS7 for windows hosting)

<configuration>
   <system.webServer>
      <modules>
         <add name="Header" type="Contoso.ShoppingCart.Header"/>
      </modules>
   </system.webServer>
</configuration>

Place all your modules under here and you're done! It's nice and works perfect!

And "@Jon Skeet" there is no need to have namespace for modules, even without namespace you can get it work!

Do read more about this tag here http://www.iis.net/ConfigReference/system.webServer/modules

What is WwwSubDomainModule? I strongly suspect you need to specify the namespace and possibly the assembly name. If you turn verbose error logging on, it should give you more information too.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!