Open Closed

Web Browser Bookmark 400 Error #6837


User avatar
0
yunusemrecaglar created
  • ABP Framework version: v7.2.2
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

Hello, After logging in, I bookmark the link in the web browser. After some time, when I try to log in again using that bookmark, it gives a 400 error. How can we resolve this? Can we redirect directly to the dashboard or another page?


12 Answer(s)
  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello,

    Can you please share if any logs?

    thanks

  • User Avatar
    0
    yunusemrecaglar created

    Backend log or frontend log?

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hi,

    Check for both if any logs showing error please share.

    thanks

  • User Avatar
    0
    yunusemrecaglar created

    2024-03-11 10:18:02.569 +03:00 [INF] Request starting HTTP/1.1 GET https://pbys.erciyes.edu.tr/ - - 2024-03-11 10:18:02.569 +03:00 [INF] Executing endpoint '/_Host' 2024-03-11 10:18:02.570 +03:00 [INF] Route matched with {page = "/_Host", action = "", controller = "", area = ""}. Executing page /_Host 2024-03-11 10:18:02.570 +03:00 [INF] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy 2024-03-11 10:18:02.570 +03:00 [INF] Executing an implicit handler method - ModelState is "Valid" 2024-03-11 10:18:02.570 +03:00 [INF] Executed an implicit handler method, returned result Microsoft.AspNetCore.Mvc.RazorPages.PageResult. 2024-03-11 10:18:02.571 +03:00 [INF] Executed page /_Host in 1.5734ms 2024-03-11 10:18:02.571 +03:00 [INF] Executed endpoint '/_Host' 2024-03-11 10:18:02.571 +03:00 [INF] Request finished HTTP/1.1 GET https://pbys.erciyes.edu.tr/ - - - 200 - text/html;+charset=utf-8 2.3746ms 2024-03-11 10:18:12.693 +03:00 [INF] Request starting HTTP/2 POST https://pbys.erciyes.edu.tr/signin-oidc application/x-www-form-urlencoded 1711 2024-03-11 10:18:12.694 +03:00 [WRN] '.AspNetCore.Correlation.hSIfuQzS7zizNJG8QMRFdpZnz-gpdE_gHjITY1hvR1s' cookie not found. 2024-03-11 10:18:12.694 +03:00 [INF] Error from RemoteAuthentication: Correlation failed.. 2024-03-11 10:18:12.694 +03:00 [ERR] An unhandled exception has occurred while executing the request. System.Exception: An error was encountered while handling the remote login. ---> System.Exception: Correlation failed. --- End of inner exception stack trace --- at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler1.HandleRequestAsync() at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Volo.Abp.AspNetCore.Security.AbpSecurityHeadersMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Volo.Abp.AspNetCore.Tracing.AbpCorrelationIdMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|8_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task) 2024-03-11 10:18:12.695 +03:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared)' 2024-03-11 10:18:12.695 +03:00 [INF] Route matched with {action = "Index", controller = "Error", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task1[Microsoft.AspNetCore.Mvc.IActionResult] Index(Int32) on controller Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared). 2024-03-11 10:18:12.695 +03:00 [WRN] The required antiforgery request token was not provided in either form field "__RequestVerificationToken" or header value "RequestVerificationToken". 2024-03-11 10:18:12.695 +03:00 [INF] Authorization failed for the request at filter 'Volo.Abp.AspNetCore.Mvc.AntiForgery.AbpAutoValidateAntiforgeryTokenAuthorizationFilter'. 2024-03-11 10:18:12.696 +03:00 [INF] Executing StatusCodeResult, setting HTTP status code 400 2024-03-11 10:18:12.696 +03:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared) in 0.8468ms 2024-03-11 10:18:12.696 +03:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared)' 2024-03-11 10:18:12.696 +03:00 [INF] Request finished HTTP/2 POST https://pbys.erciyes.edu.tr/signin-oidc application/x-www-form-urlencoded 1711 - 302 - - 3.1000ms 2024-03-11 10:18:12.701 +03:00 [INF] Request starting HTTP/2 GET https://pbys.erciyes.edu.tr/Error?httpStatusCode=400 - - 2024-03-11 10:18:12.701 +03:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared)' 2024-03-11 10:18:12.701 +03:00 [INF] Route matched with {action = "Index", controller = "Error", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] Index(Int32) on controller Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared). 2024-03-11 10:18:12.704 +03:00 [WRN] Could not find IdentityClientConfiguration for AbpMvcClient. Either define a configuration for AbpMvcClient or set a default configuration.

  • User Avatar
    0
    yunusemrecaglar created

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    hi

    You can try to use https instead of http.

    Chrome will block some cookies during http.

    thanks

  • User Avatar
    0
    yunusemrecaglar created

    2024-03-11 12:04:06.794 +03:00 [INF] Request starting HTTP/2 POST https://pbys.erciyes.edu.tr/signin-oidc application/x-www-form-urlencoded 1711 2024-03-11 12:04:06.795 +03:00 [WRN] '.AspNetCore.Correlation.PCeNa_vuGlykwO0thliGeAZmr332p48GsYg9E_A-k_4' cookie not found. 2024-03-11 12:04:06.795 +03:00 [INF] Error from RemoteAuthentication: Correlation failed.. 2024-03-11 12:04:06.796 +03:00 [ERR] An unhandled exception has occurred while executing the request. System.Exception: An error was encountered while handling the remote login. ---> System.Exception: Correlation failed. --- End of inner exception stack trace --- at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler1.HandleRequestAsync() at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Volo.Abp.AspNetCore.Security.AbpSecurityHeadersMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Volo.Abp.AspNetCore.Tracing.AbpCorrelationIdMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|8_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task) 2024-03-11 12:04:06.796 +03:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared)' 2024-03-11 12:04:06.796 +03:00 [INF] Route matched with {action = "Index", controller = "Error", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task1[Microsoft.AspNetCore.Mvc.IActionResult] Index(Int32) on controller Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared). 2024-03-11 12:04:06.796 +03:00 [WRN] The required antiforgery request token was not provided in either form field "__RequestVerificationToken" or header value "RequestVerificationToken". 2024-03-11 12:04:06.796 +03:00 [INF] Authorization failed for the request at filter 'Volo.Abp.AspNetCore.Mvc.AntiForgery.AbpAutoValidateAntiforgeryTokenAuthorizationFilter'. 2024-03-11 12:04:06.796 +03:00 [INF] Executing StatusCodeResult, setting HTTP status code 400 2024-03-11 12:04:06.796 +03:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared) in 0.2743ms 2024-03-11 12:04:06.796 +03:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared)' 2024-03-11 12:04:06.796 +03:00 [INF] Request finished HTTP/2 POST https://pbys.erciyes.edu.tr/signin-oidc application/x-www-form-urlencoded 1711 - 302 - - 2.1643ms 2024-03-11 12:04:06.803 +03:00 [INF] Request starting HTTP/2 GET https://pbys.erciyes.edu.tr/Error?httpStatusCode=400 - - 2024-03-11 12:04:06.804 +03:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared)' 2024-03-11 12:04:06.804 +03:00 [INF] Route matched with {action = "Index", controller = "Error", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] Index(Int32) on controller Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared). 2024-03-11 12:04:06.806 +03:00 [INF] Executing ViewResult, running view ~/Views/Error/Default.cshtml.

    We don't use HTTP anywhere, and even when saving bookmarks, we save them with HTTPS. I tried with the Opera browser, but it still gave the same error, a 400 error.

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hi,

    This seems to be a problem with cookies. It may be caused by the browser. Have you checked on another browsers (Edge, Incognito etc. )?

    thanks

  • User Avatar
    0
    yunusemrecaglar created

    2024-03-11 13:06:50.811 +03:00 [WRN] '.AspNetCore.Correlation.lzvYwlVkn0QoYXwJXXcoVGrqBXn2o-9cDRq0wlHK9dU' cookie not found. 2024-03-11 13:06:50.811 +03:00 [INF] Error from RemoteAuthentication: Correlation failed.. 2024-03-11 13:06:50.811 +03:00 [ERR] An unhandled exception has occurred while executing the request. System.Exception: An error was encountered while handling the remote login. ---> System.Exception: Correlation failed. --- End of inner exception stack trace --- at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler1.HandleRequestAsync() at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Volo.Abp.AspNetCore.Security.AbpSecurityHeadersMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Volo.Abp.AspNetCore.Tracing.AbpCorrelationIdMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|8_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task) 2024-03-11 13:06:50.812 +03:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared)' 2024-03-11 13:06:50.812 +03:00 [INF] Route matched with {action = "Index", controller = "Error", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task1[Microsoft.AspNetCore.Mvc.IActionResult] Index(Int32) on controller Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared). 2024-03-11 13:06:50.812 +03:00 [WRN] The required antiforgery cookie ".AspNetCore.Antiforgery.xVgQ5_tGIfw" is not present. 2024-03-11 13:06:50.812 +03:00 [INF] Authorization failed for the request at filter 'Volo.Abp.AspNetCore.Mvc.AntiForgery.AbpAutoValidateAntiforgeryTokenAuthorizationFilter'. 2024-03-11 13:06:50.812 +03:00 [INF] Executing StatusCodeResult, setting HTTP status code 400 2024-03-11 13:06:50.812 +03:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared) in 0.3493ms 2024-03-11 13:06:50.812 +03:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared)' 2024-03-11 13:06:50.812 +03:00 [INF] Request finished HTTP/2 POST https://pbys.erciyes.edu.tr/signin-oidc application/x-www-form-urlencoded 1711 - 302 - - 2.6636ms 2024-03-11 13:06:50.821 +03:00 [INF] Request starting HTTP/2 GET https://pbys.erciyes.edu.tr/Error?httpStatusCode=400 - - 2024-03-11 13:06:50.822 +03:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared)' 2024-03-11 13:06:50.822 +03:00 [INF] Route matched with {action = "Index", controller = "Error", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] Index(Int32) on controller Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared). 2024-03-11 13:06:50.825 +03:00 [INF] Executing ViewResult, running view ~/Views/Error/Default.cshtml.

    It gave the same error on Edge as well. What can we do?

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello,

    Please check https://github.com/auth0-samples/auth0-aspnetcore-mvc-samples/issues/35#issuecomment-602930250 and https://github.com/dotnet/aspnetcore/issues/45620#issuecomment-1440325035 similar issues.

    please check if it helps you, not sure exactly?

    Also check this article https://community.abp.io/posts/patch-for-chrome-login-issue-identityserver4-samesite-cookie-problem-weypwp3n

    Thanks

  • User Avatar
    0
    yunusemrecaglar created

    Hello, We save the following link to the web browser bookmarks as an example: [https://pbysidentity.erciyes.edu.tr/Account/Login?ReturnUrl=%2Fconnect%2Fauthorize%3Fclient_id%3DPbys_BlazorServerTiered%26redirect_uri%3Dhttps%253A%252F%252Fpbys.erciyes.edu.tr%252Fsignin-oidc%26response_type%3Dcode%2520id_token%26scope%3Dopenid%2520profile%2520roles%2520email%2520phone%2520Pbys%26response_mode%3Dform_post%26nonce%3D638457378682159723.ZDc5ZTgzYzEtOGMzMC00N2MwLWEyZWQtOTA5MmM0YWMwM2Y3ZGQ0YWViMDMtZWExMy00OTBmLWJhMGEtYmIyMzZkYjk1OTYz%26state%3DCfDJ8M2WpbVwVzdBgEW9NajIHVUT12lr6ZpIwCvlW1Owv2fi7EqxGETRXHlqprPMvVI9SU0Nk3f14VG005zQmioP01AhtSG2KtdwYmaRy6Pn9t5jvfXiyu70oIGwbfouwxTtqhE-UuL02Q3NYMWRDMomQP7uC_uH6e3yh2xK4c3OKFcKaU0Bppso2tUDPgHMKcYt05jWqV_Vqu8ow4QUMi4-HtymTmNMqUb6nKVtYAnHzM9KS50EkpQOfH9ma-fzFdrvG3x2iBPM-zmKgQJx2mVcvEafW-7axOKUW-oO9LXpigET%26x-client-SKU%3DID_NET6_0%26x-client-ver%3D6.15.1.0]. After some time, when we try to log in using this bookmark, it gives a 400 error. Clicking the 'Go to Homepage' button under the 400 error redirects to the dashboard, and the system continues to work. How can we directly redirect to the dashboard without encountering the 400 error?

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hi,

    You may change your redirect_uri to dashboard url.

    thanks,

Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11