该问题是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, "");
}
请问以下三个问题是那个
组件问题,代码,服务器
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, "");
}
请问以下三个问题是那个
组件问题,代码,服务器
解决方案 »
- 有句代码不是太明白,求大牛解惑。
- 读取excel插入到access出错
- 513个线程的程序是什么概念?求解!
- 怎么用新线程调用方法,因为单线程窗体显示时,取cpu序号要等半分钟才能出来。
- c# udp协议 服务器端 如何获得 远程发来包的ip
- Xml 解析问题 急
- 怎么样才能从数据库中取出图片在listview中显示
- ------->关于机器人足球,绘图,文件读取,程序间的数据交流,200分 帮帮忙<-------
- 用C#如何写用TCP协议接受发送数据的SERVER/CLIENT程序
- 请问那里有vs.net2003中文版下载
- 如何表示一个类的成员方法。fun():class1 ??
- 在数据库中怎么样才能获取我选的那一行
要不就在那段代码里加一点事件记录的咚咚,再看看IIS和服务器的日志。