C# – IndexOutOfRangeException in the Ajax.Net extensions framework

ajax.netc

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

Best Answer

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

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

Related Topic