Ajax Toolkit不适用于网站部署

本文关键字:网站 部署 适用于 不适用 Toolkit Ajax | 更新日期: 2023-09-27 17:58:40

我在本地机器上有一个工作网站。我决定买一些主机并上传当前版本,在工作时更新它。在我的本地机器上一切正常,只有未完成的页面。然而,当我将网站上传到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

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

谢谢你的帮助。

--长石

Ajax Toolkit不适用于网站部署

通过对互联网的研究,我发现ajax控制工具包需要完全的信任才能发挥作用。服务器上的默认信任为中等,您需要将其更改为完全信任。在web.config的system.web下添加<trust level="Full" />

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

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