从映射驱动器调用网络服务?
我创建了一个网络服务,它也有一个客户端(控制台应用程序)。该客户端位于映射驱动器上。调用该服务会导致 log4net dll 出错。错误是 ThrowSecurityException,它的消息是这样的(我只有德语文本,所以我必须翻译): 程序集仅允许完全值得信赖的调用者。
dll 位于与客户端exe文件位于同一目录。我在普通驱动器上进行了测试,工作正常。这里有想法吗?
I have created a webservice which also has a client (console app). This client is placed on a mapped drive. Calling the service results in an error with the log4net dll. The error is a ThrowSecurityException and the message it has is something like this (I only have the German text, so I have to translate): The assembly only allows callers which are fully trustworthy.
The dll is in the same directory as the client exe file. I tested on a normal drive and it works fine. Ideas here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试向所有人授予 dll 读取权限 http://technet.microsoft.com/ en-us/library/bb727008.aspx
您可能需要从原始位置执行此操作。
尝试将配置文件中的 securityPolicy 部分更改为:
您可以在此处阅读:http://msdn.microsoft.com/en-us/library/wyts434y.aspx
try to give the dll read permission to everyone http://technet.microsoft.com/en-us/library/bb727008.aspx
you might need to do it from the original location.
try to change the securityPolicy section in your config file to this:
you can read about it here: http://msdn.microsoft.com/en-us/library/wyts434y.aspx
您需要将
FullTrust
分配给网络驱动器(默认情况下具有LocalIntranet
)。我认为这应该与网络共享类似。请参阅使用 CasPol 完全信任共享。编辑:
或者尝试这样的操作:(
将 X 替换为您映射的驱动器盘符)
You need to assign
FullTrust
to the network drive (it hasLocalIntranet
by default). I think this should be similar as for a network share. See Using CasPol to Fully Trust a Share.Edit:
Or try something like this:
(replace X with your mapped drive letter)