Why now ASP.NET Core MVC Template cannot login in.
User: admin Pwd: 1q2w3E*
I have followed the instruction:
https://abp.io/documents/abp/latest/Getting-Started-AspNetCore-MVC-Template
Please check the log.
There are many Info message in log like:
2019-06-12 15:36:54.005 +08:00 [INF] Authorization failed.
2019-06-12 15:36:54.005 +08:00 [INF] Authorization failed.
2019-06-12 15:36:54.005 +08:00 [INF] Authorization failed.
2019-06-12 15:36:54.005 +08:00 [INF] Authorization failed.
2019-06-12 15:36:54.005 +08:00 [INF] Authorization failed.
2019-06-12 15:36:54.005 +08:00 [INF] Authorization failed.
2019-06-12 15:36:54.005 +08:00 [INF] Authorization failed.
2019-06-12 15:36:54.005 +08:00 [INF] Authorization failed.
2019-06-12 15:36:54.005 +08:00 [INF] Authorization failed.
2019-06-12 15:36:54.005 +08:00 [INF] Authorization failed.
2019-06-12 15:36:54.006 +08:00 [INF] Authorization failed.
2019-06-12 15:36:54.006 +08:00 [INF] Authorization failed.
2019-06-12 15:36:54.006 +08:00 [INF] Authorization failed.
2019-06-12 15:36:54.006 +08:00 [INF] Authorization failed.
2019-06-12 15:36:54.006 +08:00 [INF] Authorization failed.
2019-06-12 15:36:54.006 +08:00 [INF] Authorization failed.
2019-06-12 15:36:54.006 +08:00 [INF] Authorization failed.
But I cannot find any errors.
Try the BookStore, if it works, please compare the code with your project.
https://github.com/abpframework/abp/blob/master/samples/BookStore/
Try the BookStore, if it works, please compare the code with your project.
https://github.com/abpframework/abp/blob/master/samples/BookStore/
This sample cannot work also!
I have found when I start this web, It even cannot insert seed data to table.
I checked the logs as bellow:
2019-06-12 17:52:43.540 +08:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController.GetAll (Volo.Abp.AspNetCore.Mvc) in 0.5822ms
2019-06-12 17:52:43.540 +08:00 [INF] Executing action method Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController.Get (Volo.Abp.AspNetCore.Mvc) - Validation state: "Valid"
2019-06-12 17:52:43.540 +08:00 [INF] Request finished in 53.4713ms 200 text/plain; charset=utf-8
2019-06-12 17:52:43.545 +08:00 [INF] Authorization failed.
2019-06-12 17:52:43.545 +08:00 [INF] Authorization failed.
2019-06-12 17:52:43.545 +08:00 [INF] Authorization failed.
2019-06-12 17:52:43.545 +08:00 [INF] Authorization failed.
2019-06-12 17:52:43.545 +08:00 [INF] Authorization failed.
2019-06-12 17:52:43.545 +08:00 [INF] Authorization failed.
2019-06-12 17:52:43.545 +08:00 [INF] Authorization failed.
2019-06-12 17:52:43.545 +08:00 [INF] Authorization failed.
2019-06-12 17:52:43.545 +08:00 [INF] Authorization failed.
2019-06-12 17:52:43.545 +08:00 [INF] Authorization failed.
2019-06-12 17:52:43.545 +08:00 [INF] Authorization failed.
2019-06-12 17:52:43.545 +08:00 [INF] Authorization failed.
2019-06-12 17:52:43.545 +08:00 [INF] Authorization failed.
2019-06-12 17:52:43.545 +08:00 [INF] Authorization failed.
2019-06-12 17:52:43.545 +08:00 [INF] Authorization failed.
2019-06-12 17:52:43.545 +08:00 [INF] Authorization failed.
2019-06-12 17:52:43.545 +08:00 [INF] Authorization failed.
2019-06-12 17:52:43.546 +08:00 [INF] Executed action method Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController.Get (Volo.Abp.AspNetCore.Mvc), returned result Microsoft.AspNetCore.Mvc.ObjectResult in 5.9717ms.
2019-06-12 17:52:43.546 +08:00 [INF] Executing ObjectResult, writing value of type 'System.String'.
2019-06-12 17:52:43.547 +08:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController.Get (Volo.Abp.AspNetCore.Mvc) in 7.1995000000000005ms
2019-06-12 17:52:43.547 +08:00 [INF] Request finished in 79.6619ms 200 text/plain; charset=utf-8
This sample cannot work also!
I have found when I start this web, It even cannot insert seed data to table.
see:
https://github.com/abpframework/abp/issues/1123#issuecomment-495653336
https://cn.abp.io/documents/abp/latest/Getting-Started-AspNetCore-MVC-Template#%E4%BD%BF%E7%94%A8dbmigrator%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F
Thanks, but this just fix seed date issue, the start template still cannot login in.
I can use the BookStore to log in after migrating data.
Please check the logs carefully.
Please share a screenshot if necessary.
I checked the logs again, now I can see the signed in logs, but the page cannot redirect to the signed in page. I found an error "2019-06-13 11:20:45.154 +08:00 [DBG] AuthenticationScheme: Bearer was not authenticated."
2019-06-13 11:20:45.088 +08:00 [INF] AuthenticationScheme: Identity.Application signed in.
2019-06-13 11:20:45.092 +08:00 [INF] {
"Name": "User Login Success",
"Category": "Authentication",
"EventType": "Success",
"Id": 1000,
"Username": "admin",
"SubjectId": "b2e29371-c6ed-b5e7-1b23-39ee60f55325",
"DisplayName": "admin",
"Endpoint": "UI",
"ActivityId": "0HLNFLEU6VHFB:00000001",
"TimeStamp": "2019-06-13T03:20:45Z",
"ProcessId": 29440,
"LocalIpAddress": "::1:53932",
"RemoteIpAddress": "::1"
}
2019-06-13 11:20:45.095 +08:00 [DBG] Added 0 entity changes to the current audit log
2019-06-13 11:20:45.095 +08:00 [INF] Executed handler method OnPostAsync, returned result Microsoft.AspNetCore.Mvc.RedirectResult.
2019-06-13 11:20:45.096 +08:00 [INF] Executing RedirectResult, redirecting to /.
2019-06-13 11:20:45.096 +08:00 [INF] Executed page /Account/Login in 74.4143ms
2019-06-13 11:20:45.096 +08:00 [INF] Request finished in 79.1862ms 302
2019-06-13 11:20:45.100 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:53932/
2019-06-13 11:20:45.100 +08:00 [DBG] AuthenticationScheme: Bearer was not authenticated.
2019-06-13 11:20:45.102 +08:00 [INF] Route matched with {page = "/Index", action = "", controller = "", area = ""}. Executing page /Index
2019-06-13 11:20:45.102 +08:00 [INF] Executing handler method MyCompanyName.MyProjectName.Web.Pages.IndexModel.OnGet - ModelState is "Valid"
2019-06-13 11:20:45.102 +08:00 [INF] Executed handler method OnGet, returned result .
2019-06-13 11:20:45.102 +08:00 [INF] Executing an implicit handler method - ModelState is "Valid"
2019-06-13 11:20:45.102 +08:00 [INF] Executed an implicit handler method, returned result Microsoft.AspNetCore.Mvc.RazorPages.PageResult.
2019-06-13 11:20:45.106 +08:00 [DBG] Added bundle 'Basic.Global' to the page in 1.02 ms.
2019-06-13 11:20:45.106 +08:00 [DBG] Added bundle '91A143E5BBA37D801A02555A7407C133' to the page in 0.11 ms.
2019-06-13 11:20:45.108 +08:00 [INF] Authorization failed.
2019-06-13 11:20:45.108 +08:00 [INF] Authorization failed.
2019-06-13 11:20:45.109 +08:00 [INF] Authorization failed.
2019-06-13 11:20:45.114 +08:00 [DBG] Added bundle 'Basic.Global' to the page in 2.63 ms.
2019-06-13 11:20:45.115 +08:00 [DBG] Added bundle 'A4B2578EBCCAF48D15D84F95F6B828FB' to the page in 0.12 ms.
2019-06-13 11:20:45.115 +08:00 [INF] Executed page /Index in 12.9399ms
2019-06-13 11:20:45.115 +08:00 [INF] Request finished in 14.6061ms 200 text/html; charset=utf-8
2019-06-13 11:20:45.139 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:53932/libs/freeze-ui/freeze-ui.min.css?_v=0
2019-06-13 11:20:45.140 +08:00 [DBG] AuthenticationScheme: Bearer was not authenticated.
2019-06-13 11:20:45.140 +08:00 [INF] Request finished in 0.9159ms 404
2019-06-13 11:20:45.149 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:53932/libs/abp/aspnetcore-mvc-ui-theme-shared/freeze-ui/abp-freeze-ui.js?_v=636959907460476333
2019-06-13 11:20:45.149 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:53932/Pages/Abp/MultiTenancy/tenant-switch.js?_v=636959917674942318
2019-06-13 11:20:45.149 +08:00 [INF] The file /libs/abp/aspnetcore-mvc-ui-theme-shared/freeze-ui/abp-freeze-ui.js was not modified
2019-06-13 11:20:45.149 +08:00 [INF] The file /Pages/Abp/MultiTenancy/tenant-switch.js was not modified
2019-06-13 11:20:45.149 +08:00 [INF] Request finished in 0.4081ms 304 application/javascript
2019-06-13 11:20:45.149 +08:00 [INF] Request finished in 1.4474ms 304 application/javascript
2019-06-13 11:20:45.153 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:53932/Abp/ServiceProxyScript
2019-06-13 11:20:45.153 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:53932/Abp/ApplicationConfigurationScript
2019-06-13 11:20:45.154 +08:00 [DBG] AuthenticationScheme: Bearer was not authenticated.
2019-06-13 11:20:45.154 +08:00 [DBG] AuthenticationScheme: Bearer was not authenticated.
2019-06-13 11:20:45.156 +08:00 [INF] Route matched with {area = "Abp", action = "Get", controller = "AbpApplicationConfigurationScript", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[System.String] Get() on controller Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController (Volo.Abp.AspNetCore.Mvc).
2019-06-13 11:20:45.156 +08:00 [INF] Route matched with {area = "Abp", action = "GetAll", controller = "AbpServiceProxyScript", page = ""}. Executing controller action with signature System.String GetAll(Volo.Abp.AspNetCore.Mvc.ProxyScripting.ServiceProxyGenerationModel) on controller Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController (Volo.Abp.AspNetCore.Mvc).
2019-06-13 11:20:45.157 +08:00 [INF] Executing action method Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController.GetAll (Volo.Abp.AspNetCore.Mvc) - Validation state: "Valid"
2019-06-13 11:20:45.157 +08:00 [INF] Executed action method Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController.GetAll (Volo.Abp.AspNetCore.Mvc), returned result Microsoft.AspNetCore.Mvc.ObjectResult in 0.0538ms.
2019-06-13 11:20:45.157 +08:00 [INF] Executing ObjectResult, writing value of type 'System.String'.
2019-06-13 11:20:45.157 +08:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController.GetAll (Volo.Abp.AspNetCore.Mvc) in 0.65670000000000006ms
2019-06-13 11:20:45.157 +08:00 [INF] Request finished in 3.8626ms 200 text/plain; charset=utf-8
2019-06-13 11:20:45.158 +08:00 [INF] Executing action method Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController.Get (Volo.Abp.AspNetCore.Mvc) - Validation state: "Valid"
2019-06-13 11:20:45.163 +08:00 [INF] Authorization failed.
2019-06-13 11:20:45.163 +08:00 [INF] Authorization failed.
2019-06-13 11:20:45.163 +08:00 [INF] Authorization failed.
2019-06-13 11:20:45.163 +08:00 [INF] Authorization failed.
2019-06-13 11:20:45.163 +08:00 [INF] Authorization failed.
2019-06-13 11:20:45.163 +08:00 [INF] Authorization failed.
I had the same trouble .
and I tried clear the browser cache... it's run!
Most helpful comment
I had the same trouble .
and I tried clear the browser cache... it's run!