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

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
9/17/2010 10:10:16 AM
Gravatar
Total Posts 108

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

Hi Joe

This is driving me a bit nuts. Trying to implement a simple hello word control that does a postback, but each time I hit the button, i get the following msg

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

[HttpException (0x80004005): The HTTP verb POST used to access path '/' is not allowed.]
   System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext context, AsyncCallback callback, Object state) +2871482
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8679426
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

 

The error shows up if i run the project and hit my button straight away. But if i go to page settings, then back to the page in question, and press the button it works. I want to be able to hit the button and then it fill in a textbox saying "hello world" for now.

My usercontrol codebehind is .... as you can see i've used   Page.EnableViewState = true; as suggested in your hello world page. any help would be greatly appreciated.

 

Thanks

Tim

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using System.Globalization;
using mojoPortal.Business;
using mojoPortal.Business.WebHelpers;
using mojoPortal.Web.Framework;
using mojoPortal.Web.Controls;
using mojoPortal.Web.Editor;
using mojoPortal.Net;
using System.Configuration;
using log4net;
using mojoPortal.Web.UI;
using Resources;

namespace Bigberry.Features.UI.Password
{
    public partial class passwordChange : UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Page.EnableViewState = true;
        }


        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            Page.EnableViewState = true;


        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            TextBox1.Text = "hello world";
        }
    }
}

9/17/2010 10:13:57 AM
Gravatar
Total Posts 108

Re: The HTTP verb POST used to access path '/' is not allowed

and the front end is

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="passwordChange.ascx.cs" Inherits="Bigberry.Features.UI.Password.passwordChange" %>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />

 

i've registered the control in the ms's features installation section without any problem.

(im using version 2.3.4.3 MSSQL, vs2008 on windows 7)
 

9/17/2010 10:16:19 AM
Gravatar
Total Posts 9

Re: The HTTP verb POST used to access path '/' is not allowed

I ran into this before...    When I run mojo from Visual Studio, and it's using the "ASP.NET" development server" (rather than IIS), I'll get this error if the URL is http://localhost:60941/   rather than http://localhost:60941/default.aspx.

Once I copied the site to IIS, the error went away.

Hope it helps,

Jim

9/17/2010 10:18:11 AM
Gravatar
Total Posts 18444

Re: The HTTP verb POST used to access path '/' is not allowed

Hi,

I've seen this kind of thing happen in Visual Studio when you are working on the home page with the url /, but it works if you use /Default.aspx or home.aspx if that is the page url. The problem does not happen in IIS though so it is really a dev environment issue. You may have better luck testing/developing your feature on a different page than the home page if working in VS.

Hope it helps,

Joe

9/17/2010 10:23:29 AM
Gravatar
Total Posts 108

Re: The HTTP verb POST used to access path '/' is not allowed

I see, so you reckon it'll work if i put it straight onto a web server. Cool shall give it a go. 

Ah man i spent all day trying to figure it out. Could you put a note on the hello world page Joe? Think it would deffo be helpful for the community :)

Have a nice weekend

Tim

9/17/2010 12:26:13 PM
Gravatar
Total Posts 190

Re: The HTTP verb POST used to access path '/' is not allowed

Not that I have anything useful to add, but I can also corroborate this behavior happens in my projects just like described here. Can't post anything in a form on the home page with '/' url in VS development server. Everything works fine on the web server though.

9/18/2010 8:06:39 AM
Gravatar
Total Posts 18444

Re: The HTTP verb POST used to access path '/' is not allowed

I've added a link to this thread on the hello world document

http://www.mojoportal.com/hello-world-developer-quick-start.aspx

Best,

Joe

11/10/2010 8:50:23 AM
Gravatar
Total Posts 13

Re: The HTTP verb POST used to access path '/' is not allowed

Joe, tengo un control de usuario compuesto por un EventCalendar, dos GridView, dos DropDownList y un ModalPopup. El hecho es que los GridView y el ModalPopup hacen uso de un Theme parte del proyecto. El control de usuario funciona perfectamente pero no sé como integrarlo a la web, por favor te agradeceria tu ayuda.

Saludos desde Lima - Perú

11/10/2010 9:23:07 AM
Gravatar
Total Posts 108
Community Expert

Re: The HTTP verb POST used to access path '/' is not allowed

hola hextor primero que todo deberias postear una nueva pregunta en el foro, y no colocarla dentro de otra que no tiene nada que ver.

Segundo te contesto, para incluir un control personalizado tienes dos opciones, crear un modulo completo o agregar a tu control los namespace de mojoportal.  

Para hacer lo primero puedes leer la documentacion que encontraras en http://www.mojoportal.com/addingfeatures.aspx

para hacer lo segundo tendrias que agregar estos namespace en tu control

<%@ Import Namespace="mojoPortal.Business" %>
<%@ Import Namespace="mojoPortal.Business.WebHelpers" %>
<%@ Import Namespace="mojoPortal.Web.Framework" %>
<%@ Import Namespace="mojoPortal.Web.Controls" %>
<%@ Import Namespace="mojoPortal.Web.Editor" %>
<%@ Import Namespace="mojoPortal.Net" %>

y luego incluirlo dentro del sitio web desde  Menú de Administración > Herramientas Avanzadas > Configuración/Instalación de las Funcionalidades > Añadir Nueva Funcionalidad

 

Depende del alcance de lo que quieras conseguir una aproximación seria mejor que la otra.

11/10/2010 9:47:48 AM
Gravatar
Total Posts 13

Re: The HTTP verb POST used to access path '/' is not allowed

Gerrmán:

Te cuento que no sabia donde postear mi pregunta por lo mismo que soy nuevo y no encontraba donde abrir un nuevo tema... en fin, agradezco encarecidamente tu pronta respuesta e inmediatamente voy a seguir tus consejos.

Saludos,

Hector.

You must sign in to post in the forums. This thread is closed to new posts.