HttpHandler 101 FAIL

后端 未结 3 1669
醉话见心
醉话见心 2021-01-03 05:24

When I add an HTTP handler:


With the class:

using System;
usin         


        
3条回答
  •  难免孤独
    2021-01-03 05:51

    I guess you are using a web site project in contrast of web application project. In this case you need to put the code behind file of your handler (Handler.cs) in the special App_Code folder. The markup file (Handler.ashx) may be at the root of your site:

    <%@ WebHandler Language="C#" Class="Handler" CodeBehind="Handler.cs" %>
    

    Then you can directly declare your handler in web.config:

    
    

提交回复
热议问题