Ajax.Net扩展框架中的IndexOutOfRangeException

问题描述:

由于某些原因,当我尝试向设置了ScriptService属性的Ajax.net Web服务发出请求时,在我无法控制的协议类内发生异常。任何人见过这个?Ajax.Net扩展框架中的IndexOutOfRangeException

这里是确切的味精: System.IndexOutOfRangeException:索引超出了数组的边界。 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的请求,响应的HttpResponse) 在System.Web.Services.Protocols.ServerProtocolFactory.Create(类型类型,HttpContext的上下文中,请求的HttpRequest,HttpResponse对象响应,布尔& abortProcessing)

THX 崔佛

另外,还要确保你的web.config是正确设置为asp.net AJAX:

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

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

+0

很好的回答!更多地解释真正的问题而不是掩饰。 – 2015-05-29 03:40:42