Ajax.Net 扩展框架中的 IndexOutOfRangeException

发布于 2024-07-04 09:42:31 字数 584 浏览 5 评论 0原文

由于某种原因,当我尝试使用 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)

谢谢 特雷夫

For some reason when I attempt to make a request to an Ajax.net web service with the ScriptService attribute set, an exception occurs deep inside the protocol class which I have no control over. Anyone seen this before?

Here is the exact msg:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.Web.Services.Protocols.HttpServerType..ctor(Type type)
at System.Web.Services.Protocols.HttpServerProtocol.Initialize()
at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext ontext, HttpRequest request, HttpResponse response)
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)

thx
Trev

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

长不大的小祸害 2024-07-11 09:42:31

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

This is usually an exception while reading parameters into the web service method...are you sure you're passing the number/type of parameters the method is expecting?

伤痕我心 2024-07-11 09:42:31

还要确保您的 web.config 已正确设置为 ASP.NET AJAX:

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

Also make sure your web.config is setup properly for asp.net ajax:

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文