Ajax.Net扩展框架中的IndexOutOfRangeException
时间:2020-03-05 18:59:44 来源:igfitidea点击:
由于某些原因,当我尝试通过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响应,布尔值和abortProcessing)
谢谢
特雷夫
解决方案
回答
将参数读入Web服务方法时通常是一个例外...确定要传递该方法期望的参数数量/类型吗?
回答
还要确保为asp.net ajax正确设置了web.config:
http://www.asp.net/AJAX/Documentation/Live/ConfiguringASPNETAJAX.aspx