Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

POST call to web service fails on remote PC

1 view
Skip to first unread message

Garry Moore

unread,
May 28, 2003, 9:48:08 AM5/28/03
to
Hi,

I have a web service that I am calling from a HTML page
using a POST. The following is the relevant HTML.

In File 'TestWebService.htm' :
<form method=POST
action='http://165.165.197.98/TickPriceWeb/ClientWebServic
es.asmx/TestService' ID="Form1">
<input type="text" size="10" name="inText"
ID="inText">
<br>Result =
<input type=submit value="TestService"
ID="TestService" NAME="TestService">
</form>

This works fine on the local machine. If you change the
POST to a GET it fails with the error shown below, but I
believe that is due to support for GET requests being
dropped in the .NET 1.1 framework.

If I call this same page from a remote machine (via
dialup network and not on the local machine) then the
POST fails with the same error (cannot do POST or GET). I
can see the page and enter the test message but when the
POST is sent it is obviously not getting through?

Open the page on the remote machines IE 6 using url :
http://165.165.197.98/TickPriceWeb/TextWebService.htm

Does the POST only work on the local machine? What be the
point of that? Does it mean that you can only use SOAP
message to call a web service?

Does anyone have any suggestions of how to invoke the web
service from an HTML page?

This code is copyied from the MSDN article:
.NET Framework Developer's Guide
Accessing XML Web Services from a Browser [C#]

I gather the docs for the .NET 1.1 framework are not yet
ready and I cannot find any documentation on what they
changed. (e.g removing the GET support)

Regards,
Garry Moore

Error:
----------------------------------------------------------
------------------------------
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.Cor
eGetHandler(Type
type, HttpContext context, HttpRequest request,
HttpResponse response)
System.Web.Services.Protocols.WebServiceHandlerFactory.Get
Handler(HttpContex
t context, String verb, String url, String filePath)
System.Web.HttpApplication.MapHttpHandler(HttpContext
context, String
requestType, String path, String pathTranslated, Boolean
useAppConfig)
System.Web.MapHandlerExecutionStep.System.Web.HttpApplicat
ion+IExecutionStep
.Execute()
System.Web.HttpApplication.ExecuteStep(IExecutionStep
step, Boolean&
completedSynchronously

Yan-Hong Huang[MSFT]

unread,
May 29, 2003, 11:08:26 PM5/29/03
to
Hello Garry,

If you install .NET frame work 1.1, by default it will comment HTTP GET and
HTTPPOST Protocols and it will enable HTTP POSTLOCALHOST, by default you
can test web Service on local machine only. (From browser)

<Protocols>
<add name="HttpSoap1.2"/>
<add name="HttpSoap"/>
<!--<add name="HttpPost"/>-->
<!--<add name="HttpGet"/>-->
<add name="HttpPostLocalhost" />
<add name="Documentation"/>
</protocols>

Solution:
========
If you want test web service on local machine only, enable
HTTPPOSTLOCALHOST protocol
If you want to test web service on remote machine, enable HTTPGET and
HTTPPOST protocols


Best regards,
yhhuang
VS.NET, Visual C++
Microsoft

This posting is provided "AS IS" with no warranties, and confers no rights.
Got .Net? http://www.gotdotnet.com
--------------------
!Content-Class: urn:content-classes:message
!From: "Garry Moore" <gms...@telkomsa.net>
!Sender: "Garry Moore" <gms...@telkomsa.net>
!Subject: POST call to web service fails on remote PC
!Date: Wed, 28 May 2003 06:48:08 -0700
!Lines: 93
!Message-ID: <3cf001c3251f$c59b77a0$a001...@phx.gbl>
!MIME-Version: 1.0
!Content-Type: text/plain;
! charset="iso-8859-1"
!Content-Transfer-Encoding: 7bit
!X-Newsreader: Microsoft CDO for Windows 2000
!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!Thread-Index: AcMlH8Wb3/blTJmTRem1NGq2F5cplA==
!Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
!Path: cpmsftngxa06.phx.gbl
!Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.webservices:17463
!NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
!
!Hi,
!
!I have a web service that I am calling from a HTML page
!using a POST. The following is the relevant HTML.
!
!In File 'TestWebService.htm' :
!<form method=POST
!action='http://165.165.197.98/TickPriceWeb/ClientWebServic
!es.asmx/TestService' ID="Form1">
! <input type="text" size="10" name="inText"
!ID="inText">
! <br>Result =
! <input type=submit value="TestService"
!ID="TestService" NAME="TestService">
!</form>
!
!This works fine on the local machine. If you change the
!POST to a GET it fails with the error shown below, but I
!believe that is due to support for GET requests being
!dropped in the .NET 1.1 framework.
!
!If I call this same page from a remote machine (via
!dialup network and not on the local machine) then the
!POST fails with the same error (cannot do POST or GET). I
!can see the page and enter the test message but when the
!POST is sent it is obviously not getting through?
!
!Open the page on the remote machines IE 6 using url :
!http://165.165.197.98/TickPriceWeb/TextWebService.htm
!
!Does the POST only work on the local machine? What be the
!point of that? Does it mean that you can only use SOAP
!message to call a web service?
!
!Does anyone have any suggestions of how to invoke the web
!service from an HTML page?
!
!This code is copyied from the MSDN article:
!.NET Framework Developer's Guide
! Accessing XML Web Services from a Browser [C#]
!
!I gather the docs for the .NET 1.1 framework are not yet
!ready and I cannot find any documentation on what they
!changed. (e.g removing the GET support)
!
!Regards,
!Garry Moore
!
!Error:
!----------------------------------------------------------
!------------------------------
!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.Cor
!eGetHandler(Type
!type, HttpContext context, HttpRequest request,
!HttpResponse response)
!System.Web.Services.Protocols.WebServiceHandlerFactory.Get
!Handler(HttpContex
!t context, String verb, String url, String filePath)
!System.Web.HttpApplication.MapHttpHandler(HttpContext
!context, String
!requestType, String path, String pathTranslated, Boolean
!useAppConfig)
!System.Web.MapHandlerExecutionStep.System.Web.HttpApplicat
!ion+IExecutionStep
!.Execute()
!System.Web.HttpApplication.ExecuteStep(IExecutionStep
!step, Boolean&
!completedSynchronously
!
!

Tim Riley

unread,
Aug 19, 2003, 3:06:25 PM8/19/03
to
I get the following error, can you help

Server Error in '/TempService' Application.

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

Path 'POST' is forbidden.


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.Web.HttpException: Path 'POST' is forbidden.

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:

[HttpException (0x80004005): Path 'POST' is forbidden.]
System.Web.HttpMethodNotAllowedHandler.ProcessRequest(HttpContext context)
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionSte
p.Execute() System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
Boolean& completedSynchronously) +87


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

"Garry Moore" <gms...@telkomsa.net> wrote in message
news:3cf001c3251f$c59b77a0$a001...@phx.gbl...

Yan-Hong Huang[MSFT]

unread,
Aug 20, 2003, 4:33:35 AM8/20/03
to
Hi Tim,

Did you confirm that you have changed the setting in machine.config? Thanks.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security


This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!From: "Tim Riley" <do...@thinkboutit.com>
!References: <3cf001c3251f$c59b77a0$a001...@phx.gbl>
!Subject: Re: POST call to web service fails on remote PC
!Date: Tue, 19 Aug 2003 15:06:25 -0400
!Lines: 135
!X-Priority: 3
!X-MSMail-Priority: Normal
!X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
!X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
!Message-ID: <#zhzAUoZ...@tk2msftngp13.phx.gbl>
!Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
!NNTP-Posting-Host: 167.95.99.143
!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.webservices:18886
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
!
!I get the following error, can you help
!
!Server Error in '/TempService' Application.
!
!----------------------------------------------------------------------------
!----
!
!Path 'POST' is forbidden.
!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.Web.HttpException: Path 'POST' is forbidden.
!
!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:
!
! [HttpException (0x80004005): Path 'POST' is forbidden.]
!System.Web.HttpMethodNotAllowedHandler.ProcessRequest(HttpContext context)
!System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionSte
!p.Execute() System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
!Boolean& completedSynchronously) +87
!
!
!
!
!----------------------------------------------------------------------------
!----
!
!
!
!"Garry Moore" <gms...@telkomsa.net> wrote in message
!news:3cf001c3251f$c59b77a0$a001...@phx.gbl...
!> Hi,
!>
!> I have a web service that I am calling from a HTML page
!> using a POST. The following is the relevant HTML.
!>
!> In File 'TestWebService.htm' :


!> <form method=POST
!> action='http://165.165.197.98/TickPriceWeb/ClientWebServic
!> es.asmx/TestService' ID="Form1">

!> <input type="text" size="10" name="inText"
!> ID="inText">


!> <br>Result =
!> <input type=submit value="TestService"

!> ID="TestService" NAME="TestService">
!> </form>
!>
!> This works fine on the local machine. If you change the
!> POST to a GET it fails with the error shown below, but I
!> believe that is due to support for GET requests being
!> dropped in the .NET 1.1 framework.
!>
!> If I call this same page from a remote machine (via
!> dialup network and not on the local machine) then the
!> POST fails with the same error (cannot do POST or GET). I
!> can see the page and enter the test message but when the
!> POST is sent it is obviously not getting through?
!>
!> Open the page on the remote machines IE 6 using url :
!> http://165.165.197.98/TickPriceWeb/TextWebService.htm
!>
!> Does the POST only work on the local machine? What be the
!> point of that? Does it mean that you can only use SOAP
!> message to call a web service?
!>
!> Does anyone have any suggestions of how to invoke the web
!> service from an HTML page?
!>
!> This code is copyied from the MSDN article:
!> .NET Framework Developer's Guide
!> Accessing XML Web Services from a Browser [C#]
!>
!> I gather the docs for the .NET 1.1 framework are not yet
!> ready and I cannot find any documentation on what they
!> changed. (e.g removing the GET support)
!>
!> Regards,
!> Garry Moore
!>
!> Error:
!> ----------------------------------------------------------
!> ------------------------------
!> 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.Cor
!> eGetHandler(Type

!> type, HttpContext context, HttpRequest request,
!> HttpResponse response)
!> System.Web.Services.Protocols.WebServiceHandlerFactory.Get
!> Handler(HttpContex
!> t context, String verb, String url, String filePath)
!> System.Web.HttpApplication.MapHttpHandler(HttpContext
!> context, String
!> requestType, String path, String pathTranslated, Boolean
!> useAppConfig)
!> System.Web.MapHandlerExecutionStep.System.Web.HttpApplicat
!> ion+IExecutionStep
!> .Execute()
!> System.Web.HttpApplication.ExecuteStep(IExecutionStep
!> step, Boolean&
!> completedSynchronously
!>
!
!
!


Tim Riley

unread,
Aug 20, 2003, 8:27:35 AM8/20/03
to
Yes the settings in Machine.Config are as specified, including
HttpPostLocalhost and I still get the same error.


"Yan-Hong Huang[MSFT]" <yhh...@online.microsoft.com> wrote in message
news:48ELCXvZ...@cpmsftngxa06.phx.gbl...

Yan-Hong Huang[MSFT]

unread,
Aug 21, 2003, 2:42:50 AM8/21/03
to
Hi Tim,

It seems that asp.net is corrupted on the system. Please try to reinstall asp.net on the system.

This KB helps. http://support.microsoft.com/?id=306005

Thanks.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!From: "Tim Riley" <do...@thinkboutit.com>

!References: <3cf001c3251f$c59b77a0$a001...@phx.gbl> <#zhzAUoZ...@tk2msftngp13.phx.gbl>
<48ELCXvZ...@cpmsftngxa06.phx.gbl>


!Subject: Re: POST call to web service fails on remote PC

!Date: Wed, 20 Aug 2003 08:27:35 -0400
!Lines: 184


!X-Priority: 3
!X-MSMail-Priority: Normal
!X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
!X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165

!Message-ID: <uQy8xZxZ...@TK2MSFTNGP12.phx.gbl>
!Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
!NNTP-Posting-Host: 167.95.99.143
!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet.webservices:18898
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
!
!Yes the settings in Machine.Config are as specified, including
!HttpPostLocalhost and I still get the same error.
!
!
!"Yan-Hong Huang[MSFT]" <yhh...@online.microsoft.com> wrote in message
!news:48ELCXvZ...@cpmsftngxa06.phx.gbl...
!> Hi Tim,
!>
!> Did you confirm that you have changed the setting in machine.config?
!Thanks.
!>
!> Best regards,
!> Yanhong Huang
!> Microsoft Online Partner Support
!>
!> Get Secure! - www.microsoft.com/security
!> This posting is provided "AS IS" with no warranties, and confers no
!rights.
!>
!> --------------------
!> !From: "Tim Riley" <do...@thinkboutit.com>
!> !References: <3cf001c3251f$c59b77a0$a001...@phx.gbl>
!> !Subject: Re: POST call to web service fails on remote PC
!> !Date: Tue, 19 Aug 2003 15:06:25 -0400
!> !Lines: 135
!> !X-Priority: 3
!> !X-MSMail-Priority: Normal
!> !X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
!> !X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
!> !Message-ID: <#zhzAUoZ...@tk2msftngp13.phx.gbl>
!> !Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
!> !NNTP-Posting-Host: 167.95.99.143
!> !Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
!> !Xref: cpmsftngxa06.phx.gbl
!microsoft.public.dotnet.framework.aspnet.webservices:18886
!> !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
!> !


!> !I get the following error, can you help
!> !
!> !Server Error in '/TempService' Application.
!> !

!>
!!---------------------------------------------------------------------------
!-
!> !----
!> !


!> !Path 'POST' is forbidden.

!> !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.Web.HttpException: Path 'POST' is forbidden.
!> !
!> !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:
!> !
!> ! [HttpException (0x80004005): Path 'POST' is forbidden.]

!> !System.Web.HttpMethodNotAllowedHandler.ProcessRequest(HttpContext
!context)
!>
!!System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionSt
!e
!> !p.Execute() System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
!> !Boolean& completedSynchronously) +87
!> !
!> !
!> !
!> !
!>
!!---------------------------------------------------------------------------
!-
!> !----


!> !
!> !
!> !
!> !"Garry Moore" <gms...@telkomsa.net> wrote in message

!> !news:3cf001c3251f$c59b77a0$a001...@phx.gbl...
!> !> Hi,
!> !>


!> !> I have a web service that I am calling from a HTML page

!> !> using a POST. The following is the relevant HTML.


!> !>
!> !> In File 'TestWebService.htm' :

!> !> <form method=POST
!> !> action='http://165.165.197.98/TickPriceWeb/ClientWebServic
!> !> es.asmx/TestService' ID="Form1">
!> !> <input type="text" size="10" name="inText"
!> !> ID="inText">
!> !> <br>Result =
!> !> <input type=submit value="TestService"
!> !> ID="TestService" NAME="TestService">
!> !> </form>
!> !>


!> !> This works fine on the local machine. If you change the

!> !> POST to a GET it fails with the error shown below, but I
!> !> believe that is due to support for GET requests being
!> !> dropped in the .NET 1.1 framework.


!> !>
!> !> If I call this same page from a remote machine (via

!> !> dialup network and not on the local machine) then the
!> !> POST fails with the same error (cannot do POST or GET). I
!> !> can see the page and enter the test message but when the
!> !> POST is sent it is obviously not getting through?


!> !>
!> !> Open the page on the remote machines IE 6 using url :

!> !> http://165.165.197.98/TickPriceWeb/TextWebService.htm


!> !>
!> !> Does the POST only work on the local machine? What be the

!> !> point of that? Does it mean that you can only use SOAP
!> !> message to call a web service?


!> !>
!> !> Does anyone have any suggestions of how to invoke the web

!> !> service from an HTML page?


!> !>
!> !> This code is copyied from the MSDN article:

!> !> .NET Framework Developer's Guide
!> !> Accessing XML Web Services from a Browser [C#]


!> !>
!> !> I gather the docs for the .NET 1.1 framework are not yet

!> !> ready and I cannot find any documentation on what they
!> !> changed. (e.g removing the GET support)
!> !>
!> !> Regards,
!> !> Garry Moore
!> !>
!> !> Error:
!> !> ----------------------------------------------------------
!> !> ------------------------------
!> !> 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.Cor
!> !> eGetHandler(Type
!> !> type, HttpContext context, HttpRequest request,
!> !> HttpResponse response)
!> !> System.Web.Services.Protocols.WebServiceHandlerFactory.Get
!> !> Handler(HttpContex
!> !> t context, String verb, String url, String filePath)
!> !> System.Web.HttpApplication.MapHttpHandler(HttpContext
!> !> context, String
!> !> requestType, String path, String pathTranslated, Boolean
!> !> useAppConfig)
!> !> System.Web.MapHandlerExecutionStep.System.Web.HttpApplicat
!> !> ion+IExecutionStep
!> !> .Execute()
!> !> System.Web.HttpApplication.ExecuteStep(IExecutionStep
!> !> step, Boolean&
!> !> completedSynchronously
!> !>
!> !
!> !
!> !
!>
!>
!
!
!


0 new messages