asp.net Ajax Toolkit无法在网站部署上工作

vom3gejh  于 5个月前  发布在  .NET
关注(0)|答案(3)|浏览(66)

我在本地机器上有一个工作网站。我决定购买一些主机并上传当前版本,在工作时更新它。在我的本地机器上一切正常,只是有未完成的页面。然而,当我将网站上传到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。Here是我的网站URL,如果有人想看到它,可以使用堆栈跟踪。
谢谢你的帮助
--费莱斯莫里茨

0tdrvxhp

0tdrvxhp1#

我在网上查了一下,发现一个控制工具包需要完全信任才能运行。服务器上的默认信任是中等的,你需要把它改为完全的。在你的web.xml中的system.web下添加<trust level="Full" />
http://support.winhost.com/KB/a657/changing-the-default-aspnet-trust-level.aspx

olqngx59

olqngx592#

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

o75abkj4

o75abkj43#

我也遇到过类似的问题,Ajax控件在本地工作,但不在实际环境中。
事实上,我经过一个通过Plesk部署的站点,它有一个Web防火墙,可以丢弃这些调用,也就是对ScriptRessource.axdWebRessource.axd的调用。禁用Plesk的ModSecurity对我来说很有用。但是,最好只丢弃与这些资源相关的规则。但是我还没有找到如何做到这一点。我发布此信息是为了帮助任何可以拥有类似的问题。

相关问题