2014-09-05 12 views
4

Mon MVC projet avait été exécuté correctement dans localhost quand je l'avais publié sur le Web, j'ai eu cette erreur,Castle.Core Niveau de confiance problème

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 Blog.Core.Bootstrapper.Start(Assembly[] assemblies) +130 Blog.MvcApplication.Application_Start() +970

J'ai lu this answer.

J'ai recompilé Castle Project avec ces instructions. J'ai supprimé Castle.Core.dll en toute sécurité dans mon projet et ajouté recompilé le Castle.Core.dll. Mais j'ai toujours la même erreur.

Que puis-je faire? Comment puis-je résoudre ce problème avec lequel j'ai lutté au cours des deux dernières semaines?

+0

sonne comme un problème IIS/réflexion pour moi. Vous devez être en pleine confiance – user3210546

+0

@ user3210546 Oui, j'ai besoin mais mon service d'hébergement ne permet pas, je devrais trouver une solution. –

Répondre

0

L'utilisateur doit trouver un fournisseur d'hébergement qui prend en charge la confiance totale. La plupart des fournisseurs qui sont sympathiques ASP.Net soutiennent la confiance totale car il n'y a aucune raison réelle de ne pas le faire.

Ceci est probablement la réponse à votre question monsieur.

0

Cela pourrait fonctionner

<system.web> 
    <trust level="Full" /> 
</system.web> 

Essayez que le web.config, acclamations

Questions connexes