应用程序无法使用PolicyException从网络驱动器加载 [英] Application fails to load from network drive with PolicyException

查看:174
本文介绍了应用程序无法使用PolicyException从网络驱动器加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序中,我使用了一些COM对象,只要这个应用程序在本地C驱动器上

就可以正常加载。只要我将应用程序复制到映射的网络驱动器,它就会失败

加载System.Security.Policy.PolicyException:所需的权限

无法获取。 ;

为什么会发生这种情况?

In my app I use some COM objects and as long as this app is on local C drive
it loads fine. As soon as I copy the app to a mapped network drive it fails
to load with "System.Security.Policy.PolicyException: Required permissions
cannot be acquired."
Why would that happen?

推荐答案

因为从映射驱动器运行它时,您的代码被分配给

本地内网代码组,不允许调用非托管代码。


-Valery。

http://www.harper.no/valery


" ; Maksim Chepel <毫安**** @ datacap.com>在留言中写道

新闻:%2 **************** @ tk2msftngp13.phx.gbl ...
Because when you run it from the mapped drive, your code is assigned to
local intranet code group which is not allowed to call unmanaged code.

-Valery.

http://www.harper.no/valery

"Maksim Chepel" <ma****@datacap.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
在我的应用程序我使用一些COM对象,只要这个应用程序在本地C
驱动器
它加载正常。只要我将应用程序复制到映射的网络驱动器,它就无法加载System.Security.Policy.PolicyException:无法获取所需的权限

为什么会这样?
In my app I use some COM objects and as long as this app is on local C
drive
it loads fine. As soon as I copy the app to a mapped network drive it
fails
to load with "System.Security.Policy.PolicyException: Required permissions
cannot be acquired."
Why would that happen?



那该怎么办?


Valery Pryamikov ; < Va的**** @ nospam.harper.no>在消息中写道

新闻:uz ************** @ TK2MSFTNGP12.phx.gbl ...

因为当你运行它时从映射的驱动器,您的代码被分配给

本地Intranet代码组,不允许调用非托管代码。


-Valery。

http://www.harper.no/valery

" Maksim Chepel" <毫安**** @ datacap.com>在留言中写道

新闻:%2 **************** @ tk2msftngp13.phx.gbl ...
So what to do?

"Valery Pryamikov" <Va****@nospam.harper.no> wrote in message
news:uz**************@TK2MSFTNGP12.phx.gbl...
Because when you run it from the mapped drive, your code is assigned to
local intranet code group which is not allowed to call unmanaged code.

-Valery.

http://www.harper.no/valery

"Maksim Chepel" <ma****@datacap.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
在我的应用程序我使用一些COM对象,只要这个应用程序在本地C
驱动器
它加载正常。只要我将应用程序复制到映射的网络驱动器,它就无法加载System.Security.Policy.PolicyException:无法获取所需的权限

为什么会发生这种情况?
In my app I use some COM objects and as long as this app is on local C
drive
it loads fine. As soon as I copy the app to a mapped network drive it
fails
to load with "System.Security.Policy.PolicyException: Required permissions
cannot be acquired."
Why would that happen?






您可以从本地计算机区域运行代码或使用Microsoft .Net

框架向导或配置(来自管理工具)为你的程序集提高

信任。


-Valery

http://www.harper.no/valery


" Maksim Chepel" <毫安**** @ datacap.com>在消息中写道

新闻:eT ************** @ tk2msftngp13.phx.gbl ...
You can either run your code from local computer zone or use Microsoft .Net
Framework Wizards or Configuration (from Administrative Tools) to raise
trust for your assembly.

-Valery

http://www.harper.no/valery

"Maksim Chepel" <ma****@datacap.com> wrote in message
news:eT**************@tk2msftngp13.phx.gbl...
那该怎么办?

Valery Pryamikov < Va的**** @ nospam.harper.no>在消息中写道
新闻:uz ************** @ TK2MSFTNGP12.phx.gbl ...
因为当您从映射驱动器运行它时,您的代码是分配给
本地内网代码组,不允许调用非托管代码。

-Valery。

http://www.harper.no/valery

Maksim Chepel <毫安**** @ datacap.com>在消息中写道
新闻:%2 **************** @ tk2msftngp13.phx.gbl ...
So what to do?

"Valery Pryamikov" <Va****@nospam.harper.no> wrote in message
news:uz**************@TK2MSFTNGP12.phx.gbl...
Because when you run it from the mapped drive, your code is assigned to
local intranet code group which is not allowed to call unmanaged code.

-Valery.

http://www.harper.no/valery

"Maksim Chepel" <ma****@datacap.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
在我的应用程序中我使用了一些COM对象和只要这个应用程序在本地C
驱动器
它加载正常。只要我将应用程序复制到映射的网络驱动器,它就无法加载System.Security.Policy.PolicyException:无法获取所需的
权限
。 ;
为什么会这样?
In my app I use some COM objects and as long as this app is on local C
drive
it loads fine. As soon as I copy the app to a mapped network drive it
fails
to load with "System.Security.Policy.PolicyException: Required
permissions
cannot be acquired."
Why would that happen?




这篇关于应用程序无法使用PolicyException从网络驱动器加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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