HTTP verb POST used to access path '/' is not allowed in Facebook app

丶灬走出姿态 提交于 2019-12-13 16:08:26

问题


I'm trying to build simple facebook application with 4.2.1 C# SDK. But I have an error:

The HTTP verb POST used to access path '/' is not allowed.
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: The HTTP verb POST used to access path '/' is not allowed.

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): The HTTP verb POST used to access path '/' is not allowed.]
   System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext context, AsyncCallback callback, Object state) +2488621
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8841400
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1 

I'm using Web.config from this SO Q&A.


回答1:


I don't use ASP.NET, but i'd say that you have to handle POST requests somewhere. You might also want to disable POST for canvas on your application's settings on Facebook.




回答2:


While a Canvas URL value has to end in "/", the Tabl URL can be a fully qualified page (e.g. http://example.com/dir/Default.aspx).

I'm working locally, so http://localhost:4604/Main/Default.aspx worked for me.




回答3:


Disable the post on canvas won't be anymore an option for security reasons, read about it specifically the timeline section. If you're using the asp.net development server i recommend you publish to your web server, so you can avoid another issues.




回答4:


Add this in a Facebook canvas url: http://localhost.local:3088/Default.aspx/ it work for me



来源:https://stackoverflow.com/questions/4699375/http-verb-post-used-to-access-path-is-not-allowed-in-facebook-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!