使用Razor的ASP.NET网页 - 尝试了太多的自动重定向异常

时间:2013-09-16 15:21:31

标签: c# asp.net .net razor recaptcha

关注this tutorial我在网站上实施了recaptcha。在尝试提交表单后,我在第37行获得了以下异常。如果我删除了LIne 37上的重新访问代码,则不会发生此错误。

Line 35:     if (IsPost && Validation.IsValid())
Line 36:     {
**Line 37:         if (ReCaptcha.Validate())**
Line 38:         {


[WebException: Too many automatic redirections were attempted.]
   System.Net.HttpWebRequest.GetResponse() +6120419
   Microsoft.Web.Helpers.ReCaptcha.ExecuteValidateRequest(String formData) +194
   Microsoft.Web.Helpers.ReCaptcha.Validate(HttpContextBase context, String privateKey, VirtualPathUtilityBase virtualPathUtility) +131
   Microsoft.Web.Helpers.ReCaptcha.Validate(String privateKey) +98
   ASP._Page_conference_Default_cshtml.Execute() in 
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +208
   System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +68
   System.Web.WebPages.WebPage.ExecutePageHierarchy() +123
   System.Web.WebPages.StartPage.RunPage() +19
   System.Web.WebPages.StartPage.ExecutePageHierarchy() +67
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +78
   System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContextBase httpContext) +121

0 个答案:

没有答案