文件上传在本地但在服务器上工作正常,显示访问被拒绝 [英] file upload working fine on local but not on server, showing access denied

查看:238
本文介绍了文件上传在本地但在服务器上工作正常,显示访问被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

拒绝访问路径'D:\INETPUB \VHOSTS \24hrslivesupport.com \ httpdocs \ Uploadfile \ Winter.jpg'。





第109行:Label1.Text = filename.ToString();

第110行:

第111行:Fileproject.SaveAs(服务器.MapPath(〜/ Uploadfile /+ filename));

第112行:// string filename1 = Path.GetFileName(FileUpload1.FileName);

第113行: lblmag.Text =上传状态:文件已上传!;



源文件:d:\inetpub \vhosts \24hrslivesupport.com \ httpdocs \ ProductControlPanel.aspx.cs行:111

Access to the path 'D:\INETPUB\VHOSTS\24hrslivesupport.com\httpdocs\Uploadfile\Winter.jpg' is denied.


Line 109: Label1.Text = filename.ToString();
Line 110:
Line 111: Fileproject.SaveAs(Server.MapPath("~/Uploadfile/" + filename));
Line 112: // string filename1 = Path.GetFileName(FileUpload1.FileName);
Line 113: lblmag.Text = "Upload status: File uploaded!";

Source File: d:\inetpub\vhosts\24hrslivesupport.com\httpdocs\ProductControlPanel.aspx.cs Line: 111

推荐答案

您的应用程序正在以对该文件夹 D:\\的写访问权限的用户身份运行\\ INETPUB \VHOSTS \24hrslivesupport.com \httpdocs \ Uploadfile \



编辑该文件夹的NTFS权限给予必要的烫发发给用户。
Your application is running as a user which does not have write access to the folder D:\INETPUB\VHOSTS\24hrslivesupport.com\httpdocs\Uploadfile\.

Edit the NTFS permissions on that folder to grant the necessary permissions to the user.


这篇关于文件上传在本地但在服务器上工作正常,显示访问被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆