PC Review


Reply
Thread Tools Rating: Thread Rating: 14 votes, 4.71 average.

HTTP verb POST used not allowed

 
 
Ben
Guest
Posts: n/a
 
      3rd Jul 2007
Hi,

i try to submit a form in an aspx file through javascript to an classic asp
page like this:

<form id="ins" method="post">
<input id="conn" name="conn" type="hidden" />
<input runat="server" id="submit1" type="button" onclick="inexcel()"/>
</form>
<script language="javascript" type="text/javascript">
function infilel()
{
document.getElementById("conn").value=conn
document.getElementById("ins").action="infile.asp"
document.getElementById("ins").submit()
return true;
}

</script>


i get the message: The HTTP verb POST used to access path
'/enquete/infile.asp' is not allowed.

I know classic asp pages are allowed to run because in this asp.net
application, using e.g. window.location.href="myfile.asp" works.

What do i have to change in the configuration of IIS 5.0 (or 6.0) to make
this run, or is it an asp.net issue?

Thanks for help
Ben







 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      3rd Jul 2007
I'm not sure if this will work, but try :

<asp:Button
ID="Button1"
PostBackUrl="/enquete/infile.asp"
runat="server"
Text="Submit" />

In ASP.NET,. you need to set the PostBackUrl in order to do cross page posting.

I know that works when the page being posted to is an aspx page,
but try it and see if it works for asp pages, too.

What I *do* know is that if you *don't* set the PostBackUrl, you can't cross-post.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
======================================
"Ben" <b@bn> wrote in message news:O$(E-Mail Removed)...
> Hi,
>
> i try to submit a form in an aspx file through javascript to an classic asp page like this:
>
> <form id="ins" method="post">
> <input id="conn" name="conn" type="hidden" />
> <input runat="server" id="submit1" type="button" onclick="inexcel()"/>
> </form>
> <script language="javascript" type="text/javascript">
> function infilel()
> {
> document.getElementById("conn").value=conn
> document.getElementById("ins").action="infile.asp"
> document.getElementById("ins").submit()
> return true;
> }
>
> </script>
>
>
> i get the message: The HTTP verb POST used to access path '/enquete/infile.asp' is not allowed.
>
> I know classic asp pages are allowed to run because in this asp.net application, using e.g.
> window.location.href="myfile.asp" works.
>
> What do i have to change in the configuration of IIS 5.0 (or 6.0) to make this run, or is it an asp.net issue?
>
> Thanks for help
> Ben
>
>
>
>
>
>
>




 
Reply With Quote
 
 
 
 
Ben
Guest
Posts: n/a
 
      3rd Jul 2007
Thanks, i'll try

"Juan T. Llibre" <(E-Mail Removed)> schreef in bericht
news:(E-Mail Removed)...
> I'm not sure if this will work, but try :
>
> <asp:Button
> ID="Button1"
> PostBackUrl="/enquete/infile.asp"
> runat="server"
> Text="Submit" />
>
> In ASP.NET,. you need to set the PostBackUrl in order to do cross page
> posting.
>
> I know that works when the page being posted to is an aspx page,
> but try it and see if it works for asp pages, too.
>
> What I *do* know is that if you *don't* set the PostBackUrl, you can't
> cross-post.
>
>
>
>
> Juan T. Llibre, asp.net MVP
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en espaņol : http://asp.net.do/foros/
> ======================================
> "Ben" <b@bn> wrote in message news:O$(E-Mail Removed)...
>> Hi,
>>
>> i try to submit a form in an aspx file through javascript to an classic
>> asp page like this:
>>
>> <form id="ins" method="post">
>> <input id="conn" name="conn" type="hidden" />
>> <input runat="server" id="submit1" type="button"
>> onclick="inexcel()"/>
>> </form>
>> <script language="javascript" type="text/javascript">
>> function infilel()
>> {
>> document.getElementById("conn").value=conn
>> document.getElementById("ins").action="infile.asp"
>> document.getElementById("ins").submit()
>> return true;
>> }
>>
>> </script>
>>
>>
>> i get the message: The HTTP verb POST used to access path
>> '/enquete/infile.asp' is not allowed.
>>
>> I know classic asp pages are allowed to run because in this asp.net
>> application, using e.g.
>> window.location.href="myfile.asp" works.
>>
>> What do i have to change in the configuration of IIS 5.0 (or 6.0) to make
>> this run, or is it an asp.net issue?
>>
>> Thanks for help
>> Ben
>>
>>
>>
>>
>>
>>
>>

>
>
>



 
Reply With Quote
 
bruce barker
Guest
Posts: n/a
 
      3rd Jul 2007
location.href is a GET. the error means iis is not configred to allow
post to an asp application in the vdir. look at the mapping and add the
POST verb.

-- bruce (sqlwork.com)

Ben wrote:
> Hi,
>
> i try to submit a form in an aspx file through javascript to an classic asp
> page like this:
>
> <form id="ins" method="post">
> <input id="conn" name="conn" type="hidden" />
> <input runat="server" id="submit1" type="button" onclick="inexcel()"/>
> </form>
> <script language="javascript" type="text/javascript">
> function infilel()
> {
> document.getElementById("conn").value=conn
> document.getElementById("ins").action="infile.asp"
> document.getElementById("ins").submit()
> return true;
> }
>
> </script>
>
>
> i get the message: The HTTP verb POST used to access path
> '/enquete/infile.asp' is not allowed.
>
> I know classic asp pages are allowed to run because in this asp.net
> application, using e.g. window.location.href="myfile.asp" works.
>
> What do i have to change in the configuration of IIS 5.0 (or 6.0) to make
> this run, or is it an asp.net issue?
>
> Thanks for help
> Ben
>
>
>
>
>
>
>

 
Reply With Quote
 
Ben
Guest
Posts: n/a
 
      3rd Jul 2007
In the configuration of IIS, in the list of the extentions, there is .ASP
with following verbs:
GET, POST, TRACE, HEAD ..

so ...??

"bruce barker" <(E-Mail Removed)> schreef in bericht
news:(E-Mail Removed)...
> location.href is a GET. the error means iis is not configred to allow post
> to an asp application in the vdir. look at the mapping and add the POST
> verb.
>
> -- bruce (sqlwork.com)
>
> Ben wrote:
>> Hi,
>>
>> i try to submit a form in an aspx file through javascript to an classic
>> asp page like this:
>>
>> <form id="ins" method="post">
>> <input id="conn" name="conn" type="hidden" />
>> <input runat="server" id="submit1" type="button"
>> onclick="inexcel()"/>
>> </form>
>> <script language="javascript" type="text/javascript">
>> function infilel()
>> {
>> document.getElementById("conn").value=conn
>> document.getElementById("ins").action="infile.asp"
>> document.getElementById("ins").submit()
>> return true;
>> }
>>
>> </script>
>>
>>
>> i get the message: The HTTP verb POST used to access path
>> '/enquete/infile.asp' is not allowed.
>>
>> I know classic asp pages are allowed to run because in this asp.net
>> application, using e.g. window.location.href="myfile.asp" works.
>>
>> What do i have to change in the configuration of IIS 5.0 (or 6.0) to make
>> this run, or is it an asp.net issue?
>>
>> Thanks for help
>> Ben
>>
>>
>>
>>
>>
>>


 
Reply With Quote
 
David Wang
Guest
Posts: n/a
 
      4th Jul 2007
IIS and ASP does not have error message that looks like:
"The HTTP verb POST used to access path '/enquete/infile.asp' is not
allowed"

I would go down the ASP.Net configuration route.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//





On Jul 3, 3:09 pm, "Ben" <b@bn> wrote:
> In the configuration of IIS, in the list of the extentions, there is .ASP
> with following verbs:
> GET, POST, TRACE, HEAD ..
>
> so ...??
>
> "bruce barker" <nos...@nospam.com> schreef in berichtnews:(E-Mail Removed)...
>
>
>
> > location.href is a GET. the error means iis is not configred to allow post
> > to an asp application in the vdir. look at the mapping and add the POST
> > verb.

>
> > -- bruce (sqlwork.com)

>
> > Ben wrote:
> >> Hi,

>
> >> i try to submit a form in an aspx file through javascript to an classic
> >> asp page like this:

>
> >> <form id="ins" method="post">
> >> <input id="conn" name="conn" type="hidden" />
> >> <input runat="server" id="submit1" type="button"
> >> onclick="inexcel()"/>
> >> </form>
> >> <script language="javascript" type="text/javascript">
> >> function infilel()
> >> {
> >> document.getElementById("conn").value=conn
> >> document.getElementById("ins").action="infile.asp"
> >> document.getElementById("ins").submit()
> >> return true;
> >> }

>
> >> </script>

>
> >> i get the message: The HTTP verb POST used to access path
> >> '/enquete/infile.asp' is not allowed.

>
> >> I know classic asp pages are allowed to run because in this asp.net
> >> application, using e.g. window.location.href="myfile.asp" works.

>
> >> What do i have to change in the configuration of IIS 5.0 (or 6.0) to make
> >> this run, or is it an asp.net issue?

>
> >> Thanks for help
> >> Ben- Hide quoted text -

>
> - Show quoted text -



 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      4th Jul 2007
Ben, David :

I constructed a simple page which proves that you can post
to an ASP page from an ASPX page using PostBackUrl.

See it working at :

http://asp.net.do/test/cross-post.aspx

Just write your name...and submit the form.
The ASP page returns your name using Request.Form.

Here's the code for the ASPX page :

form ID= "Check" runat="server">
Write your name:
<asp:TextBox ID="Name" runat="server" />
<asp:Button ID= "crosspost" Text="Post to an ASP page" runat="server" PostbackUrl="cross-posted.asp" />
</form>

Here's the code in "cross-posted.asp" :

<%
Response.Write Request.Form("Name") & "<BR>"
%>

It's very simple...and works fine.





Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
======================================
"David Wang" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> IIS and ASP does not have error message that looks like:
> "The HTTP verb POST used to access path '/enquete/infile.asp' is not
> allowed"
>
> I would go down the ASP.Net configuration route.
>
>
> //David
> http://w3-4u.blogspot.com
> http://blogs.msdn.com/David.Wang
> //
>
>
>
>
>
> On Jul 3, 3:09 pm, "Ben" <b@bn> wrote:
>> In the configuration of IIS, in the list of the extentions, there is .ASP
>> with following verbs:
>> GET, POST, TRACE, HEAD ..
>>
>> so ...??
>>
>> "bruce barker" <nos...@nospam.com> schreef in berichtnews:(E-Mail Removed)...
>>
>>
>>
>> > location.href is a GET. the error means iis is not configred to allow post
>> > to an asp application in the vdir. look at the mapping and add the POST
>> > verb.

>>
>> > -- bruce (sqlwork.com)

>>
>> > Ben wrote:
>> >> Hi,

>>
>> >> i try to submit a form in an aspx file through javascript to an classic
>> >> asp page like this:

>>
>> >> <form id="ins" method="post">
>> >> <input id="conn" name="conn" type="hidden" />
>> >> <input runat="server" id="submit1" type="button"
>> >> onclick="inexcel()"/>
>> >> </form>
>> >> <script language="javascript" type="text/javascript">
>> >> function infilel()
>> >> {
>> >> document.getElementById("conn").value=conn
>> >> document.getElementById("ins").action="infile.asp"
>> >> document.getElementById("ins").submit()
>> >> return true;
>> >> }

>>
>> >> </script>

>>
>> >> i get the message: The HTTP verb POST used to access path
>> >> '/enquete/infile.asp' is not allowed.

>>
>> >> I know classic asp pages are allowed to run because in this asp.net
>> >> application, using e.g. window.location.href="myfile.asp" works.

>>
>> >> What do i have to change in the configuration of IIS 5.0 (or 6.0) to make
>> >> this run, or is it an asp.net issue?

>>
>> >> Thanks for help
>> >> Ben- Hide quoted text -

>>
>> - Show quoted text -

>
>



 
Reply With Quote
 
David Wang
Guest
Posts: n/a
 
      4th Jul 2007
I don't think anyone was disproving your statement.

I'm just saying that the error did not come from IIS/ASP, so the issue
comes from how ASP.Net is used. That is certainly correct and not
disproving anything else.

Ben's example was not using PostBackUrl. Perhaps that is the issue...
in which case all is well.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//




On Jul 4, 6:07 am, "Juan T. Llibre" <nomailrepl...@nowhere.com> wrote:
> Ben, David :
>
> I constructed a simple page which proves that you can post
> to an ASP page from an ASPX page using PostBackUrl.
>
> See it working at :
>
> http://asp.net.do/test/cross-post.aspx
>
> Just write your name...and submit the form.
> The ASP page returns your name using Request.Form.
>
> Here's the code for the ASPX page :
>
> form ID= "Check" runat="server">
> Write your name:
> <asp:TextBox ID="Name" runat="server" />
> <asp:Button ID= "crosspost" Text="Post to an ASP page" runat="server" PostbackUrl="cross-posted.asp" />
> </form>
>
> Here's the code in "cross-posted.asp" :
>
> <%
> Response.Write Request.Form("Name") & "<BR>"
> %>
>
> It's very simple...and works fine.
>
> Juan T. Llibre, asp.net MVP
> asp.net faq :http://asp.net.do/faq/
> foros de asp.net, en espaņol :http://asp.net.do/foros/
> ======================================
>
>
>
> "David Wang" <w3.4...@gmail.com> wrote in messagenews:(E-Mail Removed)...
> > IIS and ASP does not have error message that looks like:
> > "The HTTP verb POST used to access path '/enquete/infile.asp' is not
> > allowed"

>
> > I would go down the ASP.Net configuration route.

>
> > //David
> >http://w3-4u.blogspot.com
> >http://blogs.msdn.com/David.Wang
> > //

>
> > On Jul 3, 3:09 pm, "Ben" <b@bn> wrote:
> >> In the configuration of IIS, in the list of the extentions, there is .ASP
> >> with following verbs:
> >> GET, POST, TRACE, HEAD ..

>
> >> so ...??

>
> >> "bruce barker" <nos...@nospam.com> schreef in berichtnews:(E-Mail Removed)...

>
> >> > location.href is a GET. the error means iis is not configred to allow post
> >> > to an asp application in the vdir. look at the mapping and add the POST
> >> > verb.

>
> >> > -- bruce (sqlwork.com)

>
> >> > Ben wrote:
> >> >> Hi,

>
> >> >> i try to submit a form in an aspx file through javascript to an classic
> >> >> asp page like this:

>
> >> >> <form id="ins" method="post">
> >> >> <input id="conn" name="conn" type="hidden" />
> >> >> <input runat="server" id="submit1" type="button"
> >> >> onclick="inexcel()"/>
> >> >> </form>
> >> >> <script language="javascript" type="text/javascript">
> >> >> function infilel()
> >> >> {
> >> >> document.getElementById("conn").value=conn
> >> >> document.getElementById("ins").action="infile.asp"
> >> >> document.getElementById("ins").submit()
> >> >> return true;
> >> >> }

>
> >> >> </script>

>
> >> >> i get the message: The HTTP verb POST used to access path
> >> >> '/enquete/infile.asp' is not allowed.

>
> >> >> I know classic asp pages are allowed to run because in this asp.net
> >> >> application, using e.g. window.location.href="myfile.asp" works.

>
> >> >> What do i have to change in the configuration of IIS 5.0 (or 6.0) to make
> >> >> this run, or is it an asp.net issue?

>
> >> >> Thanks for help
> >> >> Ben- Hide quoted text -

>
> >> - Show quoted text -- Hide quoted text -

>
> - Show quoted text -



 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      4th Jul 2007
re:
!> I don't think anyone was disproving your statement.

No problem. I didn't think that was the case.
I only wanted to provide the solution.

re:
!> Ben's example was not using PostBackUrl. Perhaps that is the issue...

Indeed, it is the issue. Using PostBackUrl is the solution.



Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
======================================
"David Wang" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
I don't think anyone was disproving your statement.

I'm just saying that the error did not come from IIS/ASP, so the issue
comes from how ASP.Net is used. That is certainly correct and not
disproving anything else.

Ben's example was not using PostBackUrl. Perhaps that is the issue...
in which case all is well.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//

On Jul 4, 6:07 am, "Juan T. Llibre" <nomailrepl...@nowhere.com> wrote:
> Ben, David :
>
> I constructed a simple page which proves that you can post
> to an ASP page from an ASPX page using PostBackUrl.
>
> See it working at :
>
> http://asp.net.do/test/cross-post.aspx
>
> Just write your name...and submit the form.
> The ASP page returns your name using Request.Form.
>
> Here's the code for the ASPX page :
>
> form ID= "Check" runat="server">
> Write your name:
> <asp:TextBox ID="Name" runat="server" />
> <asp:Button ID= "crosspost" Text="Post to an ASP page" runat="server" PostbackUrl="cross-posted.asp" />
> </form>
>
> Here's the code in "cross-posted.asp" :
>
> <%
> Response.Write Request.Form("Name") & "<BR>"
> %>
>
> It's very simple...and works fine.
>
> Juan T. Llibre, asp.net MVP
> asp.net faq :http://asp.net.do/faq/
> foros de asp.net, en espaņol :http://asp.net.do/foros/
> ======================================
>
>
>
> "David Wang" <w3.4...@gmail.com> wrote in messagenews:(E-Mail Removed)...
> > IIS and ASP does not have error message that looks like:
> > "The HTTP verb POST used to access path '/enquete/infile.asp' is not
> > allowed"

>
> > I would go down the ASP.Net configuration route.

>
> > //David
> >http://w3-4u.blogspot.com
> >http://blogs.msdn.com/David.Wang
> > //

>
> > On Jul 3, 3:09 pm, "Ben" <b@bn> wrote:
> >> In the configuration of IIS, in the list of the extentions, there is .ASP
> >> with following verbs:
> >> GET, POST, TRACE, HEAD ..

>
> >> so ...??

>
> >> "bruce barker" <nos...@nospam.com> schreef in berichtnews:(E-Mail Removed)...

>
> >> > location.href is a GET. the error means iis is not configred to allow post
> >> > to an asp application in the vdir. look at the mapping and add the POST
> >> > verb.

>
> >> > -- bruce (sqlwork.com)

>
> >> > Ben wrote:
> >> >> Hi,

>
> >> >> i try to submit a form in an aspx file through javascript to an classic
> >> >> asp page like this:

>
> >> >> <form id="ins" method="post">
> >> >> <input id="conn" name="conn" type="hidden" />
> >> >> <input runat="server" id="submit1" type="button"
> >> >> onclick="inexcel()"/>
> >> >> </form>
> >> >> <script language="javascript" type="text/javascript">
> >> >> function infilel()
> >> >> {
> >> >> document.getElementById("conn").value=conn
> >> >> document.getElementById("ins").action="infile.asp"
> >> >> document.getElementById("ins").submit()
> >> >> return true;
> >> >> }

>
> >> >> </script>

>
> >> >> i get the message: The HTTP verb POST used to access path
> >> >> '/enquete/infile.asp' is not allowed.

>
> >> >> I know classic asp pages are allowed to run because in this asp.net
> >> >> application, using e.g. window.location.href="myfile.asp" works.

>
> >> >> What do i have to change in the configuration of IIS 5.0 (or 6.0) to make
> >> >> this run, or is it an asp.net issue?

>
> >> >> Thanks for help
> >> >> Ben- Hide quoted text -

>
> >> - Show quoted text -- Hide quoted text -

>
> - Show quoted text -




 
Reply With Quote
 
koreag01@gmail.com
Guest
Posts: n/a
 
      19th Jun 2012
K
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HTTP error 400, bad request (invalid verb) =?Utf-8?B?Vmlja2lKbw==?= Windows Vista Mail 8 5th Nov 2008 02:23 PM
MSAS Bug - wrong verb used when clicking "allow" on script file access Lucvdv Spyware Discussion 1 27th Dec 2005 04:01 AM
HTTP error 405 for 'PUT' verb Kenneth Myhra Microsoft ASP .NET 1 18th Feb 2004 12:42 AM
Bad Request (Invalid Verb) and HTTP 400 errors. Randy Windows XP Internet Explorer 1 1st Feb 2004 02:46 PM
Bad Request (Invalid Verb) and HTTP 400 errors. Randy Windows XP General 1 1st Feb 2004 02:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:13 AM.