4

私は紺碧のウェブサイトで遊んでいます。私はいくつかのGoogle APIを使用していますが、Azure WebSitesにデプロイすると、Google APIをリクエストすると問題が発生するようです:

要求は中止されました: SSL/TLS セキュア チャネルを作成できませんでした。

HTTPS を使用して Web サイトを閲覧できるため、どこから来たのかわかりません。IIS ARR プラグインからのものでしょうか?

編集私はいくつかのコードを追加しています

@mcollier WebClient を使用して呼び出しを行っています。結果のダウンロードに失敗します (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

1 に答える 1

3

これを Global.asax.cs の Application_Start に追加すると、問題が解決するはずです。

ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
于 2012-06-23T22:40:05.150 に答える