Base solution for your next web application

Activities of "kasem"

Question

Prerequisites

  • What is your product version? 9.1
  • What is your product type (Angular or MVC)? Angular
  • What is product framework type (.net framework or .net core)? .net core

Hi,

I need your help to make the User a global entity (tenant unrelated). I still need multi-tenancy supported, but not for user (Users table). User needs to be without TenantId or at least disable user tenantId data filter (IMayHaveTenant) but also make username and email globally unique across tenants. Permissions should continue working tenant based and since you have TenantId in AbpRoles and AbpPermission I assume it should work with the desired change.

To better describe the problem, I need the same user/account (record) to exist in multiple tenants with different roles (not through linked accounts, but through AbpUserRoles). For example:

| UserId | TenantId | RoleId | | --- | --- | --- | | 1 | 1 | 1 | | 1 | 2 | 2 | | 1 | 2 | 3 |

I don't want the authentication to be affected by the current user tenant, selected through login, but rather make it a global authentication.

One of the solutions I thought about is having all users signin and signup in the Default tenant (statically set this) no matter in what tenant your session exists and also remove MayHaveTenant from User. Please let me know if this is applicable and how I can achieve the needed.

Thank you

  • What is your product version? v9.1.0-rc.1
  • What is your product type (Angular or MVC)? Angular
  • What is product framework type (.net framework or .net core)? .net core

I overrided CreateAsync to add a custom claim to user principal identity through UserClaimsPrincipalFactory and it works fine. I'm looking to modify this custom claim without relogin. I tried ReplaceClaimAsync method in UserManager and even called "await _signInManager.RefreshSignInAsync(user)" after updating claim but it didn't work. The claim modification is persisted in database but user session isn't affected until user relogin.

Although I use the latest version of your RAD tool 2.6.0, I have several issues with the generated angular code. it uses metronic 6 not 7. Also date picker doesn't work and there are other problems due to incompatibility with your latest version

Hi

Enabling entity history tracking isn't possible due to this:

Please note that I already followed your instructions to enable entity history uncommenting the lines in ..EntityFrameworkCoreModule and changed this as well "Configuration.EntityHistory.IsEnabled = true;"

I use your latest version of ASPNetCore+Angular (v9.1.0-rc.1)

Question

Hi

I got the following error after updating a specific npm package in angular. I tried reverting my update back. I also cleaned both yarn and npm caches and reinstall node_modules but that didn't help.

0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli 'C:\\Program Files\\nodejs\\node.exe', 1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', 1 verbose cli 'start' 1 verbose cli ] 2 info using [email protected] 3 info using [email protected] 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle [email protected]~prestart: [email protected] 6 info lifecycle [email protected]~start: [email protected] 7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true 8 verbose lifecycle [email protected]~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;c:\Code\MyApp\Angular\node_modules\.bin;C:\Program Files\ConEmu\ConEmu\Scripts;C:\Program Files\ConEmu;C:\Program Files\ConEmu\ConEmu;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\nodejs\;C:\Program Files (x86)\Yarn\bin\;C:\Program Files\Git\cmd;C:\Program Files (x86)\dotnet\;C:\Program Files\PuTTY\;C:\Users\AppData\Local\Microsoft\WindowsApps;;C:\Users\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\AppData\Roaming\npm;C:\Users\AppData\Local\Yarn\bin;C:\Users\.dotnet\tools 9 verbose lifecycle [email protected]~start: CWD: c:\Code\MyApp\Angular 10 silly lifecycle [email protected]~start: Args: [ '/d /s /c', 'gulp buildDev && ng serve --host 0.0.0.0 --port 4200' ] 11 silly lifecycle [email protected]~start: Returned: code: 1 signal: null 12 info lifecycle [email protected]~start: Failed to exec start script 13 verbose stack Error: [email protected] start: gulp buildDev && ng serve --host 0.0.0.0 --port 420013 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:321:20) 13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:321:20) 13 verbose stack at maybeClose (internal/child_process.js:1021:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) 14 verbose pkgid [email protected] 15 verbose cwd c:\Code\MyApp\Angular 16 verbose Windows_NT 10.0.18363 17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start" 18 verbose node v12.16.0 19 verbose npm v6.13.4 20 error code ELIFECYCLE 21 error errno 1 22 error [email protected] start:gulp buildDev && ng serve --host 0.0.0.0 --port 420022 error Exit status 1 23 error Failed at the [email protected] start script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

Hi

Connection to signalR fails with the following exception

URL: //localhost:22742/signalr-chat/negotiate?enc_auth_token=undefined&negotiateVersion=1

System.FormatException: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters. at System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength) at System.Convert.FromBase64String(String s) at Abp.Runtime.Security.SimpleStringCipher.Decrypt(String cipherText, String passPhrase, Byte[] salt, Nullable1 keySize, Byte[] initVectorBytes) at MyApp.Web.Startup.AuthConfigurer.SetToken(MessageReceivedContext context, Boolean allowAnonymous) in C:\Secure\Code\MyApp\Aspnet-core\src\MyApp.Web.Host\Startup\AuthConfigurer.cs:line 126 at MyApp.Web.Startup.AuthConfigurer.QueryStringTokenResolver(MessageReceivedContext context) in C:\Secure\Code\MyApp\Aspnet-core\src\MyApp.Web.Host\Startup\AuthConfigurer.cs:line 90 at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerEvents.MessageReceived(MessageReceivedContext context) at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync() at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync() at Microsoft.AspNetCore.Authentication.AuthenticationHandler1.AuthenticateAsync() at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme) at Abp.AspNetZeroCore.Web.Authentication.JwtBearer.JwtTokenMiddleware.<>c__DisplayClass0_0.<<UseJwtTokenMiddleware>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

Hi

I need to localize static role names (display name) in the language I'm using in HOST when I create the tenant. Should I override _roleManager.CreateStaticRoles method to do that? Is there other option to achieve this?

Thanks

Hi

New roles are applied to new created tenants only. Do you have an option to create a new role for existing tenants as well? I sometimes have migrations that not only envolve schema updates but also data (Seed data for all tenants) and I'm not sure if you have guidelines that help managing this

Thanks

Hi

App in dev mode keeps failing with the following thrown exception:

IDX10223: Lifetime validation failed. The token is expired. ValidTo: '[PII is hidden]', Current time: '[PII is hidden]'.

Hi

System can't run in production. I'm getting the following error after your recent upgrade to In-Process mode:

HTTP Error 500.30 - ANCM In-Process Start Failure

Logs are written empty on Logs folder.

It's really urgent to fix this soon! thanks

Showing 1 to 10 of 25 entries