Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "banksearch"

below is the code have the problem: it looks like the user is not load correctly by the TargetUserId. we have not change the security code for user login and switch to link user, do you know what is the problem?

HI @maliming we use memory caching, and we have try to clear teh cache, but still have the problem.

we try to debug the project in local machine, and add break point to the GetSwitchedUserAndIdentity method, it is working when debug it, the user can load without any problem, but when we deploy the code to Azure, the problem happen.

PS: we target to the same azure db when we debug in local.

HI @maliming We have version 5.1 https://docs.aspnetzero.com/documents/common/latest/Change-Logs#v5-1-0-2018-02-05

hi, @maliming how to check my zero version?

to produce the problem

  1. login to tenant website as tenant admin.
  2. right click on the menu in the topright.
  3. select the link from linked users, which refer to the host user.
  4. website try to direct to the host website, and get the error/exception page.

when login to demo tenant, and switch to host website as below: will get error page: below is the error details: System.ArgumentNullException: Value cannot be null. Parameter name: user Module "Microsoft.AspNetCore.Identity.UserClaimsPrincipalFactory1", in CreateAsync Module "System.Runtime.ExceptionServices.ExceptionDispatchInfo", in Throw Module "System.Runtime.CompilerServices.TaskAwaiter", in ThrowForNonSuccess Module "System.Runtime.CompilerServices.TaskAwaiter", in HandleNonSuccessAndDebuggerNotification Module "Abp.Authorization.AbpUserClaimsPrincipalFactory2", in CreateAsync Module "System.Runtime.ExceptionServices.ExceptionDispatchInfo", in Throw Module "System.Runtime.CompilerServices.TaskAwaiter", in ThrowForNonSuccess Module "System.Runtime.CompilerServices.TaskAwaiter", in HandleNonSuccessAndDebuggerNotification Module "Abp.Threading.InternalAsyncHelper+<AwaitTaskWithPostActionAndFinallyAndGetResult>d__51", in MoveNext Module "System.Runtime.ExceptionServices.ExceptionDispatchInfo", in Throw Module "System.Runtime.CompilerServices.TaskAwaiter", in ThrowForNonSuccess Module "System.Runtime.CompilerServices.TaskAwaiter", in HandleNonSuccessAndDebuggerNotification File "d:\a\1\s\src\GrowMyCompany.Core\Authorization\Users\UserLinkManager.cs", line 123, col 13, in GetSwitchedUserAndIdentity Void MoveNext() Module "System.Runtime.ExceptionServices.ExceptionDispatchInfo", in Throw Module "System.Runtime.CompilerServices.TaskAwaiter", in ThrowForNonSuccess Module "System.Runtime.CompilerServices.TaskAwaiter", in HandleNonSuccessAndDebuggerNotification File "d:\a\1\s\src\GrowMyCompany.Web.Mvc\Controllers\AccountController.cs", line 847, col 13, in SwitchToLinkedAccountSignIn Void MoveNext() Module "System.Runtime.ExceptionServices.ExceptionDispatchInfo", in Throw Module "System.Runtime.CompilerServices.TaskAwaiter", in ThrowForNonSuccess Module "System.Runtime.CompilerServices.TaskAwaiter", in HandleNonSuccessAndDebuggerNotification Module "Abp.Threading.InternalAsyncHelper+<AwaitTaskWithPostActionAndFinallyAndGetResult>d__51", in MoveNext Module "System.Runtime.ExceptionServices.ExceptionDispatchInfo", in Throw Module "System.Runtime.CompilerServices.TaskAwaiter", in ThrowForNonSuccess Module "System.Runtime.CompilerServices.TaskAwaiter", in HandleNonSuccessAndDebuggerNotification Module "(unknown)", in lambda_method Module "Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable+Awaiter", in GetResult Module "Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker", in InvokeActionMethodAsync Module "System.Runtime.ExceptionServices.ExceptionDispatchInfo", in Throw Module "System.Runtime.CompilerServices.TaskAwaiter", in ThrowForNonSuccess Module "System.Runtime.CompilerServices.TaskAwaiter", in HandleNonSuccessAndDebuggerNotification Module "Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker", in InvokeNextActionFilterAsync Module "System.Runtime.ExceptionServices.ExceptionDispatchInfo", in Throw Module "Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker", in Rethrow Module "Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker", in Next Module "Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker", in InvokeInnerFilterAsync Module "System.Runtime.ExceptionServices.ExceptionDispatchInfo", in Throw Module "System.Runtime.CompilerServices.TaskAwaiter", in ThrowForNonSuccess Module "System.Runtime.CompilerServices.TaskAwaiter", in HandleNonSuccessAndDebuggerNotification Module "Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker", in InvokeNextExceptionFilterAsync Module "System.Runtime.ExceptionServices.ExceptionDispatchInfo", in Throw Module "Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker", in Rethrow Module "Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker", in Next Module "Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker", in InvokeNextResourceFilter Module "System.Runtime.ExceptionServices.ExceptionDispatchInfo", in Throw Module "Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker", in Rethrow Module "Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker", in Next Module "Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker", in InvokeFilterPipelineAsync Module "System.Runtime.ExceptionServices.ExceptionDispatchInfo", in Throw Module "System.Runtime.CompilerServices.TaskAwaiter", in ThrowForNonSuccess Module "System.Runtime.CompilerServices.TaskAwaiter", in HandleNonSuccessAndDebuggerNotification Module "Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker", in InvokeAsync Module "System.Runtime.ExceptionServices.ExceptionDispatchInfo", in Throw Module "System.Runtime.CompilerServices.TaskAwaiter", in ThrowForNonSuccess Module "System.Runtime.CompilerServices.TaskAwaiter", in HandleNonSuccessAndDebuggerNotification Module "Microsoft.AspNetCore.Builder.RouterMiddleware", in Invoke Module "System.Runtime.ExceptionServices.ExceptionDispatchInfo", in Throw Module "System.Runtime.CompilerServices.TaskAwaiter", in ThrowForNonSuccess Module "System.Runtime.CompilerServices.TaskAwaiter", in HandleNonSuccessAndDebuggerNotification Module "Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware", in Invoke Module "System.Runtime.ExceptionServices.ExceptionDispatchInfo", in Throw Module "System.Runtime.CompilerServices.TaskAwaiter", in ThrowForNonSuccess Module "System.Runtime.CompilerServices.TaskAwaiter", in HandleNonSuccessAndDebuggerNotification Module "IdentityServer4.Hosting.IdentityServerMiddleware", in Invoke Module "System.Runtime.ExceptionServices.ExceptionDispatchInfo", in Throw Module "System.Runtime.CompilerServices.TaskAwaiter", in ThrowForNonSuccess Module "System.Runtime.CompilerServices.TaskAwaiter", in HandleNonSuccessAndDebuggerNotification Module "Microsoft.AspNetCore.Authentication.AuthenticationMiddleware", in Invoke Module "System.Runtime.ExceptionServices.ExceptionDispatchInfo", in Throw Module "System.Runtime.CompilerServices.TaskAwaiter", in ThrowForNonSuccess Module "System.Runtime.CompilerServices.TaskAwaiter", in HandleNonSuccessAndDebuggerNotification Module "Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware", in Invoke Module "System.Runtime.ExceptionServices.ExceptionDispatchInfo", in Throw Module "System.Runtime.CompilerServices.TaskAwaiter", in ThrowForNonSuccess Module "System.Runtime.CompilerServices.TaskAwaiter", in HandleNonSuccessAndDebuggerNotification Module "IdentityServer4.Hosting.BaseUrlMiddleware", in Invoke Module "System.Runtime.ExceptionServices.ExceptionDispatchInfo", in Throw Module "System.Runtime.CompilerServices.TaskAwaiter", in ThrowForNonSuccess Module "System.Runtime.CompilerServices.TaskAwaiter", in HandleNonSuccessAndDebuggerNotification Module "Abp.AspNetZeroCore.Web.Authentication.JwtBearer.JwtTokenMiddleware+<>c__DisplayClass0_0+<<UseJwtTokenMiddleware>b__0>d", in MoveNext Module "System.Runtime.ExceptionServices.ExceptionDispatchInfo", in Throw Module "System.Runtime.CompilerServices.TaskAwaiter", in ThrowForNonSuccess Module "System.Runtime.CompilerServices.TaskAwaiter", in HandleNonSuccessAndDebuggerNotification Module "Abp.AspNetZeroCore.Web.Authentication.JwtBearer.JwtTokenMiddleware+<>c__DisplayClass0_0+<<UseJwtTokenMiddleware>b__0>d", in MoveNext Module "System.Runtime.ExceptionServices.ExceptionDispatchInfo", in Throw Module "System.Runtime.CompilerServices.TaskAwaiter", in ThrowForNonSuccess Module "System.Runtime.CompilerServices.TaskAwaiter", in HandleNonSuccessAndDebuggerNotification Module "Microsoft.AspNetCore.Authentication.AuthenticationMiddleware", in Invoke Module "System.Runtime.ExceptionServices.ExceptionDispatchInfo", in Throw Module "System.Runtime.CompilerServices.TaskAwaiter", in ThrowForNonSuccess Module "System.Runtime.CompilerServices.TaskAwaiter", in HandleNonSuccessAndDebuggerNotification Module "Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware", in Invoke

we have not change the security code for user login and switch to link user, do you know what is the problem?

we use the ASP Zero to devlop our web applications(ASP core MVC + Jquery).

in the website project, there are many js file and css files in the MVC website project, like folder below: ..\wwwroot\view-resources\Areas\App\Views\Tenants

when we edit the js and css files and deploy to Azure, we need to ask the user to clear their caches from browser and reload the website to get the changes of JS or CSS file.

is there a way to force the client user to load the changed js or css file automatically?

we checked from stackoverflow, and there are many different way to force user udpate the js file, like add version number to the end of js path: <link rel="stylesheet" href="foo.css?v=1.1"> but there are many js and css files in the project, we do not want to update all the js file once the version change, just want to update the js file changed.

we don't want the js files to download EVERY time a user visits the page, only when one JS file is changed, and then, only the changed file is downloaded.

another way I found:

In ASP.NET Core (MVC 6) this works out of the box via the asp-append-version tag helper: <script src="scripts/myjavascript.js" asp-append-version="true"></script> <link href="styles/mystyle.css rel="stylesheet" asp-append-version="true" /> https://stackoverflow.com/questions/2185872/force-browsers-to-get-latest-js-and-css-files-in-asp-net-application https://stackoverflow.com/questions/33342643/how-does-javascript-version-asp-append-version-work-in-asp-net-core-mvc can we use this way in our ASPZERO web app?

is there a better solution?

Many thanks.

Hi @ismcagdas,

Do you have any suggestions? We are using v5.1.0

Thanks

bump

@ismcagdas, this is for jQuery version

Showing 1 to 10 of 17 entries