469,920 Members | 2,492 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,920 developers. It's quick & easy.

Calling a WebService through HTTP GET ? (HELP!)

Hi,

I have a simple webservice, with one function on the following local path :

http://localhost/testws/tester.asmx

I would like to call it, using HTTP GET (or some form of simple, url with
all the parameters in), like this;

http://localhost/testws/tester.asmx/...o&param2=world

But it does not work ? It comes with the following error;

Thanks,

Benne

Server Error in '/activation' Application.
----------------------------------------------------------------------------
----

Request format is unrecognized.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Request format is
unrecognized.

Source Error:

An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Stack Trace:
[InvalidOperationException: Request format is unrecognized.]

System.Web.Services.Protocols.WebServiceHandlerFac tory.CoreGetHandler(Type
type, HttpContext context, HttpRequest request, HttpResponse response) +388

System.Web.Services.Protocols.WebServiceHandlerFac tory.GetHandler(HttpContex
t context, String verb, String url, String filePath) +94
System.Web.HttpApplication.MapHttpHandler(HttpCont ext context, String
requestType, String path, String pathTranslated, Boolean useAppConfig) +699

System.Web.MapHandlerExecutionStep.System.Web.Http Application+IExecutionStep
..Execute() +95
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously) +173


Nov 15 '05 #1
1 15958
There is a subtle difference between .NET Framework 1.0 and 1.1 regarding
the 'protocols' that are permitted to communicate with a WebService.

By default, you can use SOAP, GET or POST method to communicate with a
WebService running on 1.0. But in version 1.1, only SOAP is enabled by
default.

You have to add the following settings to you Web.config file to re-enable
GET/POST methods.

Example:

<configuration>
<system.web>
<webServices>
<protocols>
<add name="HttpGet" />
<add name="HttpPost" />
</protocols>
</webServices>

Edward

"Benne Smith" <do**@write.to.me.directly.com> wrote in message
news:3f**********************@news.dk.uu.net...
Hi,

I have a simple webservice, with one function on the following local path :
http://localhost/testws/tester.asmx

I would like to call it, using HTTP GET (or some form of simple, url with
all the parameters in), like this;

http://localhost/testws/tester.asmx/...o&param2=world

But it does not work ? It comes with the following error;

Thanks,

Benne

Server Error in '/activation' Application.
-------------------------------------------------------------------------- -- ----

Request format is unrecognized.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Request format is
unrecognized.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:
[InvalidOperationException: Request format is unrecognized.]

System.Web.Services.Protocols.WebServiceHandlerFac tory.CoreGetHandler(Type
type, HttpContext context, HttpRequest request, HttpResponse response) +388
System.Web.Services.Protocols.WebServiceHandlerFac tory.GetHandler(HttpContex t context, String verb, String url, String filePath) +94
System.Web.HttpApplication.MapHttpHandler(HttpCont ext context, String
requestType, String path, String pathTranslated, Boolean useAppConfig) +699
System.Web.MapHandlerExecutionStep.System.Web.Http Application+IExecutionStep .Execute() +95
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously) +173

Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by baiju | last post: by
3 posts views Thread by Merav Orion via .NET 247 | last post: by
3 posts views Thread by Zeez | last post: by
2 posts views Thread by Frank | last post: by
reply views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.