Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7884961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:56:21+00:00 2026-06-03T04:56:21+00:00

I am developing an asp.net 3.5 web application which is running perfectly on my

  • 0

I am developing an asp.net 3.5 web application which is running perfectly on my local IIS server but gets me into a lot of trouble when publishing it to a hosted (1and1) environment.

When the web.config is loaded an “System.Security.Policy.PolicyException: Required permissions cannot be acquired.” exception is thrown. The stack trace indicates that this is caused by my using of the Castle.Windsor framework:

[PolicyException: Required permissions cannot be acquired.]
System.Security.SecurityManager.ResolvePolicy(Evidence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Boolean checkExecutionPermission) +7606231
System.Security.SecurityManager.ResolvePolicy(Evidence evidence,
PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset,
PermissionSet& denied, Int32& securitySpecialFlags, Boolean
checkExecutionPermission) +57

[FileLoadException: Could not load file or assembly ‘Castle.Windsor,
Version=3.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc’ or
one of its dependencies. Failed to grant minimum permission requests.
(Exception from HRESULT: 0x80131417)]
System.Reflection.Assembly._nLoad(AssemblyName fileName, String
codeBase, Evidence assemblySecurity, Assembly locationHint,
StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean
forIntrospection) +0 System.Reflection.Assembly.nLoad(AssemblyName
fileName, String codeBase, Evidence assemblySecurity, Assembly
locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound,
Boolean forIntrospection) +43
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection) +127
System.Reflection.Assembly.InternalLoad(String assemblyString,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection) +142 System.Reflection.Assembly.Load(String
assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String
assemblyName, Boolean starDirective) +46

[ConfigurationErrorsException: Could not load file or assembly
‘Castle.Windsor, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=407dd0808d44fbdc’ or one of its dependencies. Failed to
grant minimum permission requests. (Exception from HRESULT:
0x80131417)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String
assemblyName, Boolean starDirective) +613
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory()
+203 System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo
ai) +105
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection
compConfig) +178
System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath
configPath, Boolean supportLocalization, String outputAssemblyName)
+54 System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean
isPrecompiledApp) +232
System.Web.Compilation.BuildManager.CompileGlobalAsax() +51
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +337

[HttpException (0x80004005): Could not load file or assembly
‘Castle.Windsor, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=407dd0808d44fbdc’ or one of its dependencies. Failed to
grant minimum permission requests. (Exception from HRESULT:
0x80131417)]
System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()
+58 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +512
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager
appManager, IApplicationHost appHost, IConfigMapPathFactory
configMapPathFactory, HostingEnvironmentParameters hostingParameters)
+729

[HttpException (0x80004005): Could not load file or assembly
‘Castle.Windsor, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=407dd0808d44fbdc’ or one of its dependencies. Failed to
grant minimum permission requests. (Exception from HRESULT:
0x80131417)] System.Web.HttpRuntime.FirstRequestInit(HttpContext
context) +8921851
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
wr, HttpContext context) +333

I am pretty limited in investigate this problem due to the hosted environment restrictions – specifically I am unable to review the the machine.config and the IIS configuration. The one fact I know for sure is that it is running on a 2.0.50727.5456 framework… The hosters customer service is neither competent nor willing to help so I have to do it on my own.

Any suggestions how to take a deeper look into the causes or how to simply resolve this is really appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:56:22+00:00Added an answer on June 3, 2026 at 4:56 am

    I found out that 1&1 uses a general medium trust-level for all hosted asp.net applications. It strongly seems that Castle Windsor is not able to run under such an permission-restricted environment (for instance reflection is not available there).

    Fortunately there are a lot of alternatives (see which-ioc-runs-in-medium-trust) which can be used under such circumstances. I simply used simple injector which is a tiny (but for my purposes powerful-enough) IoC container and it does a great job and solved all my permission-problems.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing an ASP.NET web application at work, and I keep running into
I am developing an ASP.NET web application that sends a request to another server
I have a project (Web Application) which I have been developing in C#/ASP.NET, and
I'm developing a web application using asp.net. There is a text box which contains
I am developing a web Application in ASP.NET 3.5 with SQL Server 2008. I
I'm developing an ASP.NET application which needs Windows Authentication. I have the web.config set
I'm developing a ASP.NET Web application in which a table is converted to an
We are currently developing a web application in ASP.NET MVC which would really benefit
I'm developing a web application in asp.net c#, which has a URL like this...
We are developing an ASP.NET Web Forms application with REST modelled URL, for which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.