U4-7254 - YSOD error upgrading 7.2.8 to 7.3.0: Attempt by security transparent method 'System.Web.Webpages...'

Created by Eric Schrepel 15 Oct 2015, 01:12:00 Updated by Sebastiaan Janssen 15 Oct 2015, 12:12:55

We usually upgrade manually using the general install instructions (copy /bin, /umbraco, /umbraco_client, compared all configs & global.asax). Did that this time, plus followed the version-specific 7.3.0 instructions about removing various .dll's from /bin.

Got the following error when trying to re-start the site and continue the install. I've tried to see if there are other things we were supposed to do ahead of this install to make sure the MVC5 stuff worked, but I'm uncertain what those steps are.

Error:

Server Error in '/' Application.

Attempt by security transparent method 'System.Web.WebPages.Administration.SiteAdmin.RegisterAdminModule()' to access security critical method 'System.Web.WebPages.ApplicationPart..ctor(System.Reflection.Assembly, System.String)' failed.

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.MethodAccessException: Attempt by security transparent method 'System.Web.WebPages.Administration.SiteAdmin.RegisterAdminModule()' to access security critical method 'System.Web.WebPages.ApplicationPart..ctor(System.Reflection.Assembly, System.String)' failed.

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:

[MethodAccessException: Attempt by security transparent method 'System.Web.WebPages.Administration.SiteAdmin.RegisterAdminModule()' to access security critical method 'System.Web.WebPages.ApplicationPart..ctor(System.Reflection.Assembly, System.String)' failed.] System.Web.WebPages.Administration.SiteAdmin.RegisterAdminModule() +62

[InvalidOperationException: The pre-application start initialization method Start on type System.Web.WebPages.Administration.PreApplicationStartCode threw an exception with the following error message: Attempt by security transparent method 'System.Web.WebPages.Administration.SiteAdmin.RegisterAdminModule()' to access security critical method 'System.Web.WebPages.ApplicationPart..ctor(System.Reflection.Assembly, System.String)' failed..] System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection1 methods, Func1 setHostingEnvironmentCultures) +12619651 System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +12619372 System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +280 System.Web.Compilation.BuildManager.ExecutePreAppStart() +172 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +1151

[HttpException (0x80004005): The pre-application start initialization method Start on type System.Web.WebPages.Administration.PreApplicationStartCode threw an exception with the following error message: Attempt by security transparent method 'System.Web.WebPages.Administration.SiteAdmin.RegisterAdminModule()' to access security critical method 'System.Web.WebPages.ApplicationPart..ctor(System.Reflection.Assembly, System.String)' failed..] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12618692 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12458309

Comments

Sebastiaan Janssen 15 Oct 2015, 12:12:47

This may help: http://issues.umbraco.org/issue/U4-7193

Or this: http://stackoverflow.com/questions/17926552/attempt-by-security-transparent-method-webmatrix-webdata-preapplicationstartcod

Or this: http://stackoverflow.com/questions/29755925/attempt-by-security-transparent-method-system-web-webpages-administration-sitea Particularly: there may be old/incompatible dlls in your bin folder that conflict.

Finally, if you're trying to run in a partial trust environment then I'm afraid you're out of luck. Even though our requirement has been to run in full trust from 7.0.0 and upwards (https://our.umbraco.org/Documentation/Getting-Started/Setup/Install/system-requirements) you might have been able to skate by on partial trust until now. MVC5 obviously uses stuff that doesn't support partial trust any more so no more skating by I'm afraid. If you're running locally, enable full trust, if you have a hosting provider, ask them to support full trust.


Priority: Normal

Type: Bug

State: Can't Reproduce

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version:

Sprint:

Story Points:

Cycle: