Base solution for your next web application
Open Closed

Problem on Template First Login #2339


User avatar
0
clickok created

Hello

I'm testing Module Zero, and got: "Multi Page Web Application" - "Web application with server rendered HTML; ASP.NET MVC & jQuery." I included module Zero, downloaded, and opened on Visual Studio.

I needed Restore Nuget Packages. After restore, I updated all packages and I got DynamicFilters problem. I reverted DynamicFilters to 1.4.11.0 and updated the .config files and finally the app decided works (oh, I updated the connection string too)

Finally I got to login screen. I try admin + 123qwe and it asked for Tenancy name (How I do to access as host?)... I accessed the database for table AbpTenants and discovered the only Tenancy name is "Default"...

Typing Default + admin + 123qwe looks finally I can do login and... I got a empty page with this JSON result:

{"result":null,"targetUrl":null,"success":false,"error":{"code":0,"message":"Empty or invalid anti forgery header token.","details":null,"validationErrors":null},"unAuthorizedRequest":true,"__abp":true}

So, I did something wrong? I thank you any help.


6 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Thank you for sharing this problem. We will try the same case and we will get back to you soon.

    We will also update the template.

    Thanks again.

  • User Avatar
    0
    clickok created

    Hello

    I'm learning about ABP/ModuleZero, and I discovered that it generates a log file. So I removed the older log files, and then I run a Visual Studio Session, where I repeated the steps with the error. Then I have opened the logs.txt file and I'm posting here.

    Sadly, I still dont know what the problem... but I find odd references to path "D:\Halil\Github\aspnetboilerplate". Maybe is it the problem?

    DEBUG 2017-01-26 23:15:23,513 [1 ] Abp.Modules.AbpModuleManager - Loading Abp modules... DEBUG 2017-01-26 23:15:29,607 [1 ] Abp.Modules.AbpModuleManager - Found 15 ABP modules in total. DEBUG 2017-01-26 23:15:29,706 [1 ] Abp.Modules.AbpModuleManager - Loaded module: MyProject.Web.MyProjectWebModule, MyProject.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-01-26 23:15:29,708 [1 ] Abp.Modules.AbpModuleManager - Loaded module: MyProject.MyProjectDataModule, MyProject.EntityFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-01-26 23:15:29,708 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Zero.EntityFramework.AbpZeroEntityFrameworkModule, Abp.Zero.EntityFramework, Version=1.3.1.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-01-26 23:15:29,742 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Zero.AbpZeroCoreModule, Abp.Zero, Version=1.3.1.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-01-26 23:15:29,743 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.AbpKernelModule, Abp, Version=1.3.1.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-01-26 23:15:29,743 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.EntityFramework.AbpEntityFrameworkModule, Abp.EntityFramework, Version=1.3.1.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-01-26 23:15:29,743 [1 ] Abp.Modules.AbpModuleManager - Loaded module: MyProject.MyProjectCoreModule, MyProject.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-01-26 23:15:29,744 [1 ] Abp.Modules.AbpModuleManager - Loaded module: MyProject.MyProjectApplicationModule, MyProject.Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-01-26 23:15:29,744 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.AutoMapper.AbpAutoMapperModule, Abp.AutoMapper, Version=1.3.1.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-01-26 23:15:29,744 [1 ] Abp.Modules.AbpModuleManager - Loaded module: MyProject.Api.MyProjectWebApiModule, MyProject.WebApi, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-01-26 23:15:29,744 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.WebApi.AbpWebApiModule, Abp.Web.Api, Version=1.3.1.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-01-26 23:15:29,744 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Web.AbpWebModule, Abp.Web, Version=1.3.1.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-01-26 23:15:29,745 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Web.AbpWebCommonModule, Abp.Web.Common, Version=1.3.1.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-01-26 23:15:29,745 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Web.SignalR.AbpWebSignalRModule, Abp.Web.SignalR, Version=1.3.1.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-01-26 23:15:29,745 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Web.Mvc.AbpWebMvcModule, Abp.Web.Mvc, Version=1.3.1.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-01-26 23:15:29,749 [1 ] Abp.Modules.AbpModuleManager - 15 modules loaded. DEBUG 2017-01-26 23:15:36,863 [1 ] o.Configuration.LanguageManagementConfig - Converted Abp (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource DEBUG 2017-01-26 23:15:36,863 [1 ] o.Configuration.LanguageManagementConfig - Converted AbpZero (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource DEBUG 2017-01-26 23:15:36,863 [1 ] o.Configuration.LanguageManagementConfig - Converted MyProject (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource DEBUG 2017-01-26 23:15:36,863 [1 ] o.Configuration.LanguageManagementConfig - Converted AbpWeb (Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource) to MultiTenantLocalizationSource DEBUG 2017-01-26 23:15:38,539 [1 ] EntityFramework.AbpEntityFrameworkModule - Registering DbContext: MyProject.EntityFramework.MyProjectDbContext, MyProject.EntityFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2017-01-26 23:15:40,742 [1 ] Abp.Localization.LocalizationManager - Initializing 4 localization sources. DEBUG 2017-01-26 23:15:40,791 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: Abp DEBUG 2017-01-26 23:15:40,804 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: AbpZero DEBUG 2017-01-26 23:15:40,808 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: MyProject DEBUG 2017-01-26 23:15:40,810 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: AbpWeb DEBUG 2017-01-26 23:15:40,926 [1 ] Abp.BackgroundJobs.BackgroundJobManager - Start background worker: Abp.BackgroundJobs.BackgroundJobManager DEBUG 2017-01-26 23:15:41,075 [1 ] Abp.AutoMapper.AbpAutoMapperModule - Found 7 classes define auto mapping attributes DEBUG 2017-01-26 23:15:41,075 [1 ] Abp.AutoMapper.AbpAutoMapperModule - MyProject.Sessions.Dto.TenantLoginInfoDto DEBUG 2017-01-26 23:15:41,080 [1 ] Abp.AutoMapper.AbpAutoMapperModule - MyProject.Sessions.Dto.UserLoginInfoDto DEBUG 2017-01-26 23:15:41,080 [1 ] Abp.AutoMapper.AbpAutoMapperModule - MyProject.Users.Dto.CreateUserInput DEBUG 2017-01-26 23:15:41,081 [1 ] Abp.AutoMapper.AbpAutoMapperModule - MyProject.Users.Dto.UserListDto DEBUG 2017-01-26 23:15:41,081 [1 ] Abp.AutoMapper.AbpAutoMapperModule - MyProject.MultiTenancy.Dto.CreateTenantInput DEBUG 2017-01-26 23:15:41,081 [1 ] Abp.AutoMapper.AbpAutoMapperModule - MyProject.MultiTenancy.Dto.TenantListDto DEBUG 2017-01-26 23:15:41,081 [1 ] Abp.AutoMapper.AbpAutoMapperModule - MyProject.Web.Models.Account.TenantSelectionViewModel+TenantInfo DEBUG 2017-01-26 23:15:43,717 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'MyProject.Sessions.ISessionAppService' with service name 'app/session'. DEBUG 2017-01-26 23:15:43,718 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'MyProject.Users.IUserAppService' with service name 'app/user'. DEBUG 2017-01-26 23:15:43,720 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'MyProject.Roles.IRoleAppService' with service name 'app/role'. DEBUG 2017-01-26 23:15:43,721 [1 ] Abp.Logging.LogHelper - Dynamic web api controller is created for type 'MyProject.MultiTenancy.ITenantAppService' with service name 'app/tenant'. WARN 2017-01-26 23:16:26,905 [7 ] Abp.Logging.LogHelper - Abp.Authorization.AbpAuthorizationException: Current user did not login to the application! at Abp.Authorization.AuthorizationHelper.<AuthorizeAsync>d__19.MoveNext() in D:\Halil\Github\aspnetboilerplate\src\Abp\Authorization\AuthorizationHelper.cs:line 42 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Abp.Authorization.AuthorizationHelper.<CheckPermissions>d__22.MoveNext() in D:\Halil\Github\aspnetboilerplate\src\Abp\Authorization\AuthorizationHelper.cs:line 100 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Abp.Authorization.AuthorizationHelper.<AuthorizeAsync>d__20.MoveNext() in D:\Halil\Github\aspnetboilerplate\src\Abp\Authorization\AuthorizationHelper.cs:line 67 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Nito.AsyncEx.AsyncContext.<>c__DisplayClass3.<Run>b__1(Task t) at System.Threading.Tasks.ContinuationTaskFromTask.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Nito.AsyncEx.AsyncContext.Run(Func1 action) at Abp.Authorization.AuthorizationHelperExtensions.Authorize(IAuthorizationHelper authorizationHelper, MethodInfo methodInfo) in D:\Halil\Github\aspnetboilerplate\src\Abp\Authorization\AuthorizationHelperExtensions.cs:line 27 at Abp.Web.Mvc.Authorization.AbpMvcAuthorizeFilter.OnAuthorization(AuthorizationContext filterContext) in D:\Halil\Github\aspnetboilerplate\src\Abp.Web.Mvc\Web\Mvc\Authorization\AbpMvcAuthorizeFilter.cs:line 48 Abp.Authorization.AbpAuthorizationException: Current user did not login to the application! at Abp.Authorization.AuthorizationHelper.<AuthorizeAsync>d__19.MoveNext() in D:\Halil\Github\aspnetboilerplate\src\Abp\Authorization\AuthorizationHelper.cs:line 42 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Abp.Authorization.AuthorizationHelper.<CheckPermissions>d__22.MoveNext() in D:\Halil\Github\aspnetboilerplate\src\Abp\Authorization\AuthorizationHelper.cs:line 100 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Abp.Authorization.AuthorizationHelper.<AuthorizeAsync>d__20.MoveNext() in D:\Halil\Github\aspnetboilerplate\src\Abp\Authorization\AuthorizationHelper.cs:line 67 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Nito.AsyncEx.AsyncContext.<>c__DisplayClass3.<Run>b__1(Task t) at System.Threading.Tasks.ContinuationTaskFromTask.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Nito.AsyncEx.AsyncContext.Run(Func1 action) at Abp.Authorization.AuthorizationHelperExtensions.Authorize(IAuthorizationHelper authorizationHelper, MethodInfo methodInfo) in D:\Halil\Github\aspnetboilerplate\src\Abp\Authorization\AuthorizationHelperExtensions.cs:line 27 at Abp.Web.Mvc.Authorization.AbpMvcAuthorizeFilter.OnAuthorization(AuthorizationContext filterContext) in D:\Halil\Github\aspnetboilerplate\src\Abp.Web.Mvc\Web\Mvc\Authorization\AbpMvcAuthorizeFilter.cs:line 48 WARN 2017-01-26 23:17:49,929 [7 ] rity.AntiForgery.AbpAntiForgeryMvcFilter - Empty or invalid anti forgery header token. WARN 2017-01-26 23:17:49,929 [7 ] rity.AntiForgery.AbpAntiForgeryMvcFilter - Requested URI: <a class="postlink" href="http://localhost:61759/Account/Login?returnUrl=/">http://localhost:61759/Account/Login?returnUrl=/</a>

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    I have tried with the latest version of template and it worked for me. Normally we don't provide such a support but since you couldn't even start to work, we can help you with team viewer if it is ok for you.

    Please share your available time range with <a href="mailto:[email protected]">[email protected]</a> and we will schedule a meeting.

    Thanks.

  • User Avatar
    0
    tinman created

    This is happening for me as well. Freshly downloaded template from today Feb 27.

    I also had to rollback to DynamicFilters 1.4.11 to make the template run, but have same token error.

  • User Avatar
    0
    tinman created

    My issue looks like it was caused by Jquery version updates. I refreshed all the NuGet Packages I could to get current, and forgot to update the BundleConfig.cs to the new versions! All is working now.

    Hopefully this helps somebody if they forget after applying NuGet updates...

  • User Avatar
    0
    ismcagdas created
    Support Team

    Thanks @Tinman.