在工作中遇到执行 C# 写的程序 出现以下错误,并解决
其 我的程序是通过 首先映射网络驱动盘 Z,让后有灵一个程序来执行这个 Z 盘程序所出现的错误。
************** 异常文本 **************
System.Security.SecurityException: 请求失败。
在 System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
在 System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
在 System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Object assemblyOrString, SecurityAction action, Boolean throwException)
在 System.Security.CodeAccessSecurityEngine.CheckSetHelper(CompressedStack cs, PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Assembly asm, SecurityAction action)
在 Iris_2PP.Form1.runBusiness()
在 Iris_2PP.Form1.connect()
在 Iris_2PP.Form1.Form1_Load(Object sender, EventArgs e)
在 System.Windows.Forms.Form.OnLoad(EventArgs e)
在 System.Windows.Forms.Form.OnCreateControl()
在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
在 System.Windows.Forms.Control.CreateControl()
在 System.Windows.Forms.Control.WmShowWindow(Message& m)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ScrollableControl.WndProc(Message& m)
在 System.Windows.Forms.ContainerControl.WndProc(Message& m)
在 System.Windows.Forms.Form.WmShowWindow(Message& m)
在 System.Windows.Forms.Form.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
失败的操作是:
LinkDemand
失败的第一个权限的类型是:
System.Security.PermissionSet
失败的程序集的区域是:
Intranet
图示效果:
分析: 造成该原因的一种是用户使用 域账号登陆的,起.net framework 没有将权限放开。
解决: 计算机 开始--》运行——> 输入以下命令 即可
cd c:\windows\Microsoft.NET\Framework\v2.0.50727
caspol -polchgprompt off -chggroup 1.2 FullTrust
caspol -polchgprompt off -chggroup 1.3 FullTrust
caspol -polchggrompt off -chggroup 1 FullTrust
通过上面程序就将.net framework 权限放开.具体关于.net framework 安全权限策略问题可以参考 http://wenku.baidu.com/view/6e4cd05abe23482fb4da4c91.html
- 大小: 12.1 KB
分享到:
相关推荐
在与银联的对接中,调试过程中报错或使用类似登入加密:java.lang.SecurityException: JCE cannot authenticate the provider BC 进行问题解决,里面包含 bcprov-jdk16-143.jar与bcprov-jdk15-135.jar与具体文件存放...
NULL 博文链接:https://duanfei.iteye.com/blog/2437258
NULL 博文链接:https://lwpsoft.iteye.com/blog/2254348
05-27 15:35:11.487 E/AndroidRuntime( 2352): java.lang.RuntimeException: Unable to create service com.android.systemui.keyguard.KeyguardService: java.lang.SecurityException: read wallpaper: Neither ...
org.bouncycastle.openssl.PEMException: problem parsing ENCRYPTED PRIVATE KEY: java.lang.SecurityException: JCE cannot authenticate the provider BC at org.bouncycastle.openssl.PEMReader$...
Android Media...1、解决Android Q中java.lang.SecurityException: Media projections require a foreground service of type ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION 异常 2、targetSdk 32可用
Neo4j Java Reference 3.0
Android Caused by: java.lang.ClassNotFoundException解决办法 出现问题: 08-13 18:29:22.924: E/AndroidRuntime(1875): Caused by: Java.lang.ClassNotFoundException:XXXXX in loader dalvik.system....
java.lang.SecurityException: class "org.apache.commons.collections.SequencedHashMap"'s signer information does not match signer information of other classes in the same package at java.lang....
J2ee直接访问数据库步骤
Android5.0之后,利用MediaProjection实现录屏功能。
System.Security.SecurityException:“未找到源,但未能搜索某些或全部事件日志。 不可访问的日志: Security 需要判断当前是否已经存在日志,下面我来创建一个事件叫 “德熙” if (EventLog.SourceExists("德熙"))...
很多资源下载下来的jar会导致邮件发送运行报错,此处所提供的jar包经过代码实验!
1980-2005年 全国各省经济数据,好数据的啊,请下载,各位网友
让我们玩意式浓缩咖啡这是一个简单的项目,我在这里进行了一些Espresso测试有关更多详细信息,请访问 让我们了解为什么会有这种失败以及如何解决它们: 问题视图下方标有“ MATCHES ”。 引起原因:android.support....
SecurityException 21 3.4 安全策略 22 3.5 CodeSource 24 3.5.1 测试等同性和利用隐含 25 3.6 许可权层次 26 3.6.1 java.security.Permission 27 3.6.2 许可权集合 28 3.6.3 java.security.Unresolved Permission...
SecurityException 21 3.4 安全策略 22 3.5 CodeSource 24 3.5.1 测试等同性和利用隐含 25 3.6 许可权层次 26 3.6.1 java.security.Permission 27 3.6.2 许可权集合 28 3.6.3 java.security.Unresolved Permission...
如果需要在别的package中引用aidl,需要保证A程序与B程序的AIDL文件要完全一致,包名和路径都要一致,不然会导致 binder invocation to an incorrect interface异常。 service是android可以在后台运行的机制。如果...
百度lbs定位jar包 解决使用2.6的jar包时部分机型报错 E/AndroidRuntime(5032): java.lang.SecurityException: Not allowed to bind to service Intent { act=com.baidu.location.service_v2.6 } 更换2.6.c的jar包