larry*wei 2015-05-21 09:22 采纳率: 0%
浏览 62

ASP .NET AJAX问题IIS

I have a problem with my ajax web site.

When I use it on my VS developer server it works fine but when I try it on IIS6 server it gave me some errors.

Uncaught SyntaxError: Unexpected token <      VM799 ScriptResource.axd?d=p6JcRyoQOCqj5Bsp6IC92EGDKdobWUrgL5FrpfmBAdDrufySdTJvC9ZYv8Xck5xTsFceCi41…:1
Uncaught SyntaxError: Unexpected token <      VM800 ScriptResource.axd?d=p6JcRyoQOCqj5Bsp6IC92EGDKdobWUrgL5FrpfmBAdDrufySdTJvC9ZYv8Xck5xTsFceCi41…:1
Uncaught ReferenceError: Sys is not defined   Default.aspx:62
Uncaught ReferenceError: Sys is not defined   Default.aspx:5719

That errors go to:

HTML dir="ltr"
Sys.WebForms.PageRequestManager._initialize('ScriptManager', document.getElementById('form1'));
Sys.Application.initialize();

I use .Net 2.0, VS 2005 and IIS6 and I have the same web.config on both sides.

Any idea? Thanks

  • 写回答

1条回答 默认 最新

  • weixin_33686714 2015-05-21 11:26
    关注

    Just Move the <script type="text/javascript"></script> block containing the Sys.* calls lower down (to the last item before the close of the body's <asp:Content/> section) in the HTML on the page.

    评论

报告相同问题?

悬赏问题

  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记