问题描述
我有一个复杂的问题与ASP.Net 4.0的Ajax ....我开始使用Visual Studio 2010的一个网站,我的机器上,并增加了一些他们用做工精细更新面板,但我突然明白了一系列错误时我跑我的网站
I got a complicated problem with ASP.Net 4.0 Ajax....I started a website with Visual Studio 2010 on my machine,and added some update panels they used to work fine,but suddenly i got that series of errors when i run my website
微软JScript运行时错误:ASP.NET Ajax客户端框架未能加载
微软JScript运行时错误:'SYS'未定义
Microsoft JScript runtime error: 'Sys' is undefined
但奇怪的事情是,我犯了同样的机器上的一个网站,VS 2010和更新面板有工作perfectly.i采取了它的web.config中我的新网站,并改变只是我得到了同样的错误connection..and
The strange things is that i made a website on the same machine with VS 2010 and the update panels there work perfectly.i took its web.config to my new website and changed just the connection..and i got the same error
我试图寻找一个解决方案,但我没有发现任何真正的solution.Can谁能帮助?
I tried to search for a solution but i failed to find any real solution.Can anyone help?
推荐答案
Here is the answer by zhughes from this thread on asp.net forum.
原因:由ScriptManager的变化时产生的URL路由模块使用的JavaScript的路径
The Reason : the path of the javascript generated by the scriptmanager changes when the URL Routing module is used.
解决方案:给路由API不路由AXD扩展名的文件(通过使用ScriptManager生成的文件)
The Solution : Tell the routing API to not route the files with "axd" extension (the files generated by the scriptmanager)
添加此规则的方法,其中您注册在Global.asax中的路由规则
Add this rule to the method where you register the routing rules in Global.asax
routes.Ignore("{resource}.axd/{*pathInfo}");
此外,你应该有这个节在web.config中
in addition you should have this section in web.config
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>
这篇关于Ajax客户端框架未能加载Asp.Net 4.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!