来自 aspx 页面的 Facebook 应用程序出现 405 错误

发布于 2025-01-07 10:29:08 字数 1197 浏览 0 评论 0原文

我正在 html 中开发一个非常简单的自定义 facebook 选项卡,由一个简单的背景图像和一些链接组成。该页面本身工作正常,但当我转到 facebook 画布页面时,我收到此 HTTP 405 错误,

“无法显示您正在查找的页面,因为尝试访问时使用了无效方法(HTTP 动词)。 请尝试以下操作:

如果您认为应允许此请求,请与网站管理员联系。 确保浏览器地址栏中显示的网站地址拼写和格式正确。 HTTP 错误 405 - 不允许使用用于访问此页面的 HTTP 谓词。 Internet 信息服务 (IIS)”

我已按照建议的类似问题将我的页面从 html 文件重命名为 aspx 文件,但错误仍然存​​在。我需要做什么才能显示我的页面?感谢您的帮助。

编辑:html 看起来像这样,我不知道在如此简单的事情中会抛出任何东西,

<!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>

以防有人通过谷歌搜索找到这个,问题是我没有面向公众的网址,因为这个人在。设置服务器的费用隐藏了一切所以他可以尝试一些内部沟通不畅的事情。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

你丑哭了我 2025-01-14 10:29:08

可能将静态页面的扩展名从 .html 更改为 .aspx 还不够,IIS 仍然限制它只允许 GET 请求,但是Facebook 上的访问应用程序通过 POST 将数据传递到画布 URL。

您可以尝试按照下一篇知识库文章 http://support.microsoft.com/kb/942051

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

多情癖 2025-01-14 10:29:08

无论你采取哪种方式——
1. 将 .html 重命名为 .aspx
2.创建一个新的.aspx文件

FB抛出同样的错误。使用 iFrame 在本地访问的同一页面可以正常工作。

HTTP 错误 405 - 不允许使用用于访问此页面的 HTTP 谓词。 Internet 信息服务 (IIS)

这是我的 .aspx 代码 - 如果您找到任何解决方案,请提出建议。

<!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>

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>
真心难拥有 2025-01-14 10:29:08

我对 405 错误的解决方案是将我的index.html 重命名为index.php。显然,就我而言,我的网络服务器设置为使用 php。

Facebook 尝试对 index.html(或任何文件名)执行 POST,我相信大多数网络服务器都不允许这样做。 (我确实相信您可以更改这些必要的内容,以保留 .html 扩展名)

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)

掩耳倾听 2025-01-14 10:29:08

也许答案会晚一点,但是......
将字段index.html 重命名为default.aspx。如果您使用 aspx 托管,则必须为您的应用程序命名索引文件“default.aspx

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文