开发者

Two HttpHandlers handling same file type

开发者 https://www.devze.com 2023-02-03 09:24 出处:网络
In my new job, they have already written an httph开发者_如何学Pythonandler to handle all the .aspx files, and they are not using asp.net\'s httphandler. Now, I want to use asp.net\'s regular .aspx htt

In my new job, they have already written an httph开发者_如何学Pythonandler to handle all the .aspx files, and they are not using asp.net's httphandler. Now, I want to use asp.net's regular .aspx httphandler for some web pages (.aspx files) in the project and the other pages need to be handled using their customized httphandler, i.e., 2 httphandlers for same file type (.aspx), how to do this?


If you place your pages in their own directory, you can remove the custom handlers and add the normal ones in a web.config file placed in the same directory.

See this document on MSDN, in particular the section about Configuration Inheritance.


Update:

Another option is to use different file extensions for the custom handler and for the normal ones and register the handlers accordingly.

0

精彩评论

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