Reputation: 105
I've been playing around with azure websites. I'm using some google api but it seems that once deployed on Azure WebSites a problem appears when requesting Google Apis :
The request was aborted: Could not create SSL/TLS secure channel.
I'm not sure where it does come from since I can browse my websites using HTTPS, maybe it's from IIS ARR plugin?
Edit I'm adding some code
@mcollier I'm using the WebClient to make the call. It will fail on downloading 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.
}
Upvotes: 4
Views: 1429
Reputation: 10296
Adding this to your Application_Start in Global.asax.cs should solve your problem:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
Upvotes: 3