" 500内部服务器错误"在我的网站添加的HttpModule是什么时候? [英] "500 Internal Server Error" when adding HttpModule in my Website?

查看:154
本文介绍了" 500内部服务器错误"在我的网站添加的HttpModule是什么时候?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个网站(ASP.NET 2.0(C#)开发)与godaddy.com注册的有
但是,当我加入的HttpModule在我的web.config如下:

I am having a website (developed in ASP.NET 2.0 (C#)) registered with godaddy.com But when I am adding HttpModule in my web.config as follow:

<httpModules>
  <add type="WwwSubDomainModule" name="WwwSubDomainModule" />
</httpModules>

但它给了我500内部服务器错误。当我删除了上述标签,然后我的网站工作正常。任何人都可以猜测为什么它的创建这个问题?

but it gives me "500 Internal Server Error". When I removed the above tag then my website is working fine. Can anyone guess why its creating this problem??

推荐答案

明白了球员:)

我正面临2008年以来去年十月这个问题,但最后我得到了这是为什么呢?
相反,就像我在我的问题上面添加添加模块,使用IIS7(托管GoDaddy的窗户用IIS7)提出了以下新的模块语法

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!

请阅读更多关于这个标签这里<一个href=\"http://www.iis.net/ConfigReference/system.webServer/modules\">http://www.iis.net/ConfigReference/system.webServer/modules

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

这篇关于&QUOT; 500内部服务器错误&QUOT;在我的网站添加的HttpModule是什么时候?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆