Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Inheritance security rules violated while overriding member: 'Castle.MicroKernel.DefaultKernel.InitializeLifetimeService()'
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ryan Rahlf  
View profile   Translate to Translated (View Original)
 More options Oct 25 2012, 2:44 pm
From: Ryan Rahlf <ryan.ra...@gmail.com>
Date: Thu, 25 Oct 2012 11:44:57 -0700 (PDT)
Local: Thurs, Oct 25 2012 2:44 pm
Subject: Re: Inheritance security rules violated while overriding member: 'Castle.MicroKernel.DefaultKernel.InitializeLifetimeService()'

I'm seeing this same issue on a project built with Sharp Architecture which
uses Castle and NHibernate.  It looks like I'm chasing through the same
hoops you are.  I found this thread to have some direction, but I'm not
sure how to actually apply this info.
http://social.msdn.microsoft.com/Forums/en-US/netfxgeneralprerelease/...

The error seems to indicate that some virtual method override is causing a
security level change from the original implementation of the method.  I
had read a post that indicated this might be due to the castle proxy
implementation or have something to do with needing to enable lazy loading
on all entity classes.  I'm still not sure if either of those solutions are
correct, or how to implement them, but I'll post if I find something.

On Wednesday, October 17, 2012 4:32:29 AM UTC-5, aozora wrote:

> I've deployed a asp.net mvc 3 project wich use castle.core & windsor, but
> running on my hosting (in shared hosting) I got this:
> 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.

> Description: An unhandled exception occurred during the execution of the
> current web request. Please review the stack trace for more information
> about the error and where it originated in the code.

> Exception Details: System.TypeLoadException: 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.

> Source Error:

> An unhandled exception was generated during the execution of the current
> web request. Information regarding the origin and location of the exception
> can be identified using the exception stack trace below.

> Stack Trace:

> [TypeLoadException: 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.]
>    Castle.Windsor.WindsorContainer..ctor() +0
>    MyProj.Framework.Web.Core.App_Start.Bootstrapper.InitializeIoC() in
> PreApplicationStart.cs:98
>    MyProj.Framework.Web.Core.App_Start.Bootstrapper.PreApplicationStart()
> in PreApplicationStart.cs:70

> [TargetInvocationException: Exception has been thrown by the target of an
> invocation.]
>    System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method,
> Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes
> methodAttributes, RuntimeType typeOwner) +0
>    System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method,
> Object target, Object[] arguments, Signature sig, MethodAttributes
> methodAttributes, RuntimeType typeOwner) +72
>    System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
> invokeAttr, Binder binder, Object[] parameters, CultureInfo culture,
> Boolean skipVisibilityChecks) +335
>    System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
> invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +28
>    WebActivator.BaseActivationMethodAttribute.InvokeMethod() +78
>    WebActivator.ActivationManager.RunActivationMethods() +348
>    WebActivator.ActivationManager.Run() +22

> [InvalidOperationException: The pre-application start initialization
> method Run on type WebActivator.ActivationManager threw an exception with
> the following error message: Exception has been thrown by the target of an
> invocation..]

>  System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1
> methods) +423
>    System.Web.Compilation.BuildManager.CallPreStartInitMethods() +306
>    System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager
> appManager, IApplicationHost appHost, IConfigMapPathFactory
> configMapPathFactory, HostingEnvironmentParameters hostingParameters,
> PolicyLevel policyLevel, Exception appDomainCreationException) +677

> [HttpException (0x80004005): The pre-application start initialization
> method Run on type WebActivator.ActivationManager threw an exception with
> the following error message: Exception has been thrown by the target of an
> invocation..]
>    System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9090876
>    System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97

>  System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
> wr, HttpContext context) +256

> On the Castle bugtracker I found this:
> http://issues.castleproject.org/issue/IOC-233?projectKey=IOC&query=In...
> but is 2 year old and seems to be resolved...

> Please help, any ideas?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.