4

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.
   }
Ronny
  • 105
  • 7
  • Can you post a little more information? Windows Azure Web Sites shouldn't prohibit you from accessing any other web service. Is the Google API just a regular HTTP/HTTPS GET request? – mcollier Jun 23 '12 at 15:20
  • Does this work from the Windows Azure Emulator on your Dev machine? – user728584 Jun 23 '12 at 16:58
  • @user728584 hello, since azure websites is a regular web site it doesn't require all the azure sdk stuff to run on. The calls work on my local machine. – Ronny Jun 23 '12 at 20:58
  • Duplicate of this. http://stackoverflow.com/questions/10969426/no-openid-endpoint-found-on-azure-website – tig Jul 02 '12 at 05:33

1 Answers1

3

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

ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
Oliver Weichhold
  • 10,259
  • 5
  • 45
  • 87
  • Actually I've tried this but I didn't make the call at the right place. Thanks! It works now – Ronny Jun 24 '12 at 09:28
  • Note this problem impacts Exchange Web Services API as well and the work around DOES NOT fix that case. At least for me. – tig Jul 02 '12 at 05:33