0
votes

I'm developing a very simple custom facebook tab in html, consisting of a simple background image and a few links. This page works fine on it's own, but when I go to the facebook canvas page I get this HTTP 405 error,

"The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access. Please try the following:

Contact the Web site administrator if you believe that this request should be allowed. Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly. HTTP Error 405 - The HTTP verb used to access this page is not allowed. Internet Information Services (IIS)"

I have renamed my page from an html file to an aspx file, as per similar questions suggested, but the error persists. What do I need to do to get my page to display? Thanks for any help.

Edit: The html looks like this, I don't know what would be throwing anything off in something so simple.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Title</title>
    <style type = "text/css">
        #content{ width: 520px; height: 775px; background: url('i/background.jpg') top left no-repeat; }
        a{ display: block; text-indent: -999em; position: absolute; background: url('i/links.png') no-repeat; }
    </style>
</head>
<body>
    <div id = "content">
        <a href = "www.google.com" target = "_blank" id = "link">Link</a>
    </div>
</body>
</html>

Edit in case somebody finds this by googling, the problem was that I didn't have a public facing url because the person in charge of setting up the server had hidden everything so he could try some stuff. Woo internal miscommunication.

4
can you show the sample code or the IFrame you are using ?Pankaj
As Juicy Scripter suggests all I did was change the extension of the file. This had seemed to work for people with similar issues.Tuck

4 Answers

4
votes

Probably changing extension of static page from .html to .aspx is not enough, and IIS is still limiting it to only allow GET requests, but visiting application on Facebook passing data to canvas URL via POST.

You can try to follow steps in next KB article http://support.microsoft.com/kb/942051

1
votes

No matter which way you do -- 1. renaming a .html to .aspx 2. create a new .aspx file

FB throws the same error. And the same page thing accessed using an iFrame locally works fine.

HTTP Error 405 - The HTTP verb used to access this page is not allowed. Internet Information Services (IIS)

Here is my .aspx code -- please advice if you find any solution.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Page Language="C#" %>
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">
<meta content="en-us" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Create My Resume</title>
<style type="text/css">
.auto-style1 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: xx-large;
}
.auto-style2 {
    font-family: Arial, Helvetica, sans-serif;
}
</style>
</head>

<body>

<form id="form1" runat="server" class="auto-style1">
    <strong>Welcome!</strong></form>
<p class="auto-style2"><strong>My first Facebook Application!</strong></p>

</body>

</html>
1
votes

My solution for the 405 error was to rename my index.html to index.php. Obviously in my case, my web server is set up to use php.

Facebook attempts to do a POST to index.html (or whatever the name of the file is), something which I believe most web servers are not set up to allow. (I do believe you can alter these of necessary, in order to keep the .html extension)

-1
votes

May be it is a little later for answer, but ... Rename fiel index.html to default.aspx. If you use aspx hosting, then you have to named index file for your app "default.aspx