现在的位置: 首页 > 综合 > 正文

AJAX应注意IIS有没有.ashx扩展

2012年01月08日 ⁄ 综合 ⁄ 共 1629字 ⁄ 字号 评论关闭

AJAX应注意IIS有没有.ashx扩展

天将本地做好的一个web程序放到<span href="http://www.im286.com/tag.php?name=%B7%FE%CE%F1%C6%F7" class="t_tag">服务器</span>上,居然不行。web程序使用了ajax来往返数据。<br /><br />检查生成的html语句,有这么两句代码 <font style="font-size: 13px"><img src="/attachments/2007/11/newimg1234_20071119085012_1.gif" border="0" alt="" /><font color="#0000ff">&lt;</font><font color="#800000">script </font><font color="#ff0000">type</font><font color="#0000ff">=&quot;text/javascript&quot;</font><font color="#ff0000"> src</font><font color="#0000ff">=&quot;/cargo/csharpwrapper/common.ashx&quot;</font><font color="#0000ff">&gt;&lt;/</font><font color="#800000">script</font><font color="#0000ff">&gt;</font><font color="#000000"><br /><img src="/attachments/2007/11/newimg1234_20071119085012_1.gif" border="0" alt="" /><br /><img src="/attachments/2007/11/newimg1234_20071119085012_1.gif" border="0" alt="" />&nbsp; &nbsp; </font><font color="#0000ff">&lt;</font><font color="#800000">script </font><font color="#ff0000">type</font><font color="#0000ff">=&quot;text/javascript&quot;</font><font color="#ff0000"> src</font><font color="#0000ff">=&quot;/cargo/csharpwrapper/SD.Supercargo.WebApp.Forms.ProductInfoAjax,SD.Supercargo.WebApp.ashx&quot;</font><font color="#0000ff">&gt;&lt;/</font><font color="#800000">script</font><font color="#0000ff">&gt;</font><font color="#000000"><br /><img src="/attachments/2007/11/newimg1234_20071119085012_1.gif" border="0" alt="" /></font></font><br /><br />就是说Ajax应是起来了。检查应用程序所在的目录没有上级应用程序存在。再查IIS扩展,服务器上没有.ashx扩展。估计问题就在这了。添加之<br /><br />选中应用程序,属性->虚拟目录->配置->映射->添加<img width="429" height="243" src="/attachments/2007/11/newimg1234_20071119085012_2.gif" border="0" alt="" /><br />保存退出,一切正常。

抱歉!评论已关闭.