Ajax 工具包不适用于网站部署

问题描述 投票:0回答:3

我的本地计算机上有一个工作网站。我决定购买一些主机并上传当前版本,并在工作时更新它。一切都在我的本地计算机上运行,只有未完成的页面。但是,当我将网站上传到 godaddy 时,出现 ReflectionTypeLoadException。

这是堆栈跟踪:

[ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.]
   System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) +0
   System.Reflection.RuntimeModule.GetTypes() +4
   System.Reflection.Assembly.GetTypes() +70
   AjaxControlToolkit.ToolkitScriptManagerConfig..cctor() +68

[TypeInitializationException: The type initializer for 'AjaxControlToolkit.ToolkitScriptManagerConfig' threw an exception.]
   AjaxControlToolkit.ToolkitScriptManager..ctor() +62
   ASP.basic_master.__BuildControlScriptManager1() in g:\PleskVhosts\ethentia.com\httpdocs\Basic.master:24
   ASP.basic_master.__BuildControlform1() in g:\PleskVhosts\ethentia.com\httpdocs\Basic.master:22
   ASP.basic_master.__BuildControlTree(basic_master __ctrl) in g:\PleskVhosts\ethentia.com\httpdocs\Basic.master:1
   ASP.basic_master.FrameworkInitialize() in g:\PleskVhosts\ethentia.com\httpdocs\Basic.master.cs:912308
   System.Web.UI.UserControl.InitializeAsUserControlInternal() +32
   System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +655
   System.Web.UI.Page.get_Master() +54
   System.Web.UI.Page.ApplyMasterPage() +14
   System.Web.UI.Page.PerformPreInit() +45
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +335

我已确保将 Ajax dll 包含在 Bin 文件夹中。我尝试过重新加载和重建我的网站。我正在使用最新版本的 Ajax 和 ASP。 这里是我的网站网址,其中包含堆栈跟踪(如果有人想查看的话)。

感谢您的帮助。

--felesmorits

c# asp.net ajax ajaxcontroltoolkit
3个回答
3
投票

在互联网上进行研究,我发现ajax控制工具包需要完全信任才能发挥作用。服务器的默认信任度为中等,您需要将其更改为完全。在 web.config 中的 system.web 下添加

<trust level="Full" />

http://support.winhost.com/KB/a657/changing-the-default-aspnet-trust-level.aspx


0
投票

找到System.Web.Extensions.dll文件并将其复制到bin目录中。


0
投票

我遇到了 Ajax 控件在本地计算机上工作但在部署时无法工作的问题,并且在几个小时内不知道该怎么做。尝试了一切更新所有元素但没有任何结果。 事实上,我通过 Plesk 进行部署,它有一个 Web 防火墙,可以丢弃这些调用,即对 ScriptRessource.axd 或 WebRessource.axd 的调用。禁用 Plesk 的 ModSecurity 就可以了。然而,最好仅丢弃涉及这些资源的规则。但我还不知道如何做到这一点。 我发布此信息是为了帮助任何可能遇到类似问题的人。

© www.soinside.com 2019 - 2024. All rights reserved.