在Visual Studio 2010中,当您说新项时,您可以看到Asp.NET Handler和Generic Handler。你能告诉我有什么区别吗,我认为它带有.NET 4.0,因为我无法在Google上找到相关的内容。
感谢。
答案 0 :(得分: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.”
“Generic Handler”(.ashx)是一种HTTP处理程序。通用处理程序是“default HTTP handler for all Web handlers that do not have a UI and that include the @ WebHandler directive.”