我正在使用 OAuthWebSecurity 通过 facebook 登录,它正在本地主机上运行。但是,然后部署到实时服务器时,我收到以下错误消息:
远程服务器返回错误:(400) 错误请求。
- 我已检查 Facebook 上的域名详细信息是否正确。
- 沙盒模式已禁用。
- 我已禁用 Windows 防火墙 - 仍然出现相同的错误。
- 无论是在实时环境还是本地主机环境中,来自 Facebook 的响应都具有相同的格式。
- 实时服务器的日期和时间是正确的。
我已经在本地进行了测试,还将主机文件更改为实时域 - 仍然可以在本地工作。
这是堆栈跟踪:
[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 https://github.com/DotNetOpenAuth/DotNetOpenAuth/issues/203
但该库显然不再维护:https://github.com/DotNetOpenAuth/DotNetOpenAuth/issues/317#issuecomment-29580565 https://github.com/DotNetOpenAuth/DotNetOpenAuth/issues/317#issuecomment-29580565
...尽管它仍然在许多 Microsoft 文档中引用。正在调查与另一个缺陷相关的问题。
也可以看看:远程服务器返回错误:(400) 错误请求 Microsoft.AspNet.Membership.OpenAuth https://stackoverflow.com/questions/19433383/the-remote-server-returned-an-error-400-bad-request-microsoft-aspnet-membersh
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)