Activities of "coskunkula"

Answer

Thank you very much. yes I did as you said and it worked

Question
  • ABP Framework version: v8.0.0
  • UI Type: Angular / MVC / Blazor WASM / Blazor Server
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..) / MongoDB
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

Hello, I am creating a project using ABP Suite. I choose Lepton theme as the theme. After the project is created, when I add the Lepton theme to the project from the modules tab, the project is full of errors in Visual Studio. The resulting error messages are as follows: "Projects that use central package version management should not define the version on the PackageReference items but on the PackageVersion items: PackageId." It doesn't matter MVC or Blazor, the result is still the same.

I could not find an expression to correct the error I received when I wanted to update via ABP suite on the document you specified.

  • ABP Framework version: v7.4.2
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

Hello there, I want to update my application that I developed via abp suite from 7.4.2 to 7.4.3. I ran abp cli update and abp suite update codes successfully. but then when I click Update all ABP packages, I get the error "An internal error occurred during your request!". when I look at the log record, I see the following lines.

2023-12-13 10:14:33.064 +03:00 [ERR] One or more errors occurred. (StartIndex cannot be less than zero. (Parameter 'startIndex')) (StartIndex cannot be less than zero. (Parameter 'startIndex')) System.AggregateException: One or more errors occurred. (StartIndex cannot be less than zero. (Parameter 'startIndex')) (StartIndex cannot be less than zero. (Parameter 'startIndex')) ---> System.ArgumentOutOfRangeException: StartIndex cannot be less than zero. (Parameter 'startIndex') at System.String.ThrowSubstringArgumentOutOfRange(Int32 startIndex, Int32 length) at System.String.Substring(Int32 startIndex, Int32 length) at Volo.Abp.Cli.ProjectModification.NpmPackagesUpdater.ExtractVersions(String output) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\NpmPackagesUpdater.cs:line 357 at Volo.Abp.Cli.ProjectModification.NpmPackagesUpdater.GetPackageVersionList(JProperty package, String workingDirectory) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\NpmPackagesUpdater.cs:line 348 at Volo.Abp.Cli.ProjectModification.NpmPackagesUpdater.GetLatestVersion(JProperty package, Boolean includeReleaseCandidates, Boolean includePreviews, String workingDirectory) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\NpmPackagesUpdater.cs:line 274 at Volo.Abp.Cli.ProjectModification.NpmPackagesUpdater.TryUpdatingPackage(String filePath, JProperty package, Boolean includePreviews, Boolean includeReleaseCandidates, Boolean switchToStable, String specifiedVersion) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\NpmPackagesUpdater.cs:line 238 at Volo.Abp.Cli.ProjectModification.NpmPackagesUpdater.UpdatePackagesInFile(String filePath, Boolean includePreviews, Boolean includeReleaseCandidates, Boolean switchToStable, String specifiedVersion) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\NpmPackagesUpdater.cs:line 179 at Volo.Abp.Cli.ProjectModification.NpmPackagesUpdater.<>c__DisplayClass18_0.<<Update>g__UpdateAsync|0>d.MoveNext() in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\NpmPackagesUpdater.cs:line 83 --- End of inner exception stack trace --- at System.Threading.Tasks.Task.WaitAllCore(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.WaitAll(Task[] tasks) at Volo.Abp.Cli.ProjectModification.NpmPackagesUpdater.Update(String rootDirectory, Boolean includePreviews, Boolean includeReleaseCandidates, Boolean switchToStable, String version) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\NpmPackagesUpdater.cs:line 89 at Volo.Abp.Cli.Commands.UpdateCommand.UpdateNpmPackages(String directory, String version) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\Commands\UpdateCommand.cs:line 55 at Volo.Abp.Cli.Commands.UpdateCommand.ExecuteAsync(CommandLineArgs commandLineArgs) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\Commands\UpdateCommand.cs:line 49 at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Services.SolutionService.UpdatePackagesInSolutionAsync(String solutionPath, Boolean npm, Boolean nuget) at Volo.Abp.Suite.Controllers.AbpSuiteController.UpdatePackagesInSolution(String solutionPath, Boolean npm, Boolean nuget) at lambda_method1991(Closure, Object) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.

I have no idea how to implement this. Could you please give an example?

Now I noticed something. I logged in to the system and opened any page. Then I opened a new page in the side tab. and I continued to perform the operations on that page. Then I logged out of the first tab I opened. but I continued trading in the second tab I opened. So it didn't terminate the session. but when I did f5 I saw that the session was logged out

You are a genius my friend. worked. But there is one more small problem. I don't know if it's because it's Blazor, but if I press f5 it redirects to the logout page. If I don't press f5, I can view the pages without logging out.

app.Use(async (httpContext, func) =>
        {
            var currentUser = httpContext.RequestServices.GetRequiredService<ICurrentUser>();
            if (currentUser.IsAuthenticated)
            {
                var claimToken = currentUser.GetConcurrentLoginToken();
                var userManager = httpContext.RequestServices.GetRequiredService<IdentityUserManager>();
                var user = await userManager.FindByIdAsync(currentUser.Id.ToString());
                if (claimToken != user.GetProperty(ConcurrentLoginConsts.ConcurrentLoginToken).ToString())
                {
                    //Cookies
                    if (httpContext.User.Identity != null && httpContext.User.Identity.AuthenticationType == "Identity.Application")
                    {
                        await httpContext.RequestServices.GetRequiredService<AbpSignInManager>().SignOutAsync();
                        await httpContext.ChallengeAsync("Identity.Application");
                    }

                    //JWT
                    if (httpContext.User.Identity != null && httpContext.User.Identity.AuthenticationType == "AuthenticationTypes.Federation")
                    {
                        await httpContext.ChallengeAsync(JwtBearerDefaults.AuthenticationScheme);
                    }

                    //Other

                    return;
                }
            }

            await func();
    });

//JWT if (httpContext.User.Identity != null && httpContext.User.Identity.AuthenticationType == "AuthenticationTypes.Federation") { await httpContext.ChallengeAsync(JwtBearerDefaults.AuthenticationScheme); }

It falls under the "AuthenticationTypes.Federation" condition but It is not covered by the "Identity.Application" condition. so it doesn't log out

Thank you for your interest. I tried the codes in this example. But I guess it didn't work because my project was layered. AuthServer project won't log out

  • ABP Framework version: v7.4.0
  • UI Type:Blazor Server
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I developed a project with Blazor Tiered version. After a user logs in to the system, I want to terminate the first session when the same user logs in from another browser. how can I do that.

Showing 1 to 10 of 17 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09