简体   繁体   English

文件复制到远程服务器访问错误

[英]file copy to remote server access error

I kept getting Access error on the following code: 我在以下代码上不断出现Access错误:

var fileName = "test.dgi";
var local = Path.Combine(@"C:\aaa", fileName);            
var remote = Path.Combine(@"\\sw933chipqw001\tmp\", fileName);

Error I got is: 我得到的错误是:

Access to the path '\\sw933chipqw001\\tmp\\test.dgi' is denied. 拒绝访问路径“ \\ sw933chipqw001 \\ tmp \\ test.dgi”。

I tried to give Read/Write access to IUSR, IIS_ISURS and the service account I set in the app pool. 我试图授予对IUSR,IIS_ISURS和我在应用程序池中设置的服务帐户的读/写访问权限。 nothing worked. 没有任何效果。 I'm using IIS7. 我正在使用IIS7。

But if I add " Everyone " with the Read/Write access, it works. 但是,如果我在“ 所有人 ”中添加了“读/写”访问权限,它将可以正常工作。 Anyone know what is the specific account that I need to give permission to? 有人知道我需要授予权限的特定帐户是什么吗?

Well the default account that an app pool is running in IIS7 is: 那么,在IIS7中运行应用程序池的默认帐户是:

IIS AppPool\<AppPoolName>

In your case it's probably 在您的情况下,可能是

IIS AppPool\DefaultAppPool

Here is a little bit more info. 这里是更多信息。

我只是尝试授予“已认证用户”对远程文件夹的完全控制权,所以它起作用了!

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

相关问题 将文件从内部服务器复制到IIS 7中的远程服务器 - Copy file from internal server to remote server in IIS 7 远程服务器返回错误:(550) .NET 中的文件不可用(例如,找不到文件,无法访问) - The remote server returned an error: (550) File unavailable (e.g., file not found, no access) in .NET 远程服务器返回错误:(550)文件不可用(例如,找不到文件,没有访问权限) - The remote server returned an error: (550) File unavailable (e.g., file not found, no access) 访问远程服务器以进行文件I / O - Access to remote server for File I/O 如何使用FileStream将zip文件复制到远程服务器位置? - How to copy zip file to remote server location using FileStream? 模拟用户访问远程服务器上的文件-访问被拒绝 - Impersonate user to access file on remote server - Access denied 访问远程服务器中的邮件 - Access the mail in Remote server 通过我的服务器将文件从远程服务器复制到客户端浏览器,而无需将整个文件写入磁盘或内存 - Copy file from remote server to client browser via my server without writing the entire file to disk or memory 如何在远程服务器上使用StreamReader访问和读取文件? - How to access and read file using StreamReader on remote server? 尝试访问远程服务器 IIS 网站名称时出错 - Error while trying to access the remote Server IIS WebSites Names
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM