在Visual Studio 2010中,当您说新项目时,您可以看到Asp.NET处理程序和通用处理程序。你能告诉我有什么区别,我认为它是与.NET 4.0一起发现的,因为我无法在Google上找到相关的内容。
谢谢。
解决方法
我认为你的混淆可能来自Visual Studio使用的术语。
“ASP.NET处理程序”实际上是一个HTTP处理程序,它是“the process that runs in response to a request that is made to an ASP.NET Web application. The most common handler is an ASP.NET page handler that processes .aspx files. When users request an .aspx file,the request is processed by the page handler.”
“通用处理程序”(.ashx)是一种HTTP处理程序。通用处理程序是“default HTTP handler for all Web handlers that do not have a UI and that include the @ WebHandler directive.”