得到的HttpContext注册HttpHandlers的在web.config [英] Get Registered HttpHandlers in the Web.Config from HttpContext
本文介绍了得到的HttpContext注册HttpHandlers的在web.config的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法让类型从当前的HttpContext
或网络注册的IHttpHandler
取值。配置?
Is there a way to get the types of the registered IHttpHandler
s from a current HttpContext
or the web.config?
我想看看我的的HttpHandler
在web.config登记从的WebControl
。
I'm trying to see if my HttpHandler
is registered in the web.config from a WebControl
.
推荐答案
您可以得到这样注册的HttpHandler
期从web.config中的列表:
You can get the list of registered HttpHandler
s from web.config this way:
using System.Configuration;
using System.Web.Configuration;
Configuration cfg = WebConfigurationManager.OpenWebConfiguration("/");
HttpHandlersSection hdlrs = (HttpHandlersSection)cfg.GetSection("system.web/httpHandlers");
这篇关于得到的HttpContext注册HttpHandlers的在web.config的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文