Cannot consume webservice via http get

D

Dan

Hi I wrote the following webservice

[WebMethod]
public void test()
{
return ;
}

I added this in the web.config file:
<webServices>
<protocols>
<add name="HttpPost"/>
<add name="HttpGet"/>
</protocols>
</webServices>

but when I try to consume the service via httpGet I get this error:

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.ServerProtocolFactory.Create(Type type,
HttpContext context, HttpRequest request, HttpResponse response, Boolean&
abortProcessing)
 
A

aashraf

Hi,

You are probably calling the web service using Query String with passing
some parameters (hidden fields). If so the web service is not being able to
parse the provided parameters and shows the error. You need to check for the
proper parameters that the web service is expecting
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top