This project is read-only.

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

Mar 20, 2012 at 6:17 PM

I followed tutorial but I get "The HTTP verb POST used to access path is not allowed.". Can you help me?

Mar 21, 2012 at 5:20 PM

This problem is caused by ASP.NET itself. It means that the server is not accepting a HTTP POST to the url http://example.com/ , but only something like http://example.com/Default.aspx .

The fix is simple. Put this in the Global.asax file:

 void Application_BeginRequest(object sender, EventArgs e) {
    string rawurl = Request.RawUrl;
    if (rawurl.EndsWith("/")) IframeRedirect("http://apps.facebook.com/xxxx/Default.aspx",true);
};

IframeRedirect is this function:

 string _script = string.Format("<script type=\"text/javascript\">\r\n" +
"top.location.href = \"{0}\";\r\n" +
"</script>", finalUrl);

HttpContext
.Current.Response.Write(_script);
HttpContext.Current.Response.End();