请教.net路由问题

最近刚开始学.net 想从网上找点代码练手的,遇到个代码,有点看不明白,请大佬们指点一下:

using ServiceImpls.WebEnterprise;
using Web.ashx;
using System;
using System.Web;
using System.Web.Services;

namespace testswfupload
{
    [WebService(Namespace = "http://tempuri.org/"), WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class upload : HandlerBase
    {
        protected override void DoProcessRequest(HttpContext context)
        {
            for (int i = 0; i < context.Request.Files.Count; i++)
            {
                HttpPostedFile httpPostedFile = context.Request.Files[i];
                if (httpPostedFile != null && httpPostedFile.ContentLength != 0 && !string.IsNullOrEmpty(httpPostedFile.FileName))
                {
                    byte[] array = new byte[httpPostedFile.ContentLength];
                    httpPostedFile.InputStream.Read(array, 0, array.Length);
                    Upload(httpPostedFile.FileName);
                }
            }
        }
    }
}

这是我找的测试代码,通过upload.ashx调用

<%@ WebHandler Language="C#" CodeBehind="upload.ashx.cs" Class="testswfupload.upload" %>

我想测试一下这个代码的,但是无论怎么访问ashx页面都是空白的,我感觉像是路由没弄对导致函数没被调用,请问这种代码的话该怎么去看路由呢

阅读 832
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进