Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / December 2004

Tip: Looking for answers? Try searching our database.

Accessing a Web Service using a Query String

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jim Lewis - 22 Dec 2004 04:50 GMT
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.WebServiceHandlerFactory.CoreGetHandler(Type
type, HttpContext context, HttpRequest request, HttpResponse response) +388

System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContex
t context, String verb, String url, String filePath) +94
  System.Web.HttpApplication.MapHttpHandler(HttpContext context, String
requestType, String path, String pathTranslated, Boolean useAppConfig) +696

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

----------------------------------------------------------------------------
----
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET
Version:1.1.4322.2032
erymuzuan - 22 Dec 2004 14:40 GMT
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

> I have read several things that state accessing a Web Service through a
> Query String should work.  However, when I try to execute
[quoted text clipped - 44 lines]
> Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET
> Version:1.1.4322.2032
Jim Lewis - 22 Dec 2004 15:38 GMT
Erymuzuan,

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

Regards,
Jim Lewis

> May be you should add the HttpGet request protocol for the Web services
> <configuration>
[quoted text clipped - 43 lines]
> >
> > [InvalidOperationException: Request format is unrecognized.]

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

System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContex
> > t context, String verb, String url, String filePath) +94
> >    System.Web.HttpApplication.MapHttpHandler(HttpContext context, String
> > requestType, String path, String pathTranslated, Boolean useAppConfig) +696

System.Web.MapHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep
> > .Execute() +95
> >    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
[quoted text clipped - 4 lines]
> > Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET
> > Version:1.1.4322.2032
Dan Rogers - 22 Dec 2004 20:44 GMT
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_jim_lewis@hotmail.com>
References: <#nOgEH#5EHA.540@TK2MSFTNGP12.phx.gbl>
<urIE5RD6EHA.1408@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: <ec0TVxD6EHA.3828@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!TK2MSFTNGP08.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

> May be you should add the HttpGet request protocol for the Web services
> <configuration>
[quoted text clipped - 16 lines]
> > 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 toa
> > Flash movie using a Web Service.
[quoted text clipped - 5 lines]
>
> --------------------------------------------------------------------------
--
> > ----
> >
[quoted text clipped - 10 lines]
> >       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.WebServiceHandlerFactory.CoreGetHandler(Type
> > type, HttpContext context, HttpRequest request, HttpResponse response)
+388

System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContex
> > t context, String verb, String url, String filePath) +94
> >    System.Web.HttpApplication.MapHttpHandler(HttpContext context, String
> > requestType, String path, String pathTranslated, Boolean useAppConfig)
+696

System.Web.MapHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep
> > .Execute() +95
> >    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
> > completedSynchronously) +173
>
> --------------------------------------------------------------------------
--
> > ----
> > Version Information: Microsoft .NET Framework Version:1.1.4322.2032;
ASP.NET
> > Version:1.1.4322.2032

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.