使用WCF从同一网络上的其他计算机读取文件 [英] Reading File from other machine on same network using WCF

查看:212
本文介绍了使用WCF从同一网络上的其他计算机读取文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在尝试从WCF服务读取文件,当我们提供放置在
上的文件的路径时 在部署服务的同一台计算机上,它可以平稳读取并将文件放置到新提供的路径中.
但是,当我们提供任何其他机器的路径时,它会给出访问错误,尽管我们有
被赋予对远程文件和文件路径的完全权限.此路径可从运行访问,但不能从
访问 WCF.谁能帮忙.

请帮忙

谢谢&问候
Hammad

we are trying to read a file from WCF Service, When we provide the path of file which is placed on the
same machine where the service is deployed it reads smoothly and place the file to new provided path.
But when we provide the path of any other machine it gives errors of access is denied, Although we have
given full permissions to the remote file and file path. this path is accessable from run but not accessable from
WCF. can any one help .

Please help

Thanks & Regards
Hammad

推荐答案

您需要确保运行WCF代码的服务具有权限.如果它托管在IIS中,则该帐户(默认情况下)是计算机帐户,并且在受严格限制的安全沙箱之外无法访问.根据所使用的IIS版本,可以将服务托管在IIS中的应用程序池"应用程序中,并为该帐户指定一个有权访问文件夹/文件的帐户.
You need to ensure that the service your WCF code is running in has permissions. If it''s hosted in IIS then the account is, by defaul, a machine account and has no access outside a very restricted security sandbox. Depending on which version of IIS you are using, you could host your service inside an Application Pool application in IIS and give that a specific account that has permissions for accessing the folder/file.


这篇关于使用WCF从同一网络上的其他计算机读取文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆