[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webservices

Re: POST call to web service fails on remote PC

Tim Riley

8/19/2003 7:06:00 PM

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" <gmspam@telkomsa.net> wrote in message
news:3cf001c3251f$c59b77a0$a001280a@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/Clien...
> 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/TextWebS...
>
> 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
>


3 Answers

yhhuang

8/20/2003 8:34:00 AM

0

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" <dont@thinkboutit.com>
!References: <3cf001c3251f$c59b77a0$a001280a@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: <#zhzAUoZDHA.3444@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" <gmspam@telkomsa.net> wrote in message
!news:3cf001c3251f$c59b77a0$a001280a@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/Clien...
!> 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/TextWebS...
!>
!> 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

8/20/2003 12:28:00 PM

0

Yes the settings in Machine.Config are as specified, including
HttpPostLocalhost and I still get the same error.


"Yan-Hong Huang[MSFT]" <yhhuang@online.microsoft.com> wrote in message
news:48ELCXvZDHA.2108@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" <dont@thinkboutit.com>
> !References: <3cf001c3251f$c59b77a0$a001280a@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: <#zhzAUoZDHA.3444@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" <gmspam@telkomsa.net> wrote in message
> !news:3cf001c3251f$c59b77a0$a001280a@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/Clien...
> !> 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/TextWebS...
> !>
> !> 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
> !>
> !
> !
> !
>
>


yhhuang

8/21/2003 6:43:00 AM

0

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/...

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" <dont@thinkboutit.com>
!References: <3cf001c3251f$c59b77a0$a001280a@phx.gbl> <#zhzAUoZDHA.3444@tk2msftngp13.phx.gbl>
<48ELCXvZDHA.2108@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: <uQy8xZxZDHA.2284@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]" <yhhuang@online.microsoft.com> wrote in message
!news:48ELCXvZDHA.2108@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" <dont@thinkboutit.com>
!> !References: <3cf001c3251f$c59b77a0$a001280a@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: <#zhzAUoZDHA.3444@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" <gmspam@telkomsa.net> wrote in message
!> !news:3cf001c3251f$c59b77a0$a001280a@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/Clien...
!> !> 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/TextWebS...
!> !>
!> !> 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
!> !>
!> !
!> !
!> !
!>
!>
!
!
!