我使用PoliteCaptcha如下:PoliteCaptcha的Https问题MVC剃刀
<div class="form-container">
@using (Html.BeginForm("LogOn", "Account", new { ReturnUrl = Request.QueryString["ReturnUrl"] }, FormMethod.Post, new { id = "formLogOn" }))
{
@Html.TextBoxFor(model => model.UserId, new { id = "textBoxUserId", placeholder="Enter your username" })<br />
@Html.ValidationMessageFor(model => model.UserId)<br />
@Html.PasswordFor(model => model.Password, new { placeholder="Enter your password" })<br />
@Html.ValidationMessageFor(model => model.Password)<br />
@Html.SpamPreventionFields()
<input type="submit" id="ButtonLogOn" value="LoginButton" class=" button" />
}
</div>
<div id="validationSummary">
@Html.Partial("_AjaxValidationSummaryPartial")
</div>
@if (Model != null && !Model.ShowCatcha)
{
@Html.SpamPreventionScript()
}
这工作得很好,但是当它在一个HTTPS域变为不活。 我得到错误:
Mixed Content: The page at ' https://www.domain.com/log?ReturnUrl=%2Fadmin ' was loaded over HTTPS, but requested an insecure script ' http://www.google.com/recaptcha/api/challenge?k=6LcAAAAOQuMiKA-yCo4HZPp4gy-T0x7CaX '. This request has been blocked; the content must be served over HTTPS.
有没有办法用“https://www.google.com/recaptcha/”(httpS:)取代“http://www.google.com/recaptcha/”? – TTT 2015-04-29 09:41:01
尝试搜索,而不是等待三周并添加赏金:[为什么我突然在Firefox中获得“阻止加载混合活动内容”问题?](http://stackoverflow.com/questions/18251128/why-am-i - 如何修复一个阻止混合内容的网站](https://developer.mozilla.org/en-US/)文档/安全/ MixedContent/How_to_fix_website_with_mixed_content)。 – CodeCaster 2015-04-29 09:49:51
[用于MVC 4和5的Nuget Google reCAPTCHA](https://www.nuget.org/packages/reCAPTCH.MVC/)和[Demo and Document](http://recaptchamvc.apphb.com/) – Sender 2015-06-19 13:55:48