开发者

how to add a httpmodule codeblock to my asp.net web app?

i have a solution with a web application that i want to creat a new http module for and cant find a way in 开发者_JAVA百科the VS2010 IDE to add a httpmodule.

im trying to right click and add new item but don't find httpmodule listed.


And HTTP Module is a class implementing IHttpModule. Just reference System.Web.dll and use System.Web namespace, implement the interface and this is everything you need!

Well, you'll need to add an entry in "modules" in your Web.config:

Do so by adding a child "httpModules" elements in system.web node:

<httpModules>
  <add name="Blah" type="Assembly qualified name of HTTP Module class [namespace.type, assembly]"/>
</httpModules>

And in system.webServer child "modules" element:

<modules>
  <add name="Blah" type="Assembly qualified name of HTTP Module class [namespace.type, assembly]"/>
</modules>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜