简体   繁体   English

如何防止“访问路径 .xlxs 被拒绝”错误?

[英]How to prevent the 'Access to the path .xlxs is denied' error?

In my application i can upload to Excel and insert values into a database correctly.在我的应用程序中,我可以上传到 Excel 并将值正确插入到数据库中。
But when I published my application on an IIS Server, when uploading to Excel it's showing the following error:但是当我在 IIS 服务器上发布我的应用程序时,上传到 Excel 时它显示以下错误:

"Access to the path .xlsx is denied". “访问路径 .xlsx 被拒绝”。

You need to give the users permission to write / execute files to the specified folder:您需要授予用户将文件写入/执行到指定文件夹的权限:

In ISS Manager just rightclick the folder you want to save the file.在 ISS Manager 中,只需右键单击要保存文件的文件夹。

After that, you can click "edit permissions..." and there you need to find the Security Tab with the User / Groups.之后,您可以单击“编辑权限...”,然后您需要找到包含用户/组的安全选项卡。

Find the user you want to give permission to and save it afterwards.找到您要授予权限的用户,然后保存。

Than restart your IIS WebSite and test it.然后重新启动您的 IIS 网站并对其进行测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM