Azure WebSites and Google Api

I played with azure sites. I use some google api, but it seems that after deployment on Azure WebSites there is a problem when requesting Google Apis:

The request was aborted: Failed to create a secure SSL / TLS channel.

I'm not sure where it came from, since I can browse my sites using HTTPS, maybe this is from the IIS ARR plugin?

Edit I am adding code

@mcollier I use WebClient to call. He will not be able to download the result (http get request)

try { WebClient webClient = new WebClient(); string request = string.Format("https://www.googleapis.com/books/v1/volumes?q=intitle:{0}&fields=items(volumeInfo)&maxResults=1&printType=books&key={1}", infos.Value, ConfigurationHelper.GoogleKey); content = webClient.DownloadString(request); } catch (Exception ex) { throw new Exception("content from WebClient : " + content, ex); // Log. } 
+4
source share
1 answer

Adding this application to Application_Start in Global.asax.cs should solve your problem:

 ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3; 
+3
source

All Articles