windows-server-2016 - 自建Bonobo.Git.Server登录报错:所需的防伪cookie“__RequestVerificationToken”不存在
问题描述
首次打开 Bonobo 服务器后使用 admin/admin 登录时出现以下错误:
500 Server Error
A server error occurred when processing your request. Please try again or contact the system administrator.
倭黑猩猩版本:V6.5.0
服务器:Windows Server 2016 标准版
而且我尝试了串行方式但没有运气:
<httpCookies httpOnlyCookies="true" requireSSL="true"/>
在 web.config 中添加将文件夹移出 C:\inetpub\wwwroot;
重新打开浏览器;
在互联网上搜索了几个小时后,似乎根本原因是代码问题。谁能帮我解决这个问题?
下面是从 Bonobo.Git.Server\App_Data\Logs 复制的日志:
2020-04-22 11:54:24.061 +08:00 [Error] 500 Exception caught in Global.asax
System.Web.Mvc.HttpAntiForgeryException (0x80004005): The required anti-forgery cookie "__RequestVerificationToken" is not present.
at System.Web.Helpers.AntiXsrf.TokenValidator.ValidateTokens(HttpContextBase httpContext, IIdentity identity, AntiForgeryToken sessionToken, AntiForgeryToken fieldToken)
at System.Web.Helpers.AntiXsrf.AntiForgeryWorker.Validate(HttpContextBase httpContext)
at System.Web.Mvc.ControllerActionInvoker.InvokeAuthorizationFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__19(AsyncCallback asyncCallback, Object asyncState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeAction(ControllerContext controllerContext, String actionName, AsyncCallback callback, Object state)
at System.Web.Mvc.Controller.<BeginExecuteCore>b__1c(AsyncCallback asyncCallback, Object asyncState, ExecuteCoreState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state)
at System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__4(AsyncCallback asyncCallback, Object asyncState, ProcessRequestState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
解决方案
推荐阅读
- java-8 - 在深层属性上收集 groupBy
- php - 查找 PHP 脚本输出字符串的位置
- python - 任何人都知道如何在没有任何 python 库的情况下使用 GCP 进行身份验证?
- perl - 使用 AI::Pathfinding::AStar CPAN 模块在 Perl 中“找不到对象方法“new”[...]”
- netsuite - NetSuite 保存的搜索案例声明
- linq-to-sql - 为什么在实体框架查询上使用 ToDictionary 时会收到 NullReferenceException?
- visual-studio - Xamarin.Android.Crashlytics 2.9.4.1 - CrashlyticsCore 上的 NoClassDefFoundError
- scala - 使用 Scala Spark 从 URL 获取结果
- r - 应用正则表达式来比较 R 中不同长度的数据帧中的值
- php - RouteCollection.php 第 161 行中的 Laravel 项目 NotFoundHttpException: