首页 新闻 会员 周边

上传异常?

0
悬赏园豆:10 [已解决问题] 解决于 2010-05-28 09:38

程序在A电脑运行可以正常上传下载文件。

到了B电脑(Server)却不能上传了,提交上传文件时只是刷新一下页面?

不知道是什么问题。。是文件夹的权限问题吗?

本人现纠结中,请路人解之,very xx

部分源码:

string reName = updateTime.ToShortDateString() + "_" + rName + "_" + docType + lastName
string filePath ="/UPLOADFILES/" + id + "/" + reName;
string filePathDir = Server.MapPath("/UPLOADFILES/" + id + "/");
if (!File.Exists(filePath))
 {
  Directory.CreateDirectory(filePathDir);
  
string upfilePath = Server.MapPath("/UPLOADFILES/" + id + "/") +reName;
 myFile.PostedFile.SaveAs(upfilePath);                     
  
if (!this.InsertDocInfo(jobno, docType, reName, fileSize, updateTime, Remark,type,filePath))
          {
             Response.Write(
"<script>alert('Upload file successfully! File information written to the database failed!')</script>");
               
this.ClearLog();       
                               
发香已散的主页 发香已散 | 初学一级 | 园豆:4
提问于:2010-05-27 10:35
< >
分享
最佳答案
0

如果能操作B电脑,给上传文件夹加上相应用户的读写权限,也可以先直接加上everyone,如果可以说明是文件夹权限的问题。

收获园豆:10
Astar | 高人七级 |园豆:40805 | 2010-05-27 11:37
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册