Note: This method is used for website projects. However, it can be used as a reference for other types of projects. 1. Create a New ashx file, such as/System/xxx. ashx, where you want to be accessed by others. Create xxx. the ashx code is as follows: [csharp] <% @ WebHandler Language = "C #" Class = "xxx" %> using System; using System. web; public class xxx: IHttpHandler {public void ProcessRequest (HttpContext context) {context. response. contentType = "text/plain"; context. response. write ("Hello World");} public bool IsReusable {get {return false ;}} have you noticed that the Class in the first line is "xxx? "Xxx" represents a type, indicating that the processing logic of the general processing file is executed there. At this time, you should be a little curious. Can you set the Class attribute or move the "xxx" Class to another place? It is okay to tell you clearly. However, I found that for websites, placing the cs file in addition to the App_Code file cannot be identified. Therefore, a new xxx file is created in the App_Code file. cs, set xxx. the ashx Code except the first line [csharp] <% @ WebHandler Language = "C #" Class = "xxx" %> is cut to xxx. in cs, note that it is cut. Year, running normally.