Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login Error: The required anti-forgery cookie "__RequestVerificationToken" is not present. #868

Open
ShawnXiao-NEX opened this issue Apr 22, 2020 · 6 comments

Comments

@ShawnXiao-NEX
Copy link

ShawnXiao-NEX commented Apr 22, 2020

Dear, I got the below error while logging in with admin/admin after first open the Bonobo server:

500 Server Error

A server error occurred when processing your request. Please try again or contact the system administrator.

Bonobo version: V6.5.0
Server: Windows Server 2016 Standard

And I have tried serial ways but no luck:

  1. Add <httpCookies httpOnlyCookies="true" requireSSL="true"/> in web.config
  2. Move the folder out of C:\inetpub\wwwroot;
  3. Re-open the browser;

After googled hours in internet, it seems that the root reason is code issue. could anyone can help me out of this?

Below is the log copied from 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)
@ShawnXiao-NEX
Copy link
Author

@doggy8088
Copy link
Contributor

What's the .NET Framework version you used?

@ShawnXiao-NEX
Copy link
Author

ShawnXiao-NEX commented Apr 23, 2020

What's the .NET Framework version you used?

The server has .NET Framework 4.6.1 installed, but the Bonono site is run at .NET v4.5 with .NET CLR Version v4.0.30319 via IIS -> Application Pools.

It is strange that I can run the site by downloading the source code from GitHub and building/publishing in my local PC.

This issue in only occurred via unzip the formal package from bonobogitserver.

@doggy8088
Copy link
Contributor

It could be a cookie issue. Please check the anti-forgery cookie __RequestVerificationToken was sent to the server or not.

@ShawnXiao-NEX
Copy link
Author

@doggy8088 Thanks for your replies. I am turning to the GitLab in RHEL right now. I will back to this issue again if failed again. Thanks a lot.

@doggy8088
Copy link
Contributor

This cookie could be removed from one of your Chrome extension. It's very possible. There are many people installed AdBlocker extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants