Server Error in '/' Application.

The anti-forgery system has the configuration value AntiForgeryConfig.RequireSsl = true, but the current request is not an SSL request.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: The anti-forgery system has the configuration value AntiForgeryConfig.RequireSsl = true, but the current request is not an SSL request.

Source Error:


Line 43:                         @using (Html.BeginForm("Consulta", "Autenticacao", FormMethod.Post, new { id = "formAutenticacao", data_validate = "parsley" }))
Line 44:                          {
Line 45:                              @Html.AntiForgeryToken()
Line 46:                              <div class="form-group  col-md-12">
Line 47:                                  <div class="col-md-6">

Source File: d:\CelcoinLEGACY\Views\Autenticacao\Consulta.cshtml    Line: 45

Stack Trace:


[InvalidOperationException: The anti-forgery system has the configuration value AntiForgeryConfig.RequireSsl = true, but the current request is not an SSL request.]
   System.Web.Helpers.AntiXsrf.AntiForgeryWorker.CheckSSLConfig(HttpContextBase httpContext) +112
   System.Web.Helpers.AntiXsrf.AntiForgeryWorker.GetFormInputElement(HttpContextBase httpContext) +37
   System.Web.Helpers.AntiForgery.GetHtml() +76
   System.Web.Mvc.HtmlHelper.AntiForgeryToken() +28
   ASP._Page_Views_Autenticacao_Consulta_cshtml.Execute() in d:\CelcoinLEGACY\Views\Autenticacao\Consulta.cshtml:45
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +220
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +77
   System.Web.WebPages.StartPage.ExecutePageHierarchy() +89
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +107
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +303
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +91
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +647
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +81
   System.Web.Mvc.Async.<>c__DisplayClass3_1.<BeginInvokeAction>b__1(IAsyncResult asyncResult) +188
   Datadog.Trace.ClrProfiler.Integrations.AspNetMvcIntegration.EndInvokeAction(Object asyncControllerActionInvoker, Object asyncResult, Int32 opCode, Int32 mdToken, Int64 moduleVersionPtr) +1109
   System.Web.Mvc.<>c.<BeginExecuteCore>b__152_1(IAsyncResult asyncResult, ExecuteCoreState innerState) +43
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +73
   System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +9
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +39
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +39
   System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +9
   System.Web.Mvc.<>c.<BeginProcessRequest>b__20_1(IAsyncResult asyncResult, ProcessRequestState innerState) +43
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +73
   System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +9
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +481
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +231
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +134


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4700.0