title: ReCaptcha v3 works locally, but not on remote server (500 Internal Server Error)
body: <p>I am unable to get captcha to work on server. It works fine locally and I get it to return a score without issue.</p>
  <p>JavaScript after button is clicked.</p>
  <pre><code>(function () {
  $('#btnLogin').click(function () {
      $.ajax({
          type: &quot;POST&quot;,
          url: &quot;/captcha/lasttry.aspx/CaptchaVerify&quot;,
          data: {},
          contentType: &quot;application/json; charset=utf-8&quot;,
          dataType: &quot;json&quot;,
          success: function (response) {
              var _response = JSON.parse(response.d);
              if (_response.score &lt; 0.5) {
                  $('#status').text(&quot;User is not human being! Score = &quot; + _response.score);
                  $('#status').removeClass('text-info').addClass('text-danger');
              }
              else {
                  $('#status').text(&quot;User is human being . Score = &quot; + _response.score);
                  $('#status').removeClass('text-error').addClass('text-success');
              }
          },
          failure: function (response) {
              $('#status').text(&quot;Error on Server!&quot;);
          }
      });
  });
  })();
  </code></pre>
  <p>CodeBehind:</p>
  <pre><code>  [WebMethod]
  public static string CaptchaVerify()
  {
      //It should only call once
      if (response.score == 0)
      {
          var responseString = RecaptchaVerify(Token);
          response = JsonConvert.DeserializeObject&lt;ResponseToken&gt;(responseString.Result);
  
      }
      return JsonConvert.SerializeObject(response);
  }
  private static string apiAddress = &quot;https://www.google.com/recaptcha/api/siteverify&quot;;
  
  private static async Task&lt;string&gt; RecaptchaVerify(string recaptchaToken)
  {
      //try/catch omitted to try to see error with customErrors off 
      String url = $&quot;{apiAddress}?secret={recaptchaSecret}&amp;response={recaptchaToken}&quot;;
      HttpClient httpClient = new HttpClient();
      String responseString = httpClient.GetStringAsync(url).Result;
      return responseString;
  }
  </code></pre>
  <p>When I run it remotely I get the following error (1st image Google console, 2nd Wireshark):</p>
  <p><a href="https://i.stack.imgur.com/vjKxm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vjKxm.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/ikJon.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ikJon.png" alt="enter image description here" /></a></p>
  <p>Firewall is open to Google, I have added the site to captcha admin. Keys are correct. they have been checked and re-checked. I am not sure if I am missing something in the web.config, or if there is a setting in IIS manager that I am missing.</p>