进入路径 [英] Access to the path

查看:69
本文介绍了进入路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



导出报告时出现此错误.

错误:对路径"C:\ Inetpub \ vhosts \ shoppersonlineclub.com \ site1 \ Data \ Report.xls"的访问被拒绝.

Hi

We are getting this error when we exporting report ..

Error: Access to the path ''C:\Inetpub\vhosts\shoppersonlineclub.com\site1\Data\Report.xls'' is denied.

推荐答案

就像您要写入Web服务器上的文件位置一样.该错误是不言而喻的(您无权访问该位置).但是,修复它可能很棘手.如果要尝试从Web应用程序中保存该文件,则需要确保运行应用程序池的帐户对磁盘上的该位置具有权限.但是,这可能不是您想要的.如果要将文件保存到客户端的计算机,则不是这样做.您可能希望将文件发送到客户端,而不是让服务器将文件保存到磁盘.如果是这样,请告诉我,我可以给您一些示例代码(只告诉我什么语言).

如果您尝试将文件保存在服务器上,则需要确保权限设置正确.这是一个很棒的Stack Overflow问题/答案,可以帮助您解决此问题(甚至有图片):

http://stackoverflow.com/questions/5437723/iis-apppoolidentity-和文件系统写访问权限 [ ^ ]
It looks like you are trying to write to a file location on your web server. The error is self evident (you don''t have access to that location). However, fixing it can be tricky. If you are trying to save this file from a web application, you need to make sure that the account that is running your application pool has rights to that location on the disk. However, this may not be what you are looking for. If you want to save the file to the client''s machine, this isn''t how to do it. You would want to send the file to the client, not have the server save the file to disk. If that is the case, let me know and I can give you some example code (just tell me what language).

If you are trying to save files on the server, you will need to make sure the permissions are set properly. Here is a great Stack Overflow question/answer that will help you out in this area (it even has pictures):

http://stackoverflow.com/questions/5437723/iis-apppoolidentity-and-file-system-write-access-permissions[^]


您需要确保至少Data文件夹对所有人具有写权限-或至少给您软件的适当用户.
You need to make sure that at the very least the Data folder has write permissions to everybody - or at least to the appropriate user for your software.


这篇关于进入路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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