To be more precise: If you are using the same authentication service for both of your clients, your clients will need to identify themselves additionally. That way, your authentication service can then check for the specific user-property (mentioned in my post before) and then decide whether to ignore or not.
I think, you would have to extend the user-class and add a property that indicates whether the user was created on mobile application. Your web-application must then check for this property and ignore authentication attempts by mobile-application-created users.
ASPNETZERO 6.6.1, Angular, .NET Framework
I have a couple of features (boolean type) with child-features (value-type).
On client-side, when selecting an edition before registering a new tenant, I can see child-features being displayed although their parent-feature isn't activated (set to true) in that specific edition. Is this behaviour intended or is this a bug?
I would expect child-features to not be displayed when their parent-feature is not activated.
EDIT
A quick look on the source code (select-edition.component.html
) shows that inactive feature also should be displayed, including an icon that indicates that a feature is inactive. But this does not happen in my case ... I can only see child-features, but no parent-features (no matter if active or not).
EDIT
TenantRegistrationAppService.GetEditionsForSelect()
contains an interesting query:
var flatFeatures = ObjectMapper
.Map<List<FlatFeatureSelectDto>>(features)
.OrderBy(f => f.DisplayName)
.ToList();
It looks like this should create a list of all features without hierarchy. It's result is being displayed in select-edition.component.html
. But it only contains value-feature-types. Maybe there's something wrong with the mapping? I don't think it is intended this way.
Sorry, I just forgot to apply current database-migrations (Upgraded_To_Abp_v4_2_0) ... my bad ...
Angular, .NET Framework, 6.6.1
I just finished upgrading from 6.5.0 to 6.6.1.
Here is the content of Log.txt:
INFO 2019-02-11 12:41:11,531 [33 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 OPTIONS http://localhost:22742/AbpUserConfiguration/GetAll?d=1549885271457
INFO 2019-02-11 12:41:11,532 [33 ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
INFO 2019-02-11 12:41:11,532 [33 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 0.3543ms 204
INFO 2019-02-11 12:41:11,586 [33 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 GET http://localhost:22742/AbpUserConfiguration/GetAll?d=1549885271457 application/json
INFO 2019-02-11 12:41:11,587 [33 ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
INFO 2019-02-11 12:41:11,587 [33 ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'Abp.AspNetCore.Mvc.Controllers.AbpUserConfigurationController.GetAll (Abp.AspNetCore)'
INFO 2019-02-11 12:41:11,593 [33 ] ore.Mvc.Internal.ControllerActionInvoker - Route matched with {action = "GetAll", controller = "AbpUserConfiguration", area = ""}. Executing action Abp.AspNetCore.Mvc.Controllers.AbpUserConfigurationController.GetAll (Abp.AspNetCore)
INFO 2019-02-11 12:41:11,593 [33 ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
INFO 2019-02-11 12:41:11,594 [33 ] ore.Mvc.Internal.ControllerActionInvoker - Executing action method Abp.AspNetCore.Mvc.Controllers.AbpUserConfigurationController.GetAll (Abp.AspNetCore) - Validation state: Valid
INFO 2019-02-11 12:41:11,625 [33 ] ore.Mvc.Internal.ControllerActionInvoker - Executed action method Abp.AspNetCore.Mvc.Controllers.AbpUserConfigurationController.GetAll (Abp.AspNetCore), returned result Microsoft.AspNetCore.Mvc.JsonResult in 30.2267ms.
ERROR 2019-02-11 12:41:14,137 [27 ] Mvc.ExceptionHandling.AbpExceptionFilter - An error occurred while updating the entries. See the inner exception for details.
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details. ---> System.Data.SqlClient.SqlException: Invalid column name 'ReturnValue'.
bei System.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__180_0(Task`1 result)
bei System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
bei System.Threading.Tasks.Task.Execute()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.<ExecuteAsync>d__17.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.<ExecuteAsync>d__32.MoveNext()
--- Ende der internen Ausnahmestapelüberwachung ---
bei Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.<ExecuteAsync>d__32.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.<ExecuteAsync>d__10.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.<ExecuteAsync>d__7`2.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.<SaveChangesAsync>d__81.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.<SaveChangesAsync>d__79.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Microsoft.EntityFrameworkCore.DbContext.<SaveChangesAsync>d__53.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Abp.EntityFrameworkCore.AbpDbContext.<SaveChangesAsync>d__49.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Abp.Zero.EntityFrameworkCore.AbpZeroCommonDbContext`3.<SaveChangesAsync>d__102.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork.<SaveChangesInDbContextAsync>d__20.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork.<SaveChangesAsync>d__12.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork.<CompleteUowAsync>d__14.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Abp.Domain.Uow.UnitOfWorkBase.<CompleteAsync>d__61.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Abp.Auditing.AuditingHelper.<SaveAsync>d__21.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Abp.AspNetCore.Mvc.Auditing.AbpAuditActionFilter.<OnActionExecutionAsync>d__3.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextActionFilterAsync>d__10.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
bei Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
bei Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeInnerFilterAsync>d__13.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeNextExceptionFilterAsync>d__24.MoveNext()
INFO 2019-02-11 12:41:14,138 [27 ] .Mvc.Infrastructure.ObjectResultExecutor - Executing ObjectResult, writing value of type 'Abp.Web.Models.AjaxResponse'.
INFO 2019-02-11 12:41:14,139 [27 ] ore.Mvc.Internal.ControllerActionInvoker - Executed action Abp.AspNetCore.Mvc.Controllers.AbpUserConfigurationController.GetAll (Abp.AspNetCore) in 2546.4026ms
INFO 2019-02-11 12:41:14,139 [27 ] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'Abp.AspNetCore.Mvc.Controllers.AbpUserConfigurationController.GetAll (Abp.AspNetCore)'
INFO 2019-02-11 12:41:14,140 [27 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 2553.2142ms 500 application/json; charset=utf-8
Any ideas what may cause this issue?
Finally, I was able to figure it out : )
Logs didn't help much, though. Except for telling me that it might not be a problem with the application itself (since I couldn't find any messages about errors). Anyway, I learned about logging in Azure and how to analyze it, which is nice.
The fact that there was just one service method failing (and only for host users) got me thinking, though: What if there is something wrong with the data that I'm trying to request!?
And there it was, right in front of me all the time: a referetial integrity issue :D
I deleted the entry that was causing the problem and now everything works fine. I just need to make sure this doesn't happen again.
Closing this now - thank you for trying to help me!
Hi @ismcagdas !
Nope, not at all ...
Anyway, right now it is not that important, because use-cases for host to use file-management are not to be implemented soon. And for tenants everything is working fine.
It's just that, I can't explain what is going on in this service ... why would it work for tenants but not for host users? There is really nothing special in there.
Have a nice weekend @all
This is from App_Data\Logs\Logs.txt
:
INFO 2019-01-25 07:23:39,777 [3 ] ore.Mvc.Internal.ControllerActionInvoker - Executed action CompanyName.ProjectName.Web.Controllers.HomeController.Index (CompanyName.ProjectName.Web.Host) in 7.5609ms
INFO 2019-01-25 07:23:39,777 [3 ] ft.AspNetCore.Routing.EndpointMiddleware - Executed endpoint 'CompanyName.ProjectName.Web.Controllers.HomeController.Index (CompanyName.ProjectName.Web.Host)'
INFO 2019-01-25 07:23:39,777 [3 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 77.0956ms 302
INFO 2019-01-25 07:24:00,718 [6 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 OPTIONS http://projectname.azurewebsites.net/api/services/app/FileManagerBackend/GetAllAsync?Name=
INFO 2019-01-25 07:24:00,718 [6 ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
INFO 2019-01-25 07:24:00,734 [6 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 1.7097ms 204
INFO 2019-01-25 07:24:00,796 [18 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 GET http://projectname.azurewebsites.net/api/services/app/FileManagerBackend/GetAllAsync?Name=
INFO 2019-01-25 07:24:00,796 [18 ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
INFO 2019-01-25 07:24:00,796 [18 ] uthentication.JwtBearer.JwtBearerHandler - Successfully validated the token.
WARN 2019-01-25 07:24:00,796 [18 ] calization.RequestLocalizationMiddleware - AbpUserRequestCultureProvider returned the following unsupported cultures 'null'.
WARN 2019-01-25 07:24:00,796 [18 ] calization.RequestLocalizationMiddleware - AbpUserRequestCultureProvider returned the following unsupported UI Cultures 'null'.
WARN 2019-01-25 07:24:00,796 [18 ] calization.RequestLocalizationMiddleware - AbpDefaultRequestCultureProvider returned the following unsupported cultures 'null'.
WARN 2019-01-25 07:24:00,796 [18 ] calization.RequestLocalizationMiddleware - AbpDefaultRequestCultureProvider returned the following unsupported UI Cultures 'null'.
INFO 2019-01-25 07:24:00,796 [18 ] ft.AspNetCore.Routing.EndpointMiddleware - Executing endpoint 'CompanyName.ProjectName.Backend.FileManagement.FileManagerBackendAppService.GetAllAsync (CompanyName.ProjectName.Application)'
INFO 2019-01-25 07:24:00,812 [18 ] ore.Mvc.Internal.ControllerActionInvoker - Route matched with {area = "app", action = "GetAllAsync", controller = "FileManagerBackend"}. Executing action CompanyName.ProjectName.Backend.FileManagement.FileManagerBackendAppService.GetAllAsync (CompanyName.ProjectName.Application)
INFO 2019-01-25 07:24:00,812 [18 ] pNetCore.Cors.Infrastructure.CorsService - CORS policy execution successful.
INFO 2019-01-25 07:24:00,812 [18 ] ore.Mvc.Internal.ControllerActionInvoker - Executing action method CompanyName.ProjectName.Backend.FileManagement.FileManagerBackendAppService.GetAllAsync (CompanyName.ProjectName.Application) with arguments (CompanyName.ProjectName.Backend.FileManagement.Dto.FileObjectFilterBackendDto) - Validation state: Valid
DEBUG 2019-01-25 07:24:15,015 [1 ] Abp.Modules.AbpModuleManager - Loading Abp modules...
DEBUG 2019-01-25 07:24:15,124 [1 ] Abp.Modules.AbpModuleManager - Found 23 ABP modules in total.
DEBUG 2019-01-25 07:24:15,190 [1 ] Abp.Modules.AbpModuleManager - Loaded module: CompanyName.ProjectName.Web.Startup.ProjectNameWebHostModule, CompanyName.ProjectName.Web.Host, Version=6.5.0.0, Culture=neutral, PublicKeyToken=null