简体   繁体   English

使用WCF时拒绝访问路径

[英]Access to the path is denied while using WCF

I am getting an Access to the path is denied error message. 我收到“ Access to the path is denied错误消息。

I'm using WCF to access files inside our network (while connected to a VPN). 我正在使用WCF访问网络中的文件(同时连接到VPN)。 The File.Exist() function returns false even the file exist. File.Exist()函数即使文件存在也返回false。

Anybody knows how can I fix this? 谁知道我该如何解决? Thank you. 谢谢。

I guess a user under whom you WCF service is running has no appropriate rights. 我猜您在其下运行WCF服务的用户没有适当的权限。

For self-hosted WCF service you should check a user under whom console application or windows service is running. 对于自托管的WCF服务,您应该检查正在运行控制台应用程序或Windows服务的用户。

For IIS you should check a user under whom corresponding application pool is running. 对于IIS,您应检查正在其下运行相应应用程序池的用户。

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

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