我最近构建了一个程序来解析来自 \some_server\c$\directory\file.xls 的远程文件,它在我的本地机器上运行良好,就像一个普通的 aspx 页面一样。
Then I put the program into web part form on my VM SharePoint server and I get this error: Access to the path '\some_server\c$\directory\file.xls' is denied.
文件共享给 Domain\Authenticated Users 所以我不确定为什么会被拒绝?是否有可能我的 SharePoint 正在尝试使用本地或网络服务帐户调用它?我怎样才能让它阅读?谢谢。
最佳答案
Salamander 是对的,SharePoint 并没有在信任的情况下运行以执行此操作。
在其 web.config 中将 SharePoint 的信任级别从 WSS_Medium 更改为 Full 是快速解决方案,但存在安全隐患。
关于c# - 使用 SharePoint Web 部件访问远程文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/204149/