如何防止“访问路径.xlxs被拒绝”错误? [英] How to prevent from 'Access to the path .xlxs is denied' error?

查看:121
本文介绍了如何防止“访问路径.xlxs被拒绝”错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序中将excel和插入值上传到数据库正常工作,但是当我在iis服务器上发布时,然后在本地链接上传excel然后显示此错误访问路径.xlxs被拒绝。

in my application uploading excel and insertion values into database working properly but when I published in iis server then in local link when uploading excel then showing this error "Access to the path .xlxs is denied".

推荐答案

检查您的路径:它在开发中工作,因为服务器和客户端是同一台计算机,并且您的Web应用程序可以访问您的客户端所使用的整台计算机。



在制作中,你只限于(几乎)你网站主文件夹下面的文件夹 - 所以如果你试图访问那些以外的任何东西,它将会失败。



很抱歉,但如果没有相关的代码片段,我们就无法完全具体了。
Check your paths: it worked in development because the Server and the Client were the same computer, and your web app had access to the whole computer that your client did.

In production, you are restricted to (pretty much) only the folders below your website home folder - so if you try to access anything outside that, it will fail.

Sorry, but without the relevant code fragments we can't be at all specific.


检查您是否保存到有效的路径服务器和您的代码运行的帐户(可能是匿名用户)具有该路径的写访问权限。代码通常只具有读访问权限,您可能需要配置服务器以允许写访问。
Check that you're saving to a valid path on the server and that the account your code is running under (probably anonymous user) has write access to that path. It's usual for the code to only have read access, you might need to configure your server to allow write access.


这篇关于如何防止“访问路径.xlxs被拒绝”错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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