Re: SecurityException "Request Failed"

From: VJ (anonymous_at_discussions.microsoft.com)
Date: 07/30/04

  • Next message: Dmitrii Zakharov [MSFT]: "RE: LogonUser failed with error code : 1314 [After explicitly giving T"
    Date: Fri, 30 Jul 2004 10:34:00 -0700
    
    

    Thanks for taking the time to reproduce the problem.

    First, my Partially trusted assembly(PTA) is strong named.
    I've tried making my best guesses as to what the
    permissions needed are, but haven't been able to figure it
    out. I can say it is definitely a CAS issue, as when I
    assert full permissions, the call goes through.

    W/o giving away too much ;) I have a library A that is
    locally installed and is used by applications that may be
    PTA in certain scenarios (application is downloaded etc).
    In the library, I attempt to instantiate classes in the
    PTA based on some criteria (I walk through the types in
    the PTA and check for criteria) upon initialization.

    >-----Original Message-----
    >Unfortunately, I can reproduce the problem just fine, and
    it definitely runs
    >counter to the available documentation on the permissions
    that are supposed
    >to be required for this sort of invocation via
    reflection. I'll try to play
    >with it a bit more to see if I can narrow down the
    problem a bit. However,
    >in case it's not possible to make the problem without
    unrestricted
    >permissions, perhaps it might be best if you could
    describe what exactly it
    >is you are trying to do. Maybe someone can suggest an
    alternative that
    >wouldn't require reflection at all...
    >
    >
    >
    >"VJ" <anonymous@discussions.microsoft.com> wrote in
    message
    >news:493201c4735d$475349d0$a501280a@phx.gbl...
    >> Yes, and yes :(
    >>
    >>>-----Original Message-----
    >>>Do either or both of the following scenarios work?
    >>>
    >>>1. Call c() from b() without using reflection.
    >>>2. Call c() from b() using reflection, but with c()
    >> being launched directly
    >>>(not via reflection) from other fully trusted code
    >> instead of from a().
    >>>
    >>>
    >>>
    >>>"VJ" <anonymous@discussions.microsoft.com> wrote in
    >> message
    >>>news:44b901c47336$543898c0$a401280a@phx.gbl...
    >>>> The calling assembly does have full trust. But the
    call
    >> is
    >>>> part of a stack frame that has the partially trusted
    >>>> assembly higher up in the call sequence . In other
    >> words,
    >>>> the method that is asserting the permissions is being
    >>>> called by the partially trusted assembly, and this
    >> method
    >>>> in turn is trying to invoke a method of another class
    in
    >>>> the partially trusted assembly.
    >>>>
    >>>> eg:
    >>>> a() calls b() calls c()
    >>>>
    >>>> Both a() and c() are in the partially trusted
    assembly.
    >>>> b() is the method that is asserting the permissions.
    >>>>
    >>>> The type and methods being called are all public.
    >>>>
    >>>> VJ
    >>>>
    >>>>>-----Original Message-----
    >>>>>"VJ" <anonymous@discussions.microsoft.com> wrote in
    >>>> message
    >>>>>news:3c0d01c472b9$2a619150$a601280a@phx.gbl...
    >>>>>> The method that is making the call has Unrestricted
    >>>>>> reflection permission asserted. Any idea why this
    >> fails.
    >>>>>
    >>>>>If the calling assembly has full trust, there should
    be
    >>>> no need to assert
    >>>>>reflection permissions. The most likely reason for
    the
    >>>> failure is that the
    >>>>>callee requires some permission that is not
    >> automatically
    >>>> granted to fully
    >>>>>trusted code. Did you author the callee code? What's
    >>>> the accessibility
    >>>>>level on the classes and methods you're attempting to
    >>>> call? Can you call
    >>>>>them successfully without using reflection?
    >>>>>
    >>>>>
    >>>>>.
    >>>>>
    >>>
    >>>
    >>>.
    >>>
    >
    >
    >.
    >


  • Next message: Dmitrii Zakharov [MSFT]: "RE: LogonUser failed with error code : 1314 [After explicitly giving T"

    Relevant Pages

    • Re: SecurityException "Request Failed"
      ... > Thanks for taking the time to reproduce the problem. ... > assert full permissions, the call goes through. ... > PTA in certain scenarios. ... >>wouldn't require reflection at all... ...
      (microsoft.public.dotnet.security)
    • Re: SecurityException "Request Failed"
      ... Your PTA is strongly named, which means that it needs the ... Reflection turns ... > assert full permissions, the call goes through. ... > the PTA and check for criteria) upon initialization. ...
      (microsoft.public.dotnet.security)
    • Re: SecurityException "Request Failed"
      ... >Your PTA is strongly named, which means that it needs the ... Reflection turns ... >> assert full permissions, the call goes through. ... >> the PTA and check for criteria) upon initialization. ...
      (microsoft.public.dotnet.security)
    • Re: SecurityException "Request Failed"
      ... What I found was that the documented permissions for the reflection ... necessary to invoke a strongly named assembly in this way, ...
      (microsoft.public.dotnet.security)
    • Re: SecurityException "Request Failed"
      ... Call cfrom bwithout using reflection. ... from other fully trusted code instead of from a. ... > bis the method that is asserting the permissions. ...
      (microsoft.public.dotnet.security)