Azure的模拟器网站是不可见的被Facebook [英] Azure emulator web site is not visible by Facebook
问题描述
我的ASP.Net MVC3网站迁移到一个基于Azure云项目后不再工作。我使用的Azure的SDK 1.6,并且在该OAuth的步骤失败。
My ASP.Net MVC3 web site that logs into Facebook is no longer working after moving to an Azure based cloud project. I am using the Azure SDK 1.6 and fail during the the OAuth steps.
我有在 HTTP本地运行一个工作现场://本地主机:1200 它相匹配的应用程序URL设置,是注册Facebook上的应用程序。现在,当我尝试启动在调试模式下的项目,它通过在Azure模拟器该网站(角色)映射到 HTTP ://127.0.0.1:82 / 。我试着更新Facebook应用程序的URL相同的地址,但它失败。
I had a working site that ran locally at http://localhost:1200 which matched the Application Url setting that was registered for the application on Facebook. Now when I try to start the project in debug mode, it goes through the Azure emulator which maps the web site (role) to http://127.0.0.1:82/. I've tried updating the Facebook app url to the same address but it fails.
我一直在调查这个,我已经注意到,在Azure模拟器上自动创建的飞新的IIS网站,并使用了负载平衡器为云解决方案中各个项目的创建的虚拟IP地址。有没有办法让一个项目运行Visual Studio中的Azure模拟器时,调试成功,仍然跟Facebook的?
I've been investigating this and I've noticed that the Azure emulator automatically creates on the fly a new IIS web site and employs a load balancer for its created virtual IPs for the individual projects within the cloud solution. Is there a way to get a project to debug successfully and still talk to Facebook when running the Azure emulator within Visual Studio?
任何了解大大AP preciated。
Any insight is greatly appreciated.
推荐答案
我不会用本地主机的Facebook应用程序。
I would not use localhost for Facebook applications.
我做什么,我注册了我真正的域名在Facebook上(如myapp.com)
然后我在hosts文件中创造了一项纪录(WINDOWS \\ SYSTEM32 \\ drivers \\ etc下\\主机)
What I did, I had registered my real domain in Facebook (such as myapp.com) Then I created a record in my hosts file (Windows\system32\drivers\etc\hosts)
127.0.0.1 dev.myapp.com
这是我的生产域的子域,因此它是由FB允许;
which is sub-domain of my production domain, so it's allowed by FB;
然后我用dev.myapp.com回调地址Facebook的;我还安装Visual Studio中在启动应用程序的调试运行 http://dev.myapp.com:anyport 。
And then I used dev.myapp.com as callback address for Facebook; I also setup Visual Studio to run http://dev.myapp.com:anyport on start application debugging.
这篇关于Azure的模拟器网站是不可见的被Facebook的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!