Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/258.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何查看已注册HttpHandler的集合?_C#_Visual Studio 2008_Httphandler - Fatal编程技术网

C# 如何查看已注册HttpHandler的集合?

C# 如何查看已注册HttpHandler的集合?,c#,visual-studio-2008,httphandler,C#,Visual Studio 2008,Httphandler,如何查看已注册的HttpHandler? 如何遍历已注册的HttpHandler?我想所有的处理程序都在一个集合中的某个地方,但不在哪里 using System.Configuration; using System.Web.Configuration; Configuration cfg = WebConfigurationManager.OpenWebConfiguration("/"); HttpHandlersSection hdlrs = (HttpHandlersSection)

如何查看已注册的HttpHandler? 如何遍历已注册的HttpHandler?我想所有的处理程序都在一个集合中的某个地方,但不在哪里

using System.Configuration;
using System.Web.Configuration;

Configuration cfg = WebConfigurationManager.OpenWebConfiguration("/");
HttpHandlersSection hdlrs = (HttpHandlersSection)cfg.GetSection("system.web/httpHandlers");

从这里复制:

从web应用程序,您可以使用ConfigurationManager获得一行的部分

HttpHandlersSection httpHandlers = (HttpHandlersSection)ConfigurationManager.GetSection("system.web/httpHandlers");

你能扩大一点吗?你想处理什么?httphandlers是在
Web.Config
httphandlers
部分中定义的,这就是您想要的吗?这是相同的问题吗?