Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Cannot consume webservice via http get

Reply
Thread Tools

Cannot consume webservice via http get

 
 
Dan
Guest
Posts: n/a
 
      04-22-2008
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.I nitialize()
at System.Web.Services.Protocols.ServerProtocolFactor y.Create(Type type,
HttpContext context, HttpRequest request, HttpResponse response, Boolean&
abortProcessing)


 
Reply With Quote
 
 
 
 
aashraf
Guest
Posts: n/a
 
      08-14-2008
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

"Dan" wrote:

> 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.I nitialize()
> at System.Web.Services.Protocols.ServerProtocolFactor y.Create(Type type,
> HttpContext context, HttpRequest request, HttpResponse response, Boolean&
> abortProcessing)
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
consume local web service -ok consume remote service - Not OK dgleeson422111 ASP .Net Web Services 2 01-31-2010 08:02 PM
Consume Webservice in java weetat Java 3 04-04-2007 07:04 AM
Consume .NET Web Service with HTTP-POST/GET M B HONG 20 Javascript 2 07-23-2005 10:55 AM
call a webservice via http get quentin compson Java 2 08-15-2004 05:41 PM
Consume php webservice in asp.net Paul Hermans ASP .Net 1 06-10-2004 05:40 PM



Advertisments