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

在费了很多力气和普遍的困惑之后,我发现问题是到谷歌 API 的 POST(但不是 GET)被我们的公司防火墙阻止了。我以前打折过这个,因为我可以导航到 recaptcha 使用的服务 ( http://www.google.com/recaptcha/api/verify )。

我通过为帖子构建一个包含必要部分的 HTML 页面并在浏览器中提交它来发现这一点。出现了公司“此页面被阻止” - 但是在代码中返回的错误是 404。该错误有些误导,但这是我们基础设施部门的奇怪行为。

于 2013-03-11T10:58:53.360 回答