Ajax.Net 扩展框架中的 IndexOutOfRangeException
由于某种原因,当我尝试使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在将参数读入 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?
还要确保您的 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