asp.net - The request was aborted: Could not create SSL/TLS secure -



asp.net - The request was aborted: Could not create SSL/TLS secure -

in our web application have social app integration (like facebook, linkedin), when seek connect facebook or linkedin our application, throwing error , not connecting facebook, twitter , linkedin

("system.net.webexception: request aborted: not create ssl/tls secure channel.\\\\r\\\\n @ system.net.httpwebrequest.getresponse()\\\\r\\\\n @ cotcwebmethods.fbaccesstoken_register(nullable`1 id, string clientid, string accesstoken, string userid, string username, string userimage, string email)

but function works sometimes, sometime i'm getting error.

is code issue or server issue?

the below code linkedin

oauthlinkedin _oauth = new oauthlinkedin(); servicepointmanager.securityprotocol = securityprotocoltype.ssl3; servicepointmanager.servercertificatevalidationcallback = validateremotecertificate;

string authlink = _oauth.authorizationlinkget();

this twitter

string oauth_consumer_key = system.web.configuration.webconfigurationmanager.appsettings["twikey"]; string oauth_consumer_secret = system.web.configuration.webconfigurationmanager.appsettings["twisecretkey"]; httpcontext.current.application["dbname"] = convert.tostring(system.web.httpcontext.current.request.url.host.tostring().split('.')[0] == "localhost" ? "dbcotc_roles_permissions" : "dbcotc" + system.web.httpcontext.current.request.url.host.tostring().split('.')[0]); httpcontext.current.application["emailid"] = email; httpcontext.current.application["timezone"] = timezone; system.net.servicepointmanager.servercertificatevalidationcallback = (senderx, certificate, chain, sslpolicyerrors) => { homecoming true; }; system.net.servicepointmanager.servercertificatevalidationcallback += servercertificate.validate; seek { servicepointmanager.securityprotocol = securityprotocoltype.ssl3; servicepointmanager.servercertificatevalidationcallback = validateremotecertificate;

oauthtokenresponse reqtoken = oauthutility.getrequesttoken( oauth_consumer_key,oauth_consumer_secret,httpcontext.current.request.url.absoluteuri, ""); homecoming string.format("https://twitter.com/oauth/authorize?oauth_token={0}",reqtoken.token); } grab (exception ex) { homecoming ex.tostring(); }

asp.net

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -