该问题是c#组件的使用!我有一个上传文件,每次服务器重启时或重新上传相同的DLL文件上去,使用正常,但当隔不到一天时间就上传不了,也没有出错提示,原因是:以下
using Mytaoyuan.Com.Upload;UploadFileCollection collection1 = UploadHelper.GetUploadFileList("file1");
//为了得到上传文件名和同时多个上传做了一个组件处理!
this.path = this.txtpath.Text;
try
{
//服务器重启后头一两天是可以正常上传的.
//这里处理多个同时上传,好象当隔不到一天以下代码就不运行了foreach(){...}我怀疑那个处理组件有问题!
foreach (UploadFile file1 in collection1)
{
string text1 = file1.FileName;
if (text1 != "")
{
if (this.path.Substring(0, 1) == "/")
{
object[] objArray1 = new object[6] { ConfigurationSettings.AppSettings["userpath"], "/", this.Request.Cookies["username"].Value, this.path, "/", text1.Remove(0, text1.LastIndexOf(@"\") + 1) } ;
string text2 = base.Server.MapPath(string.Concat(objArray1));
file1.SaveAs(text2.ToLower());
continue;
}
string[] textArray1 = new string[5] { ConfigurationSettings.AppSettings["userpath"], "/", this.path, "/", text1.Remove(0, text1.LastIndexOf(@"\") + 1) } ;
string text5 = base.Server.MapPath(string.Concat(textArray1));
file1.SaveAs(text5.ToLower());
}
}
base.Request.ContentEncoding = Encoding.GetEncoding("GB2312");
base.Response.ContentEncoding = Encoding.GetEncoding("GB2312");
base.Response.Redirect("ContentPane.aspx?Path=" + this.path);}
catch (UnauthorizedAccessException exception1)
{
Webdisk.ReportError("上传失败!", exception1.Message, "");
}
请问以下三个问题是那个
组件问题,代码,服务器