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.
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.
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.
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.
Add this in a Facebook canvas url: http://localhost.local:3088/Default.aspx/
it work for me
精彩评论