使用OAuth Facebook登录直播服务器上失败 [英] facebook login using oauth fails on live server
问题描述
我使用OAuthWebSecurity与Facebook登录,它正在本地主机。不过随后被部署到实时服务器,我得到了以下错误消息:
I'm using OAuthWebSecurity to login with facebook and it is working on localhost. However then deployed to the live server I get the following error message:
远程服务器返回错误:(400)错误的请求。
The remote server returned an error: (400) Bad Request.
- 我已签域详细信息在Facebook上是正确的。
- 的沙盒模式将被禁用。
- 我已禁用Windows防火墙 - 仍然得到同样的错误 。
- 从Facebook的回应是否有在现场或本地主机环境中相同的格式。
- 的日期和时间是正确的。
活动服务器的
我已经测试本地也在发生变化的主机文件,现场域 - 仍然是本地
I've test locally also changing the host file to the live domain - still works locally.
下面的堆栈跟踪:
[WebException: The remote server returned an error: (400) Bad Request.]
System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request) +3291120
System.Net.WebClient.DownloadString(Uri address) +207
DotNetOpenAuth.AspNet.Clients.FacebookClient.QueryAccessToken(Uri returnUrl, String authorizationCode) +293
DotNetOpenAuth.AspNet.Clients.OAuth2Client.VerifyAuthentication(HttpContextBase context, Uri returnPageUrl) +167
DotNetOpenAuth.AspNet.OpenAuthSecurityManager.VerifyAuthentication(String returnUrl) +502
Microsoft.Web.WebPages.OAuth.OAuthWebSecurity.VerifyAuthenticationCore(HttpContextBase context, String returnUrl) +231
有什么建议?
推荐答案
有缺陷开放与此相关的:
https://github.com/DotNetOpenAuth/DotNetOpenAuth/issues/203
There was a defect open related to this: https://github.com/DotNetOpenAuth/DotNetOpenAuth/issues/203
但显然不再被认为库:
的https://github.com/DotNetOpenAuth/DotNetOpenAuth/issues/317#issuecomment-29580565
...虽然它在许多微软的文档仍引用。调查该有关另一个缺陷。
... although it is still referenced in many Microsoft documents. Investigating that related to another defect.
参见:<一href=\"http://stackoverflow.com/questions/19433383/the-remote-server-returned-an-error-400-bad-request-microsoft-aspnet-membersh\">The远程服务器返回错误:(400)错误的请求Microsoft.AspNet.Membership.OpenAuth
这篇关于使用OAuth Facebook登录直播服务器上失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!