By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,612 Members | 1,632 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,612 IT Pros & Developers. It's quick & easy.

Accessing a Web Service using a Query String

P: n/a
I have read several things that state accessing a Web Service through a
Query String should work. However, when I try to execute
http://localhost/webservice1/service1.asmx/HelloWorld I get the error below.
Can I access a Web Service through a Query Sting. I need to send XML to a
Flash movie using a Web Service.

Thank You,
Jim Lewis

Server Error in '/WebService1' 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) +696

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

----------------------------------------------------------------------------
----
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET
Version:1.1.4322.2032
Nov 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
May be you should add the HttpGet request protocol for the Web services
<configuration>
<system.web>
<webServices>
<protocols>
<add name="HttpGet"/>
<add type="HttpPost"/>
<add type="Documentation"/>
</protocols>
</webServices>
<system.web>
</configuration>
Regards
Erymuzuan Mustapa

Jim Lewis wrote:
I have read several things that state accessing a Web Service through a
Query String should work. However, when I try to execute
http://localhost/webservice1/service1.asmx/HelloWorld I get the error below.
Can I access a Web Service through a Query Sting. I need to send XML to a
Flash movie using a Web Service.

Thank You,
Jim Lewis

Server Error in '/WebService1' 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) +696

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

----------------------------------------------------------------------------
----
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET
Version:1.1.4322.2032

Nov 23 '05 #2

P: n/a
Erymuzuan,

I do not undersand what you mean by "add the HttpGet request protocol for
the Web services"

Regards,
Jim Lewis
"erymuzuan" <er*******@yahoo.com> wrote in message
news:ur**************@TK2MSFTNGP10.phx.gbl...
May be you should add the HttpGet request protocol for the Web services
<configuration>
<system.web>
<webServices>
<protocols>
<add name="HttpGet"/>
<add type="HttpPost"/>
<add type="Documentation"/>
</protocols>
</webServices>
<system.web>
</configuration>
Regards
Erymuzuan Mustapa

Jim Lewis wrote:
I have read several things that state accessing a Web Service through a
Query String should work. However, when I try to execute
http://localhost/webservice1/service1.asmx/HelloWorld I get the error below. Can I access a Web Service through a Query Sting. I need to send XML to a Flash movie using a Web Service.

Thank You,
Jim Lewis

Server Error in '/WebService1' 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) +696
System.Web.MapHandlerExecutionStep.System.Web.Http Application+IExecutionStep .Execute() +95
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously) +173


--------------------------------------------------------------------------

--
----
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032

Nov 23 '05 #3

P: n/a
Hi Jim,

Here's a few things that may help.

First off, if you go into your project within Visual Studio, and then click
Debug/Start, do you get the default test page for your service? If you do,
you will find that for each method there is a link. Click on the method
you like to try, and this should take you to a page that has a button on it
(assuming you have very simple argument types), and a form that lets you
fill them in.

When you click that button, the HTTP Get protocol is used - which is
basically a query string that has the asmx address for the page where the
service lives, followed by an argument list that uses field names and
question marks just like you would expect a paramaterized query string to
look.

The HTTPGet protocol setting is something you'll find in the project's
web.config file. By default, it's always on so that the test page can be
displayed.

It isn't clear to me how this is, however, related to sending XML to a
flash movie. Flash movies aren't web services that I am aware of.

I hope this helps

Dan Rogers
Microsoft Corporation
--------------------
From: "Jim Lewis" <j_*********@hotmail.com>
References: <#n*************@TK2MSFTNGP12.phx.gbl>
<ur**************@TK2MSFTNGP10.phx.gbl>
Subject: Re: Accessing a Web Service using a Query String
Date: Wed, 22 Dec 2004 07:38:39 -0800
Lines: 96
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.3790.181
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.181
Message-ID: <ec**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: adsl-69-106-205-45.dsl.irvnca.pacbell.net 69.106.205.45
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP09
.phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:8266
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Erymuzuan,

I do not undersand what you mean by "add the HttpGet request protocol for
the Web services"

Regards,
Jim Lewis
"erymuzuan" <er*******@yahoo.com> wrote in message
news:ur**************@TK2MSFTNGP10.phx.gbl...
May be you should add the HttpGet request protocol for the Web services
<configuration>
<system.web>
<webServices>
<protocols>
<add name="HttpGet"/>
<add type="HttpPost"/>
<add type="Documentation"/>
</protocols>
</webServices>
<system.web>
</configuration>
Regards
Erymuzuan Mustapa

Jim Lewis wrote:
I have read several things that state accessing a Web Service through a
Query String should work. However, when I try to execute
http://localhost/webservice1/service1.asmx/HelloWorld I get the error below. Can I access a Web Service through a Query Sting. I need to send XML to a Flash movie using a Web Service.

Thank You,
Jim Lewis

Server Error in '/WebService1' 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) +696
System.Web.MapHandlerExecutionStep.System.Web.Http Application+IExecutionStep .Execute() +95
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously) +173


--------------------------------------------------------------------------

--
----
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032


Nov 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.