The HTTP verb POST used to access path '/virtual/' is not allowed.

6 posts, 0 answers
  1. Richard Weeks
    Richard Weeks avatar
    95 posts
    Member since:
    Oct 2009

    Posted 06 Feb 2012 Link to this post

    I am using a RadGrid and capturing the client click of a row through OnItemCommand. I receive the error:
    • The HTTP verb POST used to access path '/virtual/' is not allowed.

    Code (simplified):
    protected void Grid_OnItemCommand(object sender, GridCommandEventArgs e)
    {
        ...
        Response.Redirect("~/Page.aspx?id=" + id, false);
        ...
    }

    I think the issue is that the landing page is at the root of the virtual directory. So the postback from the grid is going to /virtual/ and not /virtual/Default.aspx. I think IIS doesn't like the lack of a page.

    How do I stop these errors when posting back in a grid to a default document? I can't tell users to type in a fully qualified URL.

    Richard
  2. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 07 Feb 2012 Link to this post

    Hi Richard,

    Have you tried setting the action property of your form tag to the default page in your root directory: Default.aspx as far as I understand?

    Greetings, Tsvetoslav
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Richard Weeks
    Richard Weeks avatar
    95 posts
    Member since:
    Oct 2009

    Posted 07 Feb 2012 Link to this post

    Hi, the form tags are set in the master page and used for all pages.

    Richard
  5. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 08 Feb 2012 Link to this post

    Hi Richard,

    That's all right - could you try it for the form tag on the master page? 

    Greetings,
    Tsvetoslav
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  6. Richard Weeks
    Richard Weeks avatar
    95 posts
    Member since:
    Oct 2009

    Posted 14 Feb 2012 Link to this post

    Hi,

    I fixed the issue (I think) using information from this post:

    http://www.telerik.com/community/forums/aspnet-ajax/ajax/net-version-problem.aspx

    Is that a correct fix? Is there anything I should be aware of?

    Our application is quite large and I worry about introducing further breaking changes,

    Richard
  7. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 14 Feb 2012 Link to this post

    Hi Richard,

    Both the web.config solutions (in case you are using RadCompression) and the Page_Load code statement setting the form's action property are viable and correct.
     
    Regards,
    Tsvetoslav
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017