.NET错误请求类型security的许可网络上共享程序集的许可 [英] .NET error Request for the permission of type securityPermission for shared assembly on network

查看:69
本文介绍了.NET错误请求类型security的许可网络上共享程序集的许可的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
    从COM应用程序运行.net程序集之一时,出现以下错误.

Hello,
      We have following error while running one of .net assembly from our COM application.

请求类型为'System.Security.Permissions.SecurityPermission,mscorlib,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089'的权限失败

Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed

基于.NET2.0和VC ++ 2008的混合模式下构建的COM应用程序,可以在各种环境下运行.但在
客户生产因上述错误而失败.尝试使用以下不同的设置和CASPOL命令,但
从共享驱动器运行时仍然会出现错误

The COM application built on mixed mode with .NET2.0 and VC++2008 and runs on various enviroments. but at
customer production fails with above error. Tried with different settings and CASPOL commands below but
still we get errors when running from SHARED drive

-注册了regasm C:\ WINDOWS \ Microsoft.NET \ Framework \ v2.0.50727> regasm/codebase \\ Machinexxx \ folder1 \\ bin \ Validation.dll

-Registered with regasm C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>regasm /codebase \\Machinexxx\folder1\\bin\Validation.dll

-完全信任.net配置管理器中的程序集.
-caspol.exe -quiet -machine -addgroup All_Code -url" \\ machine-xx01 \ folder1 \ Bin \ *" LocalIntranet
-caspol.exe -m -ag LocalIntranet_Zone -url" \\ machine-xx01 \ folder1 \ Bin \ *"; FullTrust– n FullTrustshare
...
在成功执行各种caspol命令之后,我们确实重新启动了机器,但仍在运行时
具有该DLL的应用程序,它将引发以上安全错误.

-Gave full trust to assemblies from .net configuration manager.
- caspol.exe -quiet -machine -addgroup All_Code -url "\\machine-xx01\folder1\Bin\*" LocalIntranet
- caspol.exe -m -ag LocalIntranet_Zone -url "\\machine-xx01\folder1\Bin\*" FullTrust –n FullTrustshare
...
after various caspol commands, which were successful, we did restart machine, but still when running
the application with that DLL it will throw above security error.

任何指针或帮助,深表感谢.

Any pointers or help much appreciated.

kirann,

推荐答案

Hi Kirann,

Hi Kirann,

您可以在此处找到一些解决方案:

You can find some solution here:

http://social.msdn.microsoft.com /Forums/zh-CN/clr/thread/436a125b-675a-4897-abce-624c92d7fb1c


这篇关于.NET错误请求类型security的许可网络上共享程序集的许可的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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