![](https://img2023.cnblogs.com/blog/1151397/202311/1151397-20231111173038176-1518561759.png)
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
try
{
string action = context.Request.QueryString["action"];
if (!string.IsNullOrEmpty(action))
{
switch (action)
{
case "RPA":
HandleRPA(context);
break;
case "17track":
Handle17track(context);
break;
case "51track":
Handle51track(context);
break;
// 添加更多接口逻辑以处理其他操作参数
default:
context.Response.StatusCode = 400; // Bad Request
context.Response.Write("Invalid action");
break;
}
}
else
{
context.Response.StatusCode = 500;
context.Response.Write("Action parameter missing");
ExceptionlessManager.WriteExceptionLog("Service_TrackingMore", "Action parameter missing", null, AllProjectsKey.OrderDownLoad.ToString());
}
}
catch (Exception ex)
{
ExceptionlessManager.WriteExceptionLog("Service_TrackingMore", $"异常:{ex}", null, AllProjectsKey.OrderDownLoad.ToString());
context.Response.Write($"异常:{ex}");
}
}
![](https://img2023.cnblogs.com/blog/1151397/202311/1151397-20231111172937230-671675317.png)