To zq_hhu(海鸥飞飞) 我已经加了ASPNET用户,并且给了他写的权限了To latahu(邋遢胡) 出现以下的错误提示:不支持给定路径的格式。
To pcuser(晚风) 我这么设也还是不对呀,我建立的是站点
machine.config中把线成模式由该machine改为system
我认为与NTFS文件系统的安全性有关倘若把文件写到FAT分区,没有问题但写到NTFS分区时,我测试用的两台机器中有一台无法写入,报错说是磁盘空间不足 There is not enough space on the disk. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.IO.IOException: There is not enough space on the disk.
To chenjiuyong(久永) 能说得具体一些么,还有就是我有vs.net自带的上传例子可以上传的,他的上传路径是/winnt/tempTo chasn(chasn) 那该如何解决这个问题呢?
UpFile.PostedFile.SaveAs("e:\\C#ASPX"+UpFile.PostedFile.FileName);试试,好像要加文件名吧
我已经加了ASPNET用户,并且给了他写的权限了To latahu(邋遢胡)
出现以下的错误提示:不支持给定路径的格式。
我这么设也还是不对呀,我建立的是站点
There is not enough space on the disk.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.IO.IOException: There is not enough space on the disk.
能说得具体一些么,还有就是我有vs.net自带的上传例子可以上传的,他的上传路径是/winnt/tempTo chasn(chasn)
那该如何解决这个问题呢?
void UploadBtn_Click(object sender,EventArgs e)
{
if (UpFile.PostedFile != null)
{
FileName.InnerHtml = UpFile.PostedFile.FileName;
FileType.InnerHtml = UpFile.PostedFile.ContentType;
FileLength.InnerHtml = UpFile.PostedFile.ContentLength.ToString();
FileDetails.Visible = true;
try{
UpFile.PostedFile.SaveAs("e:\\C#ASPX");
}
catch(Exception ex){
Response.Write(ex.Message);
}
}
}
...
抛出错误原因
错误原因如下:
对路径“e:\C#ASPX”的访问被拒绝。 我要怎么解决这个问题呢?多谢你了!
void UploadBtn_Click(object sender,EventArgs e)
{
if (UpFile.PostedFile != null)
{
FileName.InnerHtml = UpFile.PostedFile.FileName;
FileType.InnerHtml = UpFile.PostedFile.ContentType;
FileLength.InnerHtml = UpFile.PostedFile.ContentLength.ToString();
FileDetails.Visible = true;
UpFile.PostedFile.SaveAs("e:\\C#ASPX\\" + UpFile.PostedFile.FileName);
}
}
</script>类似的问题,我也遇到过!
试试看,应该没问题了,如果还有问题,请及时和我联系!
UpFile.PostedFile.SaveAs(Server.MapPath"C#ASPX");//the "C#ASPX" must existented.
简单的做法,把你要上传到的目的目录开可写共享,就可以解决问题了。
是ASPNET用户权限不够的问题。