2014-04-01 168 views
2

我們有一個Asp.net解決方案(具有Ajax的c#和vb.net代碼)。在Test中運行良好,當移動到Prod時,它開始給出JavaScript錯誤。併發生許多頁面當檢查服務器得到以下錯誤。事件代碼:3005事件消息:發生了未處理的異常

Event code: 3005 
Event message: An unhandled exception has occurred. 
Event time: 31/03/2014 13:48:10 
Event time (UTC): 31/03/2014 12:48:10 
Event ID: 37dd3345a5964cf19ac94b2c05976457 
Event sequence: 3 
Event occurrence: 1 
Event detail code: 0 

Application information: 
    Application domain: /LM/W3SVC/7862/Root-4-130407436897106054 
    Trust level: Full 
    Application Virtual Path:/
    Application Path: D:\MSINetData\WWW\MT\ 
    Machine name: P01TSDES01 

Process information: 
    Process ID: 28140 
    Process name: w3wp.exe 
    Account name: NT AUTHORITY\NETWORK SERVICE 

Exception information: 
    Exception type: MethodAccessException 
    Exception message: Attempt to access method System.Management.Instrumentation.InstrumentedAttribute..ctor(System.String) in violation of security transparency rules failed. 
    at System.RuntimeMethodHandle.CheckLinktimeDemands(IRuntimeMethodInfo method, RuntimeModule module, Boolean isDecoratedTargetSecurityTransparent) 
    at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) 
    at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType) 
    at System.Reflection.RuntimeAssembly.GetCustomAttributes(Boolean inherit) 
    at System.Web.UI.AssemblyCache.GetAjaxFrameworkAssemblyAttribute(Assembly assembly) 
    at System.Web.UI.ScriptManager.get_DefaultAjaxFrameworkAssembly() 
    at System.Web.UI.ScriptManager..ctor() 
    at ASP.repository_projectcontact_aspx.__BuildControlToolkitScriptManager1() 
    at ASP.repository_projectcontact_aspx.__BuildControlContent2(Control __ctrl) 
    at System.Web.UI.CompiledTemplateBuilder.InstantiateIn(Control container) 
    at System.Web.UI.MasterPage.InstantiateInContentPlaceHolder(Control contentPlaceHolder, ITemplate template) 
    at ASP.master_mt_master.__BuildControlMTMContent() 
    at ASP.master_mt_master.__BuildControlform1() 
    at ASP.master_mt_master.__BuildControlTree(master_mt_master __ctrl) 
    at ASP.master_mt_master.FrameworkInitialize() 
    at System.Web.UI.UserControl.InitializeAsUserControlInternal() 
    at System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) 
    at System.Web.UI.Page.get_Master() 
    at System.Web.UI.Page.ApplyMasterPage() 
    at System.Web.UI.Page.PerformPreInit() 
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 



    Request information: 
    Request URL: 
    Request path: /Repository/ProjectContact.aspx 
    User host address: 
    User: 
    Is authenticated: False 
    Authentication Type: 
    Thread account name: P01TSDES01\MX-PAR 

Thread information: 
    Thread ID: 5 
    Thread account name: P01TSDES01\MX-PAR 
    Is impersonating: False 
    Stack trace: at System.RuntimeMethodHandle.CheckLinktimeDemands(IRuntimeMethodInfo method, RuntimeModule module, Boolean isDecoratedTargetSecurityTransparent) 
    at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) 
    at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType) 
    at System.Reflection.RuntimeAssembly.GetCustomAttributes(Boolean inherit) 
    at System.Web.UI.AssemblyCache.GetAjaxFrameworkAssemblyAttribute(Assembly assembly) 
    at System.Web.UI.ScriptManager.get_DefaultAjaxFrameworkAssembly() 
    at System.Web.UI.ScriptManager..ctor() 
    at ASP.repository_projectcontact_aspx.__BuildControlToolkitScriptManager1() 
    at ASP.repository_projectcontact_aspx.__BuildControlContent2(Control __ctrl) 
    at System.Web.UI.CompiledTemplateBuilder.InstantiateIn(Control container) 
    at System.Web.UI.MasterPage.InstantiateInContentPlaceHolder(Control contentPlaceHolder, ITemplate template) 
    at ASP.master_mt_master.__BuildControlMTMContent() 
    at ASP.master_mt_master.__BuildControlform1() 
    at ASP.master_mt_master.__BuildControlTree(master_mt_master __ctrl) 
    at ASP.master_mt_master.FrameworkInitialize() 
    at System.Web.UI.UserControl.InitializeAsUserControlInternal() 
    at System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) 
    at System.Web.UI.Page.get_Master() 
    at System.Web.UI.Page.ApplyMasterPage() 
    at System.Web.UI.Page.PerformPreInit() 
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 


Custom event details: 

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. 

回答

1

好像你有安全問題。 asp:ScriptManager是導致此錯誤的典型原因。 也許你應該嘗試添加這個到你的web.config:

<system.web> 
    <trust level="Full"/> 
</system.web> 
相關問題