[转] web向另一台server上传文件: access the path is denied

本文探讨了IIS中应用程序池(Application Pool)使用NetworkService身份时无法访问网络路径的问题,并提出了解决方案,即将身份更改为具有相应权限的域用户。

原文:http://stackoverflow.com/questions/10196811/directory-exists-not-working-for-a-network-path


When you run the code in IIS it runs in the identity of the Application Pool which by default is the built in user "Network Service" this is a local user account which does not have access outside the local machine.

The rights on the network share are the first layer, after that the NTFS rights on the directory are checked.

You need to change the identity of the application pool to a domain user with the same rights as your user.


web站点向另一台server上传文件时,访问无权限,可能由以下原因造成:

iis的应用程序池(Application Pool)的身份(Identity)是"Network Service", 这个本地用户是不能访问外部机器的,

因此需要把应用程序池(Application Pool)的身份(Identity)改成可访问外部网络的用户。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值