When I run the project, I try to login with the admin user on the login screen, but when I check it via debug, it verifies the user but redirects to the login screen again. I am not getting any errors. do you help urgently.
5 Answer(s)
-
0
Hi @erdemboyaci
- Is there any returnUrl parameter on the login page's URL ?
- Is there any JavaScript error in browser console ?
- Could oyu try with another browser to see if it works ?
Thanks,
-
0
HI @ismcagdas,
We experienced the same behavior with our app : ASP.NET CORE MVC & jQuery .NET Core 3.1 v8.2.1
We return on the login page with a return parameter every time we try to log in (host or tenant)
The returnurl is : http://localhost:44302/Account/Login?ReturnUrl=%2FApp
This only doesn't work with Chrome (uptodate => Version 80.0.3987.149 (Build officiel) (64 bits)) it work on edge and IE.
No javascript error on debug console.
You can find the logs on the end of the post.
Hope all this informations will help you to find the problem.
Thanks, Nicolas.
INFO 2020-03-19 08:49:49,674 [8 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 GET http://localhost:44302/Account/Login INFO 2020-03-19 08:49:49,887 [8 ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'Gekko.Web.Controllers.AccountController.Login (Gekko.Web.Mvc)' INFO 2020-03-19 08:49:50,154 [8 ] c.Infrastructure.ControllerActionInvoker - Route matched with {action = "Login", controller = "Account", area = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.ActionResult] Login(System.String, System.String, System.String, System.String) on controller Gekko.Web.Controllers.AccountController (Gekko.Web.Mvc). INFO 2020-03-19 08:49:53,673 [18 ] Core.Mvc.ViewFeatures.ViewResultExecutor - Executing ViewResult, running view Login. INFO 2020-03-19 08:49:54,682 [18 ] Core.Mvc.ViewFeatures.ViewResultExecutor - Executed ViewResult - view Login executed in 1066.7949ms. INFO 2020-03-19 08:49:54,685 [18 ] c.Infrastructure.ControllerActionInvoker - Executed action Gekko.Web.Controllers.AccountController.Login (Gekko.Web.Mvc) in 4530.6352ms INFO 2020-03-19 08:49:54,686 [18 ] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'Gekko.Web.Controllers.AccountController.Login (Gekko.Web.Mvc)' INFO 2020-03-19 08:49:54,712 [18 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 5039.3264ms 200 text/html; charset=utf-8 INFO 2020-03-19 08:49:54,738 [19 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 GET http://localhost:44302/AbpScripts/GetScripts?v=637202045233013079 INFO 2020-03-19 08:49:54,743 [8 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 GET http://localhost:44302/AbpServiceProxies/GetAll?v=637202045233013079 INFO 2020-03-19 08:49:54,750 [19 ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'Abp.AspNetCore.Mvc.Controllers.AbpScriptsController.GetScripts (Abp.AspNetCore)' INFO 2020-03-19 08:49:54,750 [8 ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'Abp.AspNetCore.Mvc.Proxying.AbpServiceProxiesController.GetAll (Abp.AspNetCore)' INFO 2020-03-19 08:49:54,759 [8 ] c.Infrastructure.ControllerActionInvoker - Route matched with {action = "GetAll", controller = "AbpServiceProxies", area = ""}. Executing controller action with signature Microsoft.AspNetCore.Mvc.ContentResult GetAll(Abp.AspNetCore.Mvc.Proxying.ApiProxyGenerationModel) on controller Abp.AspNetCore.Mvc.Proxying.AbpServiceProxiesController (Abp.AspNetCore). INFO 2020-03-19 08:49:54,762 [19 ] c.Infrastructure.ControllerActionInvoker - Route matched with {action = "GetScripts", controller = "AbpScripts", area = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.ActionResult] GetScripts(System.String, Boolean) on controller Abp.AspNetCore.Mvc.Controllers.AbpScriptsController (Abp.AspNetCore). INFO 2020-03-19 08:49:54,905 [22 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 GET http://localhost:44302/view-resources/Areas/App/Views/_Bundles/common-scripts.min.js?v=QZFgPC8L7RgQHguWr3C02tcO66Yna8npyTmjKA0mAwI INFO 2020-03-19 08:49:54,914 [22 ] NetCore.StaticFiles.StaticFileMiddleware - The file /view-resources/Areas/App/Views/_Bundles/common-scripts.min.js was not modified INFO 2020-03-19 08:49:54,915 [22 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 9.0952ms 304 application/javascript INFO 2020-03-19 08:49:54,919 [19 ] Mvc.Infrastructure.ContentResultExecutor - Executing ContentResult with HTTP Response ContentType of application/x-javascript; charset=utf-8 INFO 2020-03-19 08:49:54,923 [19 ] c.Infrastructure.ControllerActionInvoker - Executed action Abp.AspNetCore.Mvc.Controllers.AbpScriptsController.GetScripts (Abp.AspNetCore) in 161.4941ms INFO 2020-03-19 08:49:54,923 [19 ] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'Abp.AspNetCore.Mvc.Controllers.AbpScriptsController.GetScripts (Abp.AspNetCore)' INFO 2020-03-19 08:49:54,924 [19 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 185.539ms 200 application/x-javascript; charset=utf-8 INFO 2020-03-19 08:49:54,925 [8 ] Mvc.Infrastructure.ContentResultExecutor - Executing ContentResult with HTTP Response ContentType of application/x-javascript INFO 2020-03-19 08:49:54,935 [8 ] c.Infrastructure.ControllerActionInvoker - Executed action Abp.AspNetCore.Mvc.Proxying.AbpServiceProxiesController.GetAll (Abp.AspNetCore) in 175.1337ms INFO 2020-03-19 08:49:54,935 [8 ] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'Abp.AspNetCore.Mvc.Proxying.AbpServiceProxiesController.GetAll (Abp.AspNetCore)' INFO 2020-03-19 08:49:54,935 [8 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 192.0071ms 200 application/x-javascript INFO 2020-03-19 08:49:55,161 [19 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 GET http://localhost:44302/api/services/app/Session/GetCurrentLoginInformations application/json INFO 2020-03-19 08:49:55,164 [19 ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'Gekko.Sessions.SessionAppService.GetCurrentLoginInformations (Gekko.Application)' INFO 2020-03-19 08:49:55,171 [19 ] c.Infrastructure.ControllerActionInvoker - Route matched with {area = "app", action = "GetCurrentLoginInformations", controller = "Session"}. Executing controller action with signature System.Threading.Tasks.Task`1[Gekko.Sessions.Dto.GetCurrentLoginInformationsOutput] GetCurrentLoginInformations() on controller Gekko.Sessions.SessionAppService (Gekko.Application). INFO 2020-03-19 08:49:55,184 [19 ] .Mvc.Infrastructure.ObjectResultExecutor - Executing ObjectResult, writing value of type 'Abp.Web.Models.AjaxResponse'. INFO 2020-03-19 08:49:55,265 [19 ] c.Infrastructure.ControllerActionInvoker - Executed action Gekko.Sessions.SessionAppService.GetCurrentLoginInformations (Gekko.Application) in 93.6549ms INFO 2020-03-19 08:49:55,265 [19 ] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'Gekko.Sessions.SessionAppService.GetCurrentLoginInformations (Gekko.Application)' INFO 2020-03-19 08:49:55,266 [19 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 104.836ms 200 application/json; charset=utf-8 INFO 2020-03-19 08:49:56,928 [18 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 POST http://localhost:44302/Account/Login application/x-www-form-urlencoded; charset=UTF-8 263 INFO 2020-03-19 08:49:56,944 [18 ] tCore.Cors.Infrastructure.CorsMiddleware - No CORS policy found for the specified request. INFO 2020-03-19 08:49:56,945 [18 ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'Gekko.Web.Controllers.AccountController.Login (Gekko.Web.Mvc)' INFO 2020-03-19 08:49:57,003 [18 ] c.Infrastructure.ControllerActionInvoker - Route matched with {action = "Login", controller = "Account", area = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.JsonResult] Login(Gekko.Web.Models.Account.LoginViewModel, System.String, System.String, System.String) on controller Gekko.Web.Controllers.AccountController (Gekko.Web.Mvc). INFO 2020-03-19 08:49:58,356 [19 ] tion.Cookies.CookieAuthenticationHandler - AuthenticationScheme: Identity.Application signed in. INFO 2020-03-19 08:49:58,391 [18 ] tonsoftJson.NewtonsoftJsonResultExecutor - Executing JsonResult, writing value of type 'Abp.Web.Models.AjaxResponse'. INFO 2020-03-19 08:49:58,391 [18 ] c.Infrastructure.ControllerActionInvoker - Executed action Gekko.Web.Controllers.AccountController.Login (Gekko.Web.Mvc) in 1387.5181ms INFO 2020-03-19 08:49:58,392 [18 ] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'Gekko.Web.Controllers.AccountController.Login (Gekko.Web.Mvc)' INFO 2020-03-19 08:49:58,392 [18 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 1464.3739ms 200 application/json; charset=utf-8 INFO 2020-03-19 08:49:58,417 [19 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 GET http://localhost:44302/App INFO 2020-03-19 08:49:58,430 [19 ] uthorization.DefaultAuthorizationService - Authorization failed. INFO 2020-03-19 08:49:58,435 [19 ] tion.Cookies.CookieAuthenticationHandler - AuthenticationScheme: Identity.Application was challenged. INFO 2020-03-19 08:49:58,435 [19 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 18.1403ms 302 INFO 2020-03-19 08:49:58,441 [19 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 GET http://localhost:44302/Account/Login?ReturnUrl=%2FApp INFO 2020-03-19 08:49:58,442 [19 ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'Gekko.Web.Controllers.AccountController.Login (Gekko.Web.Mvc)' INFO 2020-03-19 08:49:58,449 [19 ] c.Infrastructure.ControllerActionInvoker - Route matched with {action = "Login", controller = "Account", area = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.ActionResult] Login(System.String, System.String, System.String, System.String) on controller Gekko.Web.Controllers.AccountController (Gekko.Web.Mvc). INFO 2020-03-19 08:49:58,481 [19 ] Core.Mvc.ViewFeatures.ViewResultExecutor - Executing ViewResult, running view Login. INFO 2020-03-19 08:49:58,505 [19 ] Core.Mvc.ViewFeatures.ViewResultExecutor - Executed ViewResult - view Login executed in 23.5065ms. INFO 2020-03-19 08:49:58,505 [19 ] c.Infrastructure.ControllerActionInvoker - Executed action Gekko.Web.Controllers.AccountController.Login (Gekko.Web.Mvc) in 55.7316ms INFO 2020-03-19 08:49:58,505 [19 ] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'Gekko.Web.Controllers.AccountController.Login (Gekko.Web.Mvc)' INFO 2020-03-19 08:49:58,505 [19 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 64.9102ms 200 text/html; charset=utf-8 INFO 2020-03-19 08:49:58,548 [22 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 GET http://localhost:44302/AbpServiceProxies/GetAll?v=637202045233013079 INFO 2020-03-19 08:49:58,549 [19 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 GET http://localhost:44302/AbpScripts/GetScripts?v=637202045233013079 INFO 2020-03-19 08:49:58,550 [22 ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'Abp.AspNetCore.Mvc.Proxying.AbpServiceProxiesController.GetAll (Abp.AspNetCore)' INFO 2020-03-19 08:49:58,551 [19 ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'Abp.AspNetCore.Mvc.Controllers.AbpScriptsController.GetScripts (Abp.AspNetCore)' INFO 2020-03-19 08:49:58,554 [22 ] c.Infrastructure.ControllerActionInvoker - Route matched with {action = "GetAll", controller = "AbpServiceProxies", area = ""}. Executing controller action with signature Microsoft.AspNetCore.Mvc.ContentResult GetAll(Abp.AspNetCore.Mvc.Proxying.ApiProxyGenerationModel) on controller Abp.AspNetCore.Mvc.Proxying.AbpServiceProxiesController (Abp.AspNetCore). INFO 2020-03-19 08:49:58,557 [22 ] Mvc.Infrastructure.ContentResultExecutor - Executing ContentResult with HTTP Response ContentType of application/x-javascript INFO 2020-03-19 08:49:58,560 [19 ] c.Infrastructure.ControllerActionInvoker - Route matched with {action = "GetScripts", controller = "AbpScripts", area = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.ActionResult] GetScripts(System.String, Boolean) on controller Abp.AspNetCore.Mvc.Controllers.AbpScriptsController (Abp.AspNetCore). INFO 2020-03-19 08:49:58,565 [21 ] c.Infrastructure.ControllerActionInvoker - Executed action Abp.AspNetCore.Mvc.Proxying.AbpServiceProxiesController.GetAll (Abp.AspNetCore) in 9.9878ms INFO 2020-03-19 08:49:58,565 [21 ] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'Abp.AspNetCore.Mvc.Proxying.AbpServiceProxiesController.GetAll (Abp.AspNetCore)' INFO 2020-03-19 08:49:58,565 [21 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 16.819ms 200 application/x-javascript INFO 2020-03-19 08:49:58,607 [19 ] Mvc.Infrastructure.ContentResultExecutor - Executing ContentResult with HTTP Response ContentType of application/x-javascript; charset=utf-8 INFO 2020-03-19 08:49:58,608 [22 ] c.Infrastructure.ControllerActionInvoker - Executed action Abp.AspNetCore.Mvc.Controllers.AbpScriptsController.GetScripts (Abp.AspNetCore) in 47.8265ms INFO 2020-03-19 08:49:58,608 [22 ] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'Abp.AspNetCore.Mvc.Controllers.AbpScriptsController.GetScripts (Abp.AspNetCore)' INFO 2020-03-19 08:49:58,608 [22 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 59.6535ms 200 application/x-javascript; charset=utf-8 INFO 2020-03-19 08:49:58,832 [22 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 GET http://localhost:44302/api/services/app/Session/GetCurrentLoginInformations application/json INFO 2020-03-19 08:49:58,848 [22 ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'Gekko.Sessions.SessionAppService.GetCurrentLoginInformations (Gekko.Application)' INFO 2020-03-19 08:49:58,853 [22 ] c.Infrastructure.ControllerActionInvoker - Route matched with {area = "app", action = "GetCurrentLoginInformations", controller = "Session"}. Executing controller action with signature System.Threading.Tasks.Task`1[Gekko.Sessions.Dto.GetCurrentLoginInformationsOutput] GetCurrentLoginInformations() on controller Gekko.Sessions.SessionAppService (Gekko.Application). INFO 2020-03-19 08:49:58,864 [22 ] .Mvc.Infrastructure.ObjectResultExecutor - Executing ObjectResult, writing value of type 'Abp.Web.Models.AjaxResponse'. INFO 2020-03-19 08:49:58,868 [22 ] c.Infrastructure.ControllerActionInvoker - Executed action Gekko.Sessions.SessionAppService.GetCurrentLoginInformations (Gekko.Application) in 13.9835ms INFO 2020-03-19 08:49:58,868 [22 ] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'Gekko.Sessions.SessionAppService.GetCurrentLoginInformations (Gekko.Application)' INFO 2020-03-19 08:49:58,869 [22 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 36.8874ms 200 application/json; charset=utf-8
-
0
hi @willignicolas
Try it with https? https://localhost:44302
Related: https://github.com/aspnetzero/aspnet-zero-core/issues/2950
-
0
Yes it works.
Thanks for your help @maliming
-
0
hi @erdemboyaci You can also try it. : )