微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

c# – 突然,DotNetOpenAuth返回(400)错误请求

我的应用程序已部署近6个月,最新版本大约在3周前发布.

突然,今天Facebook Auth停止了工作.未更改或重新部署webapp,并且未更改Facebook应用程序设置.

使用Twitter进行身份验证仍然可行.

这是例外:

DotNetopenAuth.Messaging.ProtocolException: Error occurred while sending a direct message or getting the response. ---> System.Net.WebException: The Remote Server returned an error: (400) Bad Request.
   at System.Net.HttpWebRequest.GetResponse()
   at DotNetopenAuth.Messaging.StandardWebRequestHandler.GetResponse(HttpWebRequest request,DirectWebRequestOptions options)
   --- End of inner exception stack trace ---
   at DotNetopenAuth.Messaging.StandardWebRequestHandler.GetResponse(HttpWebRequest request,DirectWebRequestOptions options)
   at DotNetopenAuth.Messaging.StandardWebRequestHandler.GetResponse(HttpWebRequest request)
   at DotNetopenAuth.Messaging.Channel.GetDirectResponse(HttpWebRequest webRequest)
   at DotNetopenAuth.Messaging.Channel.RequestCore(IDirectedProtocolMessage request)
   at DotNetopenAuth.Messaging.Channel.Request(IDirectedProtocolMessage requestMessage)
   at DotNetopenAuth.OAuth2.ClientBase.UpdateAuthorizationWithResponse(IAuthorizationState authorizationState,EndUserAuthorizationSuccessAuthCodeResponse authorizationSuccess)
   at DotNetopenAuth.OAuth2.WebServerClient.ProcessUserAuthorization(HttpRequestInfo request)

知道会发生什么吗?我在Facebook的网站上看不到任何关于当前破坏变更或服务质量下降的信息.

解决方法

很可能Facebook最终升级了他们的OAuth 2.0支持,以符合最新的OAuth 2.0规范草案,该草案与您正在使用的DotNetopenAuth版本不兼容.尝试下载最新的DotNetopenAuth CTP,看看它是否有帮助.

也就是说,从来没有保证与Facebook或任何其他OAuth 2.0服务器之类的互操作性. OAuth 2.0不是最终规范,因此互操作性问题几乎是一种保证.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐