I have a .net 4 web app. It was working fine. But two weeks ago an error started happening:
Attempt to access method System.Management.Instrumentation.InstrumentedAttribute..ctor(System.String) in violation of security transparency rules failed.
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.
(http://msdn2.microsoft.com/en-us/library/ms998341.aspx)
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.
Michael Graham, MSFT
Marked as answer by cts-mgraham on May 31, 2011 08:34 PM
alexvasconce...
Member
6 Points
13 Posts
Violation of security transparency in ScriptManager
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:
Attempt to access method System.Management.Instrumentation.InstrumentedAttribute..ctor(System.String) in violation of security transparency rules failed.
[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) +482
System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType) +103
System.Reflection.RuntimeAssembly.GetCustomAttributes(Boolean inherit) +33
System.Web.UI.AssemblyCache.GetAjaxFrameworkAssemblyAttribute(Assembly assembly) +76
System.Web.UI.ScriptManager.get_DefaultAjaxFrameworkAssembly() +388
After a refresh in the browser the app is shown ok.
What should it be?
Thanks!
cts-mgraham
Contributor
3318 Points
642 Posts
Microsoft
Re: Violation of security transparency in ScriptManager
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.
(http://msdn2.microsoft.com/en-us/library/ms998341.aspx)
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.
alhambraeido...
Member
132 Points
222 Posts
Re: Violation of security transparency in ScriptManager
Jan 23, 2013 02:22 PM|LINK
Any information about it ?
I've found this reference:
http://stackoverflow.com/questions/8408654/after-upgrading-my-web-app-from-net-3-5-to-net4-0-i-get-a-security-transparen
From Microsoft's knowledge-base KB2635463:
http://support.microsoft.com/kb/2635463?wa=wsignin1.0
What is it applicationStartupComplete variable? any full source code using applicationStartupComplete ?
www.kiquenet.com/churrosoft
www.trabajobasura.com/solusoft http://www.setbb.com/putainformatica/viewtopic.php?p=843