Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 23, 2013 02:22 PM by alhambraeidos
May 05, 2011 03:53 PM|LINK
I have a .net 4 web app. It was working fine. But two weeks ago an error started happening:
[MethodAccessException: Attempt to access method System.Management.Instrumentation.InstrumentedAttribute..ctor(System.String) in violation of security transparency rules failed.]
System.RuntimeMethodHandle.CheckLinktimeDemands(IRuntimeMethodInfo method, RuntimeModule module, Boolean isDecoratedTargetSecurityTransparent) +0
System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType) +103
System.Reflection.RuntimeAssembly.GetCustomAttributes(Boolean inherit) +33
System.Web.UI.AssemblyCache.GetAjaxFrameworkAssemblyAttribute(Assembly assembly) +76
After a refresh in the browser the app is shown ok.
What should it be?
May 11, 2011 10:49 AM|LINK
We have seen a combination of issues that might cause this:
1) The webserver has the trust level set less than "Full" at the machine web.config.
2) The webserver does not have the AJAX files (System.Web.Extensions) installed into the GAC.
Solution 1: Set trust level to "Full" in the machine level web.config
Solution 2: Install AJAX files into the GAC
If refreshing resolves it - it might just be a timing issue loading the extensions. Probably if you install into the GAC it will resolve it.
Jan 23, 2013 02:22 PM|LINK
Any information about it ?
I've found this reference:
From Microsoft's knowledge-base
What is it applicationStartupComplete variable? any full source code using applicationStartupComplete ?