本文介绍了c# - “认证或解密失败."在单声道中使用 twitterizer 时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为什么会出现这个错误
Unhandled Exception: Twitterizer.TwitterizerException: Error getting response stream (Write: The authentication or decryption has failed.): SendFailure ---> System.Net.WebException: Error getting response stream (Write: The authentication or decryption has failed.): SendFailure ---> System.IO.IOException: The authentication or decryption has failed. ---> Mono.Security.Protocol.Tls.TlsException: Invalid certificate received from server. Error code: 0xffffffff800b010a
at Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate.validateCertificates (Mono.Security.X509.X509CertificateCollection certificates) [0x00000] in <filename unknown>:0
at Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate.ProcessAsTls1 () [0x00000] in <filename unknown>:0
at Mono.Security.Protocol.Tls.Handshake.HandshakeMessage.Process () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) Mono.Security.Protocol.Tls.Handshake.HandshakeMessage:Process ()
at Mono.Security.Protocol.Tls.ClientRecordProtocol.ProcessHandshakeMessage (Mono.Security.Protocol.Tls.TlsStream handMsg) [0x00000] in <filename unknown>:0
at Mono.Security.Protocol.Tls.RecordProtocol.InternalReceiveRecordCallback (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0
at System.Net.HttpWebRequest.GetResponse () [0x00000] in <filename unknown>:0
at Twitterizer.WebRequestBuilder.ExecuteRequest () [0x00000] in <filename unknown>:0
at Twitterizer.OAuthUtility.GetRequestToken (System.String consumerKey, System.String consumerSecret, System.String callbackAddress) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at Twitterizer.OAuthUtility.GetRequestToken (System.String consumerKey, System.String consumerSecret, System.String callbackAddress) [0x00000] in <filename unknown>:0
at terminal_twitt.Program.Main (System.String[] args) [0x00000] in /home/julio/Projects/terminal-twitt/terminal-twitt/Program.cs:18
[ERROR] FATAL UNHANDLED EXCEPTION: Twitterizer.TwitterizerException: Error getting response stream (Write: The authentication or decryption has failed.): SendFailure ---> System.Net.WebException: Error getting response stream (Write: The authentication or decryption has failed.): SendFailure ---> System.IO.IOException: The authentication or decryption has failed. ---> Mono.Security.Protocol.Tls.TlsException: Invalid certificate received from server. Error code: 0xffffffff800b010a
at Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate.validateCertificates (Mono.Security.X509.X509CertificateCollection certificates) [0x00000] in <filename unknown>:0
at Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate.ProcessAsTls1 () [0x00000] in <filename unknown>:0
at Mono.Security.Protocol.Tls.Handshake.HandshakeMessage.Process () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) Mono.Security.Protocol.Tls.Handshake.HandshakeMessage:Process ()
at Mono.Security.Protocol.Tls.ClientRecordProtocol.ProcessHandshakeMessage (Mono.Security.Protocol.Tls.TlsStream handMsg) [0x00000] in <filename unknown>:0
at Mono.Security.Protocol.Tls.RecordProtocol.InternalReceiveRecordCallback (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0
at System.Net.HttpWebRequest.GetResponse () [0x00000] in <filename unknown>:0
at Twitterizer.WebRequestBuilder.ExecuteRequest () [0x00000] in <filename unknown>:0
at Twitterizer.OAuthUtility.GetRequestToken (System.String consumerKey, System.String consumerSecret, System.String callbackAddress) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at Twitterizer.OAuthUtility.GetRequestToken (System.String consumerKey, System.String consumerSecret, System.String callbackAddress) [0x00000] in <filename unknown>:0
at terminal_twitt.Program.Main (System.String[] args) [0x00000] in /home/julio/Projects/terminal-twitt/terminal-twitt/Program.cs:18
The application was terminated by a signal: SIGHUP
我使用 twitterizer 和 mono 2.6 for linux,其中包含 .NET 4.0 运行时.我已经在我的 Windows 中使用 Visual Studio 尝试过这段代码,并且运行良好.但是当我尝试用单声道构建它时,我得到了这个错误.这是我的代码:
i use twitterizer and mono 2.6 for linux with .NET 4.0 runtime in it. i have tried this code with visual studio in my windows, and worked perfectly. but when i tried to build it with mono i get this error. here is my code:
static void Main(string[] args)
{
string requestToken = OAuthUtility.GetRequestToken("my consumer key", "my consumer secret", "oob").Token;
}
推荐答案
我遇到了同样的问题,所以简单地说我选择使用导入所有证书
I had the same problems so simply talking i choose to import all certificates using
mozroots --import --ask-remove
现在我可以用 twitter 登录了
and now I can login with twitter
这篇关于c# - “认证或解密失败."在单声道中使用 twitterizer 时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!