2010-03-16 101 views
18

在Visual Studio 2010中,当您说新项目时,可以看到Asp.NET处理程序和通用处理程序。你能告诉我有什么区别吗,我认为它带有.NET 4.0,因为我在Google上找不到相关的内容。Asp.NET处理程序和通用处理程序

谢谢。

回答

21

我认为你的困惑可能来自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.