我能够让一切正常工作,我只想回复更新的代码.我使用了Darin Dimitrov关于使用单独的通用http处理程序来处理文件上传的建议,所以这就是我提出的代码...如果您有疑问,请告诉我.
<%@ WebHandler Language="C#" Class="Upload" %>
using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Net;
using System.Web;
public class Upload : IHttpHandler {
public void ProcessRequest(HttpContext context) {
/**
* If 'newTicket' is "false", then the directory to upload to already exists and we can extract it from
* the 'ticketID' POST parameter.
*
* If 'newTicket' is "true", then this is a new Ticket submission so we need to work with a NEW directory …Run Code Online (Sandbox Code Playgroud)