0

我们在 .net 4 Web 表单网站上间歇性地收到此错误。回收应用程序池似乎通常可以解决它。

我能找到的唯一参考似乎与使用Umbraco或动态语言运行时有关。这两者都不适用于我们。

我发现的唯一有用的链接是:http://support.frozenmountain.com/entries/23667761-Compatibility-issue-using-ASP-Net-4-0-Extensions-and-ScriptManager

除了添加不必要的参考之外,还有其他解决方案吗?

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)
4

1 回答 1

0

尽管您说您没有使用 DLR,但这是该文件存在的唯一位置。该错误消息强烈表明您正在使用为 .NET 2.0-3.5 构建的旧版本 IronPython(或 IronRuby 或其他基于 DLR 的东西)。在某个地方,有些文件的名称类似于“Microsoft.Dynamic.dll”、“Microsoft.Scripting.Core.dll”和“Microsoft.Scripting.dll”。无论使用什么,都应该使用专为 .NET 4.0 构建的 DLR 版本进行更新。

于 2013-08-09T14:33:33.640 回答