Angular 2, asp.net core
Hi,
If I try to access the application with an other tenant as the host tenant I got an error: Request URL: <a class="postlink" href="http://localhost:22742/AbpUserConfiguration/GetAll">http://localhost:22742/AbpUserConfiguration/GetAll</a> Internal Server Error
The tenant names I used is LIGNA-PARTS or LIGNA-WEB.
For a test I created a new tenant TEST-TENANT and with this tenant I can access the application without getting an error
Is there a problem with the tenant name ? But in earlier version I used the same tenant name and it works.
the logs
DEBUG 2017-05-04 10:45:46,100 [175 ] ore.Mvc.Internal.ControllerActionInvoker - Request was short circuited at exception filter 'Abp.AspNetCore.Mvc.ExceptionHandling.AbpExceptionFilter'. DEBUG 2017-05-04 10:45:46,100 [175 ] etCore.Mvc.Internal.ObjectResultExecutor - No information found on request to perform content negotiation. DEBUG 2017-05-04 10:45:46,100 [175 ] etCore.Mvc.Internal.ObjectResultExecutor - Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.JsonOutputFormatter' and content type 'application/json' to write the response. INFO 2017-05-04 10:45:46,100 [175 ] etCore.Mvc.Internal.ObjectResultExecutor - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. INFO 2017-05-04 10:45:46,100 [175 ] ore.Mvc.Internal.ControllerActionInvoker - Executed action Abp.AspNetCore.Mvc.Controllers.AbpUserConfigurationController.GetAll (Abp.AspNetCore) in 34.1534ms DEBUG 2017-05-04 10:45:46,100 [175 ] Microsoft.AspNetCore.Server.Kestrel - Connection id "0HL4IOAJGKCQI" completed keep alive response. INFO 2017-05-04 10:45:46,100 [175 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 43.8301ms 500 application/json; charset=utf-8 INFO 2017-05-04 10:45:48,218 [175 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 OPTIONS <a class="postlink" href="http://localhost:22742/AbpUserConfiguration/GetAll">http://localhost:22742/AbpUserConfiguration/GetAll</a> 0 DEBUG 2017-05-04 10:45:48,218 [175 ] Microsoft.AspNetCore.Server.Kestrel - Connection id "0HL4IOAJGKCQH" completed keep alive response. INFO 2017-05-04 10:45:48,218 [175 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 0.2333ms 204 INFO 2017-05-04 10:45:48,221 [189 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 GET <a class="postlink" href="http://localhost:22742/AbpUserConfiguration/GetAll">http://localhost:22742/AbpUserConfiguration/GetAll</a> application/json INFO 2017-05-04 10:45:48,221 [189 ] entication.JwtBearer.JwtBearerMiddleware - Successfully validated the token. INFO 2017-05-04 10:45:48,221 [189 ] entication.JwtBearer.JwtBearerMiddleware - HttpContext.User merged via AutomaticAuthentication from authenticationScheme: Bearer. DEBUG 2017-05-04 10:45:48,221 [189 ] NetCore.StaticFiles.StaticFileMiddleware - The request path /AbpUserConfiguration/GetAll does not match a supported file type DEBUG 2017-05-04 10:45:48,221 [189 ] Microsoft.AspNetCore.Routing.RouteBase - Request successfully matched the route with name 'defaultWithArea' and template '{area}/{controller=Home}/{action=Index}/{id?}'. DEBUG 2017-05-04 10:45:48,221 [189 ] .AspNetCore.Mvc.Internal.MvcRouteHandler - No actions matched the current request DEBUG 2017-05-04 10:45:48,221 [189 ] Microsoft.AspNetCore.Routing.RouteBase - Request successfully matched the route with name 'default' and template '{controller=Home}/{action=Index}/{id?}'. DEBUG 2017-05-04 10:45:48,225 [189 ] ore.Mvc.Internal.ControllerActionInvoker - Executing action Abp.AspNetCore.Mvc.Controllers.AbpUserConfigurationController.GetAll (Abp.AspNetCore) INFO 2017-05-04 10:45:48,235 [189 ] ore.Mvc.Internal.ControllerActionInvoker - Executing action method Abp.AspNetCore.Mvc.Controllers.AbpUserConfigurationController.GetAll (Abp.AspNetCore) with arguments ((null)) - ModelState is Valid ERROR 2017-05-04 10:45:48,257 [177 ] Mvc.ExceptionHandling.AbpExceptionFilter - An item with the same key has already been added. System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary
2.Insert(TKey key, TValue value, Boolean add) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable
1 source, Func2 keySelector, Func
2 elementSelector, IEqualityComparer1 comparer) at Abp.Localization.MultiTenantLocalizationDictionary.GetAllValuesFromDatabase(Nullable
1 tenantId) at Castle.Proxies.Invocations.MultiTenantLocalizationDictionary_GetAllValuesFromDatabase.InvokeMethodOnTarget() at Castle.DynamicProxy.AbstractInvocation.Proceed() at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformSyncUow(IInvocation invocation, UnitOfWorkOptions options) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.MultiTenantLocalizationDictionaryProxy.GetAllValuesFromDatabase(Nullable1 tenantId) at Abp.Runtime.Caching.CacheExtensions.<>c__DisplayClass3_0
2.<Get>b__0(String k) at Abp.Runtime.Caching.CacheBase.Get(String key, Func2 factory) at Abp.Runtime.Caching.CacheExtensions.Get[TKey,TValue](ICache cache, TKey key, Func
2 factory) at Abp.Localization.MultiTenantLocalizationDictionary.GetAllStrings(Nullable1 tenantId) at Castle.Proxies.MultiTenantLocalizationDictionaryProxy.GetAllStrings_callback() at Castle.Proxies.Invocations.ILocalizationDictionary_GetAllStrings.InvokeMethodOnTarget() at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.MultiTenantLocalizationDictionaryProxy.GetAllStrings() at Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource.GetAllStrings(CultureInfo culture, Boolean includeDefaults) at Abp.Web.Configuration.AbpUserConfigurationBuilder.GetUserLocalizationConfig() at Abp.Web.Configuration.AbpUserConfigurationBuilder.<GetAll>d__13.MoveNext() --- 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.AspNetCore.Mvc.Controllers.AbpUserConfigurationController.<GetAll>d__2.MoveNext() --- 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 Microsoft.AspNetCore.Mvc.Internal.ObjectMethodExecutor.<CastToObject>d__40
1.MoveNext() --- 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 Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeActionMethodAsync>d__27.MoveNext() --- 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 Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextActionFilterAsync>d__25.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextExceptionFilterAsync>d__24.MoveNext() DEBUG 2017-05-04 10:45:48,257 [177 ] ore.Mvc.Internal.ControllerActionInvoker - Request was short circuited at exception filter 'Abp.AspNetCore.Mvc.ExceptionHandling.AbpExceptionFilter'. DEBUG 2017-05-04 10:45:48,257 [177 ] etCore.Mvc.Internal.ObjectResultExecutor - No information found on request to perform content negotiation. DEBUG 2017-05-04 10:45:48,257 [177 ] etCore.Mvc.Internal.ObjectResultExecutor - Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.JsonOutputFormatter' and content type 'application/json' to write the response. INFO 2017-05-04 10:45:48,257 [177 ] etCore.Mvc.Internal.ObjectResultExecutor - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext. INFO 2017-05-04 10:45:48,257 [177 ] ore.Mvc.Internal.ControllerActionInvoker - Executed action Abp.AspNetCore.Mvc.Controllers.AbpUserConfigurationController.GetAll (Abp.AspNetCore) in 33.812ms DEBUG 2017-05-04 10:45:48,257 [177 ] Microsoft.AspNetCore.Server.Kestrel - Connection id "0HL4IOAJGKCQI" completed keep alive response. INFO 2017-05-04 10:45:48,257 [177 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 38.9717ms 500 application/json; charset=utf-8 DEBUG 2017-05-04 10:47:49,126 [166 ] Microsoft.AspNetCore.Server.Kestrel - Connection id "0HL4IOAJGKCQH" disconnecting. DEBUG 2017-05-04 10:47:49,126 [libuv] Microsoft.AspNetCore.Server.Kestrel - Connection id "0HL4IOAJGKCQH" sending FIN. DEBUG 2017-05-04 10:47:49,126 [libuv] Microsoft.AspNetCore.Server.Kestrel - Connection id "0HL4IOAJGKCQH" sent FIN with status "0". DEBUG 2017-05-04 10:47:49,127 [libuv] Microsoft.AspNetCore.Server.Kestrel - Connection id "0HL4IOAJGKCQH" stopped. DEBUG 2017-05-04 10:47:49,204 [178 ] Microsoft.AspNetCore.Server.Kestrel - Connection id "0HL4IOAJGKCQI" disconnecting. DEBUG 2017-05-04 10:47:49,204 [libuv] Microsoft.AspNetCore.Server.Kestrel - Connection id "0HL4IOAJGKCQI" sending FIN. DEBUG 2017-05-04 10:47:49,204 [libuv] Microsoft.AspNetCore.Server.Kestrel - Connection id "0HL4IOAJGKCQI" sent FIN with status "0". DEBUG 2017-05-04 10:47:49,205 [libuv] Microsoft.AspNetCore.Server.Kestrel - Connection id "0HL4IOAJGKCQI" stopped.
I found this error:
Error mapping types.
Mapping types: Permission -> FlatPermissionWithLevelDto Abp.Authorization.Permission -> LignaSystems.PM.Authorization.Permissions.Dto.FlatPermissionWithLevelDto
Type Map configuration: Permission -> FlatPermissionWithLevelDto Abp.Authorization.Permission -> LignaSystems.PM.Authorization.Permissions.Dto.FlatPermissionWithLevelDto
Property: DisplayName
2 Answer(s)
-
0
Hi,
I think it is not related to tenancy name. Can you check AbpLanguages table to see if there are more than one record for same tenant and same language ?
-
0
Yes, it was related to a record inside the language table !
Thanks !! :)