Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Gordon Saxby 1444 posts 1855 karma points
    Oct 29, 2009 @ 13:51
    Gordon Saxby
    0

    Keep getting configuration errors on a live site

    We have one particular site that keeps getting the error below. It is v4.0.2.1 and has been upgraded from 4.0.0.

    The website is in the same IIS pool as 15+ other Umbraco sites of varying versions, but another 4.0.2.1 site suffers a similar problem at the same time. The last time this happened, the problem seemed to go away while I was looking into it. However, it won't go away at the moment. The hosting environment is Windows Server 2008, IIS7, SQL Server 2008 and the application pool is running in classic mode.

    Can anyone offer any ideas as to why this is happening? It doesn't seem to affect any of the other Umbraco sites that are on the same server / in the same IIS pool!?

     

     

    Server Error in '/' Application.

    Configuration Error

    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 

    Parser Error Message: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. (G:\websites\cranleighchamber\www\web.config line 84)

    Source Error: 

    Line 82:     <httpModules>
    Line 83:       <!-- URL REWRTIER -->
    Line 84:       <add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" />
    Line 85:       <add name="umbracoRequestModule" type="umbraco.presentation.requestModule" />
    Line 86:       <!-- UMBRACO -->


    Source File: G:\websites\cranleighchamber\www\web.config    Line: 84 

     


    Version Information: Microsoft .NET Framework Version:2.0.50727.4200; ASP.NET Version:2.0.50727.4016              

  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    Oct 29, 2009 @ 18:59
    Chris Houston
    0

    Hi Gordon,

    As it's saying it's a permissions I've just tried a couple of things to see if I could replicate your error with no success ( but it might help you narrow things down )

    I tried each of the following (individually):

    • Removed rights for NETWORK SERVICE to access web.config
    • Removed rights for NETWORK SERVICE to access UrlRewriting.config
    • Removed rights for NETWORK SERVICE to access UrlRewritingNet.UrlRewriter.dll

    As I mentioned above all of the above resulted in errors different to yours, so back to the drawing board. It will undoubtedly be a permissions issue of some sort. The error might well be missleading.

    Good luck!

    Cheers, Chris

  • Gordon Saxby 1444 posts 1855 karma points
    Nov 01, 2009 @ 16:57
    Gordon Saxby
    0

    This either fixed itself, or I fixed it by moving the site out of it's current Application Pool and then back into it!!

    It appears to have affected only v4.0.2.1 sites, but not v4.0.0 or v3.x ones. Again, that might be a complete red herring!!?

  • Gordon Saxby 1444 posts 1855 karma points
    Nov 02, 2009 @ 11:25
    Gordon Saxby
    0

    Well, it happened again today but this time I fixed it immediately by making a non critical change to the web.config file (just to update the file). The site started working straight away!

    Does anyone have any ideas what the problem might be?

  • Gordon Saxby 1444 posts 1855 karma points
    Nov 03, 2009 @ 02:24
    Gordon Saxby
    0

    The problem has appeared again ... I have 5 sites running version 4.0.2.1 and EVERY ONE has the problem at the same time. The other sites (4.0.0 and 3.x) continue to work fine.

    One 4.0.2.1 site is a new install, the others are upgrades, all are in the same IIS pool.

    Anyone have any ideas?

  • Gordon Saxby 1444 posts 1855 karma points
    Nov 03, 2009 @ 10:54
    Gordon Saxby
    0

    Actually, last night the main problem site had it's usual error and the others had a different error. The server was rebooted and they all started working again.

    This morning, the problem site failed again ... I opened / saved the web.config and it started working again ... !?!?

    I have used a comparison tool to ensure that the bin directory files are identical (to a clean install of 4.0.2.1) as well as the config files (except for necessary differences).

  • Rasmus Berntsen 215 posts 253 karma points c-trib
    Nov 03, 2009 @ 11:08
    Rasmus Berntsen
    0

    When you save/overwrite/touch the web.config the application is restarted, which seems to be the reason why it worked...

  • Gordon Saxby 1444 posts 1855 karma points
    Nov 03, 2009 @ 12:46
    Gordon Saxby
    0

    Yes, but restarting the website or application pool via IIS does not fix it!? It's handy to have a way of getting the site going again, but the key issue is why does it keep happening?

  • David Lees 5 posts 25 karma points
    Nov 03, 2009 @ 14:04
    David Lees
    0

    Is there a specific reason for all the sites being in the same pool? I ususally have seperate pools for each site, that way if one site goes down it doesn't take all the other sites down as well. If possible try having each site in a seperate pool and see if this makes a difference. The might be a conflict with having all the applications in one pool.

  • Gordon Saxby 1444 posts 1855 karma points
    Nov 03, 2009 @ 15:22
    Gordon Saxby
    0

    I haven't done "1 site per pool" because I was under the impression that it was resource intensive.

    It seems as though just the one site is having this specific problem - however, if I try and move that site into another application pool, whether it's a new or existing one, the site refuses to work. At the moment, it is working in the group pool!!?? Maybe I should move everything else out, leaving just this one site in the pool?

  • Gordon Saxby 1444 posts 1855 karma points
    Nov 03, 2009 @ 17:20
    Gordon Saxby
    0

    OK - I have created an application pool for each Umbraco site. All sites moved OK except for the v4.0.2.1 sites!? 

    I think I may have to look at downgrading them all to 4.0.1 :-(

  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    Nov 03, 2009 @ 19:14
    Chris Houston
    0

    Hi Gordon,

    When you move the site to it's own application pool have you been checking that the app pool is still running in classic mode?

    What error do you get if you try and run the site in it's own application pool?

    Cheers,

    Chris

  • Gordon Saxby 1444 posts 1855 karma points
    Nov 03, 2009 @ 22:05
    Gordon Saxby
    0

    I get this for a new install of v4.0.2.1 - in a new application pool (classic mode) - 

     

    Server Error in '/' Application.

    Required permissions cannot be acquired.

    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.Security.Policy.PolicyException: Required permissions cannot be acquired.

     

    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:

     

    [PolicyException: Required permissions cannot be acquired.]

       System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission) +7606579

       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 'ImageManipulation, Version=1.0.2105.41209, Culture=neutral, PublicKeyToken=null' 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 'ImageManipulation, Version=1.0.2105.41209, Culture=neutral, PublicKeyToken=null' 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.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +600

       System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +128

       System.Web.Compilation.BuildManager.CompileCodeDirectories() +265

       System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +320

     

    [HttpException (0x80004005): Could not load file or assembly 'ImageManipulation, Version=1.0.2105.41209, Culture=neutral, PublicKeyToken=null' 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 'ImageManipulation, Version=1.0.2105.41209, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]

       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8894031

       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85

       System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +259

     

     

    Version Information: Microsoft .NET Framework Version:2.0.50727.4200; ASP.NET Version:2.0.50727.4016 

  • Gordon Saxby 1444 posts 1855 karma points
    Nov 03, 2009 @ 22:07
    Gordon Saxby
    0

    I get this for the site that keeps failing (same error when it fails as when I move it to another App pool) - 

     

    Server Error in '/' Application.

    Configuration Error

    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

     

    Parser Error Message: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. (G:\websites\cranleighchamber\www\web.config line 80)

     

    Source Error:

     

    Line 78:     <httpModules>

    Line 79:       <!-- URL REWRTIER -->

    Line 80:       <add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" />

    Line 81:       <add name="umbracoRequestModule" type="umbraco.presentation.requestModule" />

    Line 82:       <!-- UMBRACO -->

     

     

    Source File: G:\websites\cranleighchamber\www\web.config    Line: 80

     

    Version Information: Microsoft .NET Framework Version:2.0.50727.4200; ASP.NET Version:2.0.50727.4016 

  • Gordon Saxby 1444 posts 1855 karma points
    Nov 04, 2009 @ 12:03
    Gordon Saxby
    0

    I moved all but 4 sites into individual application pools. The remaining 4 would not work if I moved them into a new pool, but would work immediately that I put them back into the shared pool!?

    This morning, all 4 of these sites are refusing to work at all :-(

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Nov 04, 2009 @ 13:19
    Douglas Robar
    0

    This line is, I think, the real issue...

    [HttpException (0x80004005): Could not load file or assembly
    'ImageManipulation, Version=1.0.2105.41209, Culture=neutral,
    PublicKeyToken=null' or one of its dependencies. Failed to grant
    minimum permission requests. (Exception from HRESULT: 0x80131417)]

    I suspect you're not running in full trust in all your app pools. Possibly because of a server-wide setting that was reset for some of your app pools? Possibly because of a web.config higher up the food chain, or a machine.config file, or just an IIS setting?

    This doesn't answer why it would work for a while and then die but just like file permissions (which you've triple-checked, right?) less than full trust can cause rather peculiar issues.

    Let us know what you find out.

    cheers,
    doug.

  • Gordon Saxby 1444 posts 1855 karma points
    Nov 04, 2009 @ 13:58
    Gordon Saxby
    0

    As far as I can tell, you set the Trust level at site level (in IIS) rather than Application Pool. I have put each of the troublesome websites into their own application pools and check that each site is set to Full Trust. 3 of them give the error above, the 4th gives a completely different error - the "URL REWRITER" one above.

    One site that is not working this morning I was working on last night, and it was working when I left it.

  • Gordon Saxby 1444 posts 1855 karma points
    Nov 04, 2009 @ 13:58
    Gordon Saxby
    0

    As far as I can tell, you set the Trust level at site level (in IIS) rather than Application Pool. I have put each of the troublesome websites into their own application pools and check that each site is set to Full Trust. 3 of them give the error above, the 4th gives a completely different error - the "URL REWRITER" one above.

    One site that is not working this morning I was working on last night, and it was working when I left it.

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Nov 04, 2009 @ 14:21
    Peter Dijksterhuis
    0

    Could it be a permission-problem on the temp-folder? (usually windows\temp I think?) I've seen weird behaviour when there wasn't enough permissions on that folder

    HTH,

    PeterD

  • Gordon Saxby 1444 posts 1855 karma points
    Nov 04, 2009 @ 15:08
    Gordon Saxby
    0

    Peter - the permissions haven't changed and there are 10 sites that still work fine and 4 that don't!?

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Nov 04, 2009 @ 15:39
    Peter Dijksterhuis
    0

    Not all sites do need write permissions the the temp-folder.

    If you have a basic site (only umbraco, no packages), that write permission is not necessary, so if there is no write-permission on the temp-folder then, the site won't break.

    If you have some codebehind or some package (not all packages behave the same), you might need write-permission. (Upon request, the codebehind gets precompiled in the temp-folder).

    Just a hunch, but might be worth checking the permission.

  • Gordon Saxby 1444 posts 1855 karma points
    Nov 04, 2009 @ 16:38
    Gordon Saxby
    0

    This just gets more bizarre! I asked someone else to take a look and they fixed one site by changing the Application Pool to use ApplicationPoolIdentity (from NETWORK SERVICE). I then changed it back to NETWORK SERVICE and the website continued to work!? Unfortunately, the same steps did not fix the other 3 sites :-(

Please Sign in or register to post replies

Write your reply to:

Draft