Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Tue, 22 Apr 2008 06:18:00 -0700,    group: microsoft.public.dotnet.framework.aspnet.webservices        back       


Cannot consume webservice via http get   
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)
date: Tue, 22 Apr 2008 06:18:00 -0700   author:   Dan

RE: Cannot consume webservice via http get   
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.Initialize()
>    at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, 
> HttpContext context, HttpRequest request, HttpResponse response, Boolean& 
> abortProcessing)
> 
>
date: Wed, 13 Aug 2008 23:24:00 -0700   author:   aashraf

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us