【问题标题】:IndexOutOfRangeException in the Ajax.Net extensions frameworkAjax.Net 扩展框架中的 IndexOutOfRangeException
【发布时间】:2023-03-16 03:15:01
【问题描述】:

由于某种原因,当我尝试向具有 ScriptService 属性集的 Ajax.net Web 服务发出请求时,在协议类的深处发生了一个我无法控制的异常。有人见过这个吗?

这是确切的消息: System.IndexOutOfRangeException:索引超出了数组的范围。 在 System.Web.Services.Protocols.HttpServerType..ctor(类型类型) 在 System.Web.Services.Protocols.HttpServerProtocol.Initialize() 在 System.Web.Services.Protocols.ServerProtocol.SetContext(类型类型,HttpContext ontext,HttpRequest 请求,HttpResponse 响应) 在 System.Web.Services.Protocols.ServerProtocolFactory.Create(类型类型、HttpContext 上下文、HttpRequest 请求、HttpResponse 响应、Boolean& abortProcessing)

谢谢 特雷夫

【问题讨论】:

    标签: c# ajax.net


    【解决方案1】:

    这通常是在将参数读入 Web 服务方法时出现的异常...您确定要传递该方法所期望的参数数量/类型吗?

    【讨论】:

    • 好答案!更倾向于解释真正的问题而不是掩盖。
    【解决方案2】:

    还要确保您的 web.config 已针对 asp.net ajax 正确设置:

    http://www.asp.net/AJAX/Documentation/Live/ConfiguringASPNETAJAX.aspx

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-05-02
      • 2013-06-02
      • 1970-01-01
      • 1970-01-01
      • 2011-11-06
      相关资源
      最近更新 更多