Question

We intermittently get this error on our .net 4 web forms web site. Recycling the app pool seems typically resolves it.

The only references i can find to it seem to be related to either using Umbraco, or the Dynamic language Runtime. Neither of which applies to us.

The only useful link I have found is this: http://support.frozenmountain.com/entries/23667761-Compatibility-issue-using-ASP-Net-4-0-Extensions-and-ScriptManager

Any other solutions, other than adding the unnecesary reference?

System.Web.HttpUnhandledException (0x80004005): Exception of type   'System.Web.HttpUnhandledException' was thrown. --->   System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Scripting.ExtensionAttribute,   Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.   The system cannot find the file specified.  File name: 'Microsoft.Scripting.ExtensionAttribute, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'     at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs,   Int32 methodInstCount, ObjectHandleOnStack type)     at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)     at System.ModuleHandle.ResolveTypeHandle(Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)     at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)     at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)     at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)     at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean isDecoratedTargetSecurityTransparent)     at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType)     at System.Web.UI.AssemblyCache.GetAjaxFrameworkAssemblyAttribute(Assembly assembly)     at System.Web.UI.ScriptManager.get_DefaultAjaxFrameworkAssembly()     at System.Web.UI.ScriptManager..ctor()     at ASP.masterpages_safarinow_master.__BuildControlMasterScriptManager()     at ASP.masterpages_safarinow_master.__BuildControlfrmMain()     at ASP.masterpages_safarinow_master.__BuildControlmasterBodyTag()     at ASP.masterpages_safarinow_master.__BuildControlTree(masterpages_safarinow_master __ctrl)     at System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection)     at System.Web.UI.Page.ApplyMasterPage()     at System.Web.UI.Page.PerformPreInit()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    WRN: Assembly binding logging is turned OFF.  To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.  Note: There is some performance penalty associated with assembly bind failure logging.  To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].       at System.Web.UI.Page.HandleError(Exception e)     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest()     at System.Web.UI.Page.ProcessRequest(HttpContext context)     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()     at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Was it helpful?

Solution

Although you said that you're not using the DLR, that's the only place this file exists. The error message strongly suggests that you're using an older version of IronPython (or IronRuby or some other DLR-based thing) which was built for .NET 2.0-3.5. Somewhere, there are files with names like "Microsoft.Dynamic.dll", "Microsoft.Scripting.Core.dll", and "Microsoft.Scripting.dll". Whatever is using this should be updated with a version of the DLR which was built specifically for .NET 4.0.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top