vs2010 Express asp.net C#:facebook asp.net应用程序 [英] vs2010 express asp.net c#: facebook asp.net application

查看:55
本文介绍了vs2010 Express asp.net C#:facebook asp.net应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人能够针对其本地主机在Facebook上测试Facebook应用程序?

Has any one able to test facebook application from facebook against their localhost machine?

推荐答案

您首先需要确保您在本地主机上运行的网站对互联网可见.这可能是一个非常复杂的过程,如下所示:

You'd first need to make sure your website running on localhost is visible to the internet. This can be a very complicated process that goes something like this:

  • 确保您的计算机上运行的网站对LAN上的其他计算机可见.如果没有,您可能需要调整计算机的防火墙设置或网站权限.这将确认您的网站能够处理来自其他计算机的请求.

  • Ensure the website running on your machine is visible to other machines on the LAN. If not, you may need to tweak your machine's firewall settings or website permissions. This will confirm that your website is capable of handling requests from other machines.

假设您使用ADSL调制解调器连接到Internet,则需要设置从ADSL调制解调器到计算机的端口转发(通常是端口80),这可能还需要计算机具有静态IP.在您的局域网上.这将使您的网站能够处理来自Internet的请求,这些请求通常会被ADSL调制解调器阻止.

Assuming you use an ADSL modem to connect to the internet, you'll need to setup port forwarding (usually port 80) from your ADSL modem to your machine, which may also require your machine to have a static IP on your LAN. This will allow your website to handle requests from the internet, which would normally be blocked by the ADSL modem.

假设您的互联网IP地址是动态的,则需要使用动态DNS服务将主机名(例如www.something.com)映射到您的动态IP地址.我为此使用no-ip.com,它是免费的,并且从未给我任何问题.最终结果将是一个主机名,该主机名将映射到您的ADSL调制解调器,并且最终,一个URL将直接映射到您在localhost上运行的网站.

Assuming your internet IP address is dynamic, you'll need to use a Dynamic DNS service to map a host name (e.g. www.something.com) to your dynamic IP address. I use no-ip.com for this, which is free and has never given me any issues. The end result of this will be a hostname that will map to your ADSL modem, and ultimately, a URL that will map directly to your website running on localhost.

您可能需要与ISP确认,正在运行您的网站的端口未被ISP阻止.我的ISP确实阻止了许多端口,但提供了一个选项来禁用阻止.

You may need to check with your ISP that the port you are running your website on is not being blocked by the ISP. My ISP does block a lot of ports, but provides an option to disable the blocking.

您需要进行大量检查和摆弄,以确保您的网站可以处理来自互联网的请求.一个方便的网站是canyouseeme.org.如果此工具报告您的网站没有响应,请花上几个小时进行令人沮丧的调查和调整,以使上述所有功能均能正常工作.这是整个过程中最糟糕的部分!但您永远不知道,您可以先尝试全部操作.

You need to do lots and lots of checking and fiddling to ensure that your website can handle requests from the internet. A handy site for this is canyouseeme.org. If this tool reports your website is not responding, then settle in for hours and hours of frustrating investigation and tweaking trying to get all of the above things working. This is the worst part of the whole process! But you never know, you may get it all working first try.

最后,您使用动态DNS主机名,ADSL调制解调器正在侦听的传入端口(通常为80)以及在localhost上运行的网站的虚拟目录,并将其合并为一个URL,然后将其设置为您的Facebook应用程序设置中的画布URL.因此,如果我的主机名是myfacebookapp.no-ip.com,端口是80,并且网站位于名为fbapp的虚拟目录中,则我的画布URL将是

Finally, you take your Dynamic DNS hostname, the incoming port your ADSL modem is listening to (usually 80), and the virtual directory of you website running on localhost and combine it into a single URL that you will then set as the Canvas URL in your Facebook app's settings. So if my hostname was myfacebookapp.no-ip.com, my port was 80 and my website was living in a virtual directory called fbapp, my canvas URL would be http://myfacebookapp.no-ip.com/fbapp/. You could also give the URL to one of your friends on the internet and ask them if they can see your website - if yes, then your localhost website is set up correctly!

以上所有步骤,也许除最后一个步骤外,都需要相当多的知识或经验才能执行.让我知道您是否需要每一个的更多信息;请联系我们.如果是这样,我将尝试找到其他的stackoverflow页面,这些页面更详细地解释了每个步骤.

All of the above steps, perhaps with the exception of the last one, require a fair amount of knowledge or experience to perform. Let me know if you need more information on each one; if so, I'll try to find other stackoverflow pages that explain each step in greater detail.

这篇关于vs2010 Express asp.net C#:facebook asp.net应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆