WCF访问路径被拒绝 [英] WCF Access to path denied
问题描述
我使用ASP.NET调用我的WCF服务。在我的服务,我访问一个文件,但我得到这个异常:
的FaultException 1不是由用户code处理:访问路径C:\ Users \用户attilah \文档\ Visual Studio 2008的\项目\在\ ATT \ UploaderTemp \ attilah \ file1.pdf'被拒绝。
该消息是pretty的明确 - 这是试图读取该文件的过程中是不允许这样做的。
你要知道 - 当你调用WCF服务时,对文件的访问将不会根据你自己的身份作出(如主叫方) - 它会由任 ASPNET $进行如果您的WCF服务在IIS中承载,或由用户的NT服务托管WCF服务在其下运行。C $ C>或
网络系统
用户
是否有这些有限的系统帐户来访问该文件在磁盘上的服务器上?最有可能不是......
I'm using an ASP.NET to call my WCF service. in my service, I access a file but I get this exception :
FaultException '1 was not handled by user code : Access to the path 'C:\Users\attilah\Documents\Visual Studio 2008\Projects\at\att\UploaderTemp\attilah\file1.pdf' is denied.
The message is pretty clear - the process that's trying to read the file is not permitted to do so.
Mind you - when you call a WCF service, the access to the file will not be made under your own identity (as the caller) - it'll be made by either the ASPNET
or NETWORK SYSTEM
user if your WCF service is hosted in IIS, or by the user the NT Service hosting your WCF service is running under.
Does any of those limited system account have access to that file on disk on your server?? Most likely not...
这篇关于WCF访问路径被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!