Re: Castle Windsor under medium trust

184 views
Skip to first unread message

hammett

unread,
May 2, 2013, 9:06:00 PM5/2/13
to castle-pro...@googlegroups.com
is this the only error?

I think it's safe to remove these overrides to InitializeLifetimeService since I think they just kill the default remoting lease (rarely need, just when using windsor through remoting)


On Wed, May 1, 2013 at 12:53 PM, Allan Fagner <allan...@gmail.com> wrote:
Hi guys,

I'm new to Windsor and I'm trying to run it under medium trust. I've researched old discussion about that but did not have any luck doing what the old conversations suggest. I'm getting the following error while trying to create an new instance of WindsorContainer:

Inheritance security rules violated while overriding member: 'Castle.MicroKernel.DefaultKernel.InitializeLifetimeService()'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.


I noticed there are build options but did not understand what parameter I should be passing in in order to build a version that works on medium trust.

Can anyone help me with that?

Thanks

Allan

--
You received this message because you are subscribed to the Google Groups "Castle Project Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to castle-project-u...@googlegroups.com.
To post to this group, send email to castle-pro...@googlegroups.com.
Visit this group at http://groups.google.com/group/castle-project-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Cheers,
hammett
http://www.d-collab.com/
http://hammett.castleproject.org/

Allan Fagner

unread,
May 3, 2013, 5:33:26 PM5/3/13
to castle-pro...@googlegroups.com
hammett,

I did what you suggested and than got this error:

MethodAccessException
"Attempt by security transparent method 'Castle.Core.Internal.PermissionUtil.IsGranted(System.Security.IPermission)' to access security critical method 'System.AppDomain.get_PermissionSet()' failed."

on this line

return permissionSet.IsSubsetOf(AppDomain.CurrentDomain.PermissionSet)

of this method

PermissionUtil.IsGranted(IPermission)

Any further tip?

Em quinta-feira, 2 de maio de 2013 22h06min00s UTC-3, hammett escreveu:
is this the only error?

I think it's safe to remove these overrides to InitializeLifetimeService since I think they just kill the default remoting lease (rarely need, just when using windsor through remoting)
On Wed, May 1, 2013 at 12:53 PM, Allan Fagner <allan...@gmail.com> wrote:
Hi guys,

I'm new to Windsor and I'm trying to run it under medium trust. I've researched old discussion about that but did not have any luck doing what the old conversations suggest. I'm getting the following error while trying to create an new instance of WindsorContainer:

Inheritance security rules violated while overriding member: 'Castle.MicroKernel.DefaultKernel.InitializeLifetimeService()'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.


I noticed there are build options but did not understand what parameter I should be passing in in order to build a version that works on medium trust.

Can anyone help me with that?

Thanks

Allan

--
You received this message because you are subscribed to the Google Groups "Castle Project Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to castle-project-users+unsub...@googlegroups.com.

To post to this group, send email to castle-pro...@googlegroups.com.
Visit this group at http://groups.google.com/group/castle-project-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Allan Fagner

unread,
May 17, 2013, 10:50:54 AM5/17/13
to castle-pro...@googlegroups.com
Hi all,

Sorry push on this again but I've been struggling to run Windsor in medium trust for over a month and so far I did not have any luck. Every time I overcome a problem a new one shows up in never ending chain. I also did not find a reliable source that could help solving that. It feels like I'm fighting a battle I have lost already. I also did not find a reliable source that could.

So, if this list could not help running Windsor in medium trust I feel like I'll have to give up on it and try a different approach. Though I do not want to do that.

Could some one help me with that and give me an actual Windsor implementation that works on medium trust? I have tried every change I could think of in the source code and I'd really appreciate if I could get working code.

Thanks

hammett

unread,
May 17, 2013, 9:49:07 PM5/17/13
to castle-pro...@googlegroups.com
Starting in .net 4, all assemblies should be security transparent by
default, so they should work on medium trust - unless they do
something unsafe, in this case they need to be mixed.

Worst case scenario it needs to be APTCA and SecurityCritical, but I
had way more success not opt-in for a particular security and letting
the framework figure it out itself.
> --
> You received this message because you are subscribed to the Google Groups
> "Castle Project Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to castle-project-u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages