SecurityException请求失败的反射 [英] SecurityException Request Failed Reflection

查看:191
本文介绍了SecurityException请求失败的反射的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过自动部署使用反射加载一个强大的命名程序集。加载强命名程序集的

代码在运行时编译。强大的

命名程序集将下载到下载缓存中。我可以在程序集的类中创建一个实例,并在程序中调用它的方法。当我重新加载

同一个程序集并尝试再次创建同一个类的instace时,我

收到

a SecurityException的消息请求失败。


有没有人知道这种行为?

I''m loading a strong named assembly using reflection through auto-deploy. The
code that loads the strong named assembly is compiled at runtime. The strong
named assembly gets downloaded to the Download Cache. I can create an instace
of the assembly''s class and call its methods in my program. When I re-load
the same assembly and try to create an instace of the same class again, I
recieve
a SecurityException with the message Request Failed.

Does anyone know of this behavior?

推荐答案




我们已审核此问题,目前正在研究此问题。我们将尽快更新您的b $ b。感谢您的耐心等待!


Kevin Yu

=======

此帖已提供按原样没有保证,也没有赋予

权利。

Hi

We have reviewed this issue and are currently researching on it. We will
update you ASAP. Thanks for your patience!

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."


你好,


据我所知,如果代码没有在运行时编译,它可以成功加载一个强大的命名程序集(在下载缓存中)。这是正确的吗?或者

错误只发生在第二次调用时?您是否尝试使用相同的代码加载

另一个强名称程序集?例如,你可以用一个简单的测试方法创建一个

测试程序集。


Luke

Hello,

As I understand, if the code is not compiled at runtime, it can load the a
strong named assembly (in download cache) successfully. Is this right? Or
the error only occur when it was called second time? Have you try to load
another strong named assembly with same code? for example, you can create a
test assembly only with a simple method for test.

Luke


我进一步测试了问题,这是我目前的设置。

我有一个Smartclient exe,可动态编译一个类X并运行一个

mathod X在一个单独的线程中。

X'的方法启动异步调用,在回调函数中,它尝试

来创建一个强名称的实例dll(通过使用反射.Dll是位于Web服务器中的
)。有一个安全政策设置为stong名称

,它是完全信任。


现在,

如果我运行X'的方法在同一个帖子中然后我没有得到问题和

如果我将完全信任设置为url(不是强名称),我没有

问题。如果我在X的方法中创建了这个dll的实例,我没有任何问题(但是我不能在回调函数中引用该对象) 。


" [MSFT]"写道:
I further tested problem and here is my current set up.
I have a Smartclient exe that compiles a class X dynamically and runs a
mathod of X in a separate thread.
The X''s method starts a async call and in the call back function, it tries
to create an instance of a strong named dll (by using reflection. Dll is
located in the web server). There is a security policy set for the stong name
and it is full trust.

Now,
If I run the X''s method in the same thread then I don''t get the problem and
if I set the full trust to url (not to strong name), I don''t have the
problem. If I create an instance of this dll in the X''s method, I don''t have
any problem (but then I can''t refer to the object in the call back function).

"[MSFT]" wrote:
你好,

据我所知,如果代码没有在运行时编译,它可以加载一个强大的命名程序集(在下载缓存中)成功。这是正确的吗?或者只有在第二次调用时才会出现错误?您是否尝试使用相同的代码加载另一个强名称程序集?例如,您只能使用简单的测试方法创建一个
测试组件。

Luke
Hello,

As I understand, if the code is not compiled at runtime, it can load the a
strong named assembly (in download cache) successfully. Is this right? Or
the error only occur when it was called second time? Have you try to load
another strong named assembly with same code? for example, you can create a
test assembly only with a simple method for test.

Luke



这篇关于SecurityException请求失败的反射的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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