0

In my ASP.NET MVC 4 project, I am using the Microsoft.Web.Helpers (from the NuGet package) and my code is a very basic implementation of ReCaptcha. In my view I have:

@ReCaptcha.GetHtml(theme: "clean")       

In my controller I have:

Microsoft.Web.Helpers.ReCaptcha.Validate();

The complexity comes with the SSL implementation we are using.

I have added the appropriate settings to my web.config:

  <system.net>
    <defaultProxy>
      <proxy proxyaddress="http://***proxy script settings**" 
            autoDetect="False" 
            usesystemdefault="False" 
            bypassonlocal="True" />
    </defaultProxy>
  </system.net>

There seems like there is nothing further I can do in terms of config, but I am getting the error message

The remote server returned an error: (404) Not Found

when I hit the recaptcha validate method on the form post method in my controller.

Ive found a number of other answers on here but they all seem to suggest that you change the url, or upgrade. As Im using a NuGet package I would have thought I was using the latest version. Any ideas or links with more information greatly appreciated. Ive already done quite a bit of looking both on this site and google

edit:

I have found that earlier versions of firefox have trouble actually rendering the recapture box given our network conditions, but the latest one is fine. As the validation is done on the controller though, I suppose there is no issue here.

4

1 に答える 1

0

多くの髪の毛を引っ張って一般的な混乱を招いた後、問題はgoogle APIへのPOST(GETではない)が企業のファイアウォールによってブロックされていることであることに気付きました。以前は、recaptchaが使用するサービス(http://www.google.com/recaptcha/api/verify)に移動できたため、これを割り引いていました。

これは、投稿に必要な部分のHTMLページを作成し、ブラウザーに送信することで見つかりました。企業の「このページはブロックされています」が表示されましたが、コードでは返されるエラーは404です。エラーはやや誤解を招く可能性がありますが、これはインフラストラクチャ部門の奇妙な動作です。

于 2013-03-11T10:58:53.360 に答える