.NET程序集运行在网络驱动器部分信任,但所有其他的充分信任 [英] .NET assembly runs in partial trust on a network drive, but all other in full trust

查看:214
本文介绍了.NET程序集运行在网络驱动器部分信任,但所有其他的充分信任的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个奇怪的问题,我们的C ++解决方案(它调用.NET 4.0程序集),在网络驱动器上运行时。将溶液承载几个WCF服务的同NetTcpBinding的,其中具有非缺省绑定配置之一。非默认NetTcpBinding的是本身不属于部分信任可能(见堆栈溢出问题的 <一个href="http://stackoverflow.com/questions/4734524/wcf-when-does-nettcpbinding-needs-fulltrust-on-client">When的确WCF NetTcpBinding的需要在客户端完全信任? 的),但该解决方案运行在完全受信任的网络驱动器。这并不工作在几个不同的计算机(Windows Vista和Windows 7),但未能在一(Windows Vista中)与抛出一个异常,

We have a strange issue with our C++ solution (which calls .NET 4.0 assemblies) when running on a network drive. The solution hosts several WCF services with NetTcpBinding, one of them with a non-default binding configuration. A non-default NetTcpBinding is per se not possible under partial trust (see Stack Overflow question When does WCF NetTcpBinding need full trust on the client?), but the solution runs under a fully trusted network drive. This does work on several different computers (Windows Vista and Windows 7) but fails on one (Windows Vista) with throwing an exception,

出错创造system.serviceModel /绑定配置节处理程序:该程序集不允许部分受信任的调用方。 (K:\ Somepath \ Testing.exe.Config 6号线)

An error occurred creating the configuration section handler for "system.serviceModel/bindings": That assembly does not allow partially trusted callers. (K:\Somepath\Testing.exe.Config line 6)

这个例外是完全以确定,如果解决方案将在该计算机上的部分信任确实运行,但它确实在完全信任运行。即使我为您在code完全信任这是真的。

This exception would be totaly OK, if the solution would indeed run under partial trust on that computer, but it does run under full trust. Even if I check for full trust in code it is true.

我们双重检查internet选项与它适用于一台计算机 - 无差异

We double checked the Internet options with one of the computers it works on - no differences.

所有的DLL文件和EXE文件都很强命名。

All DLL files and the EXE file are strong named.

更新: 网络驱动器是在特定的计算机(的Caspol.exe )。

Update: The network drive is under full trust on the particular computer (caspol.exe).

我们应该怎么找?

如果您需要更多信息,请让我知道。

If you need additional information, please let me know.

更新2: 我们仍然有一个问题,现在连在一台计算机以上(Windows 7)中。因此,它似乎是独立于操作系统的。

Update 2: We still have that issue and now even on one computer more (Windows 7). So it seems to be OS independent.

推荐答案

我们没有找到一个解决方案,但一个解决办法:不要使用在app.config的绑定设置。设置在code在同样的环境下为我们工作。

We didn't find a solution here but a workaround: Don't use the app.config for the binding settings. Setting them in code works for us in the same environment.

<一个href="http://stackoverflow.com/questions/6666740/wcf-hosted-in-a-windows-service-getting-security-exceptions-even-though-it-shoul">This顺便问题似乎来处理类似的问题。心连心

This question by the way seems to handle a similar issue. HTH

这篇关于.NET程序集运行在网络驱动器部分信任,但所有其他的充分信任的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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