Activities of "TonyH"

  • ABP Framework version: Latest
  • UI type: Blazor
  • DB provider: EF Core
  • Steps to reproduce the issue: See below

Running Visual Studio 2019 Preview Developer Command Prompt as Administrator.

Trying to download the Lepton theme source code using the CLI, I get this error:


** Visual Studio 2019 Developer Command Prompt v16.10.0-pre.2.0 ** Copyright (c) 2021 Microsoft Corporation


C:\Windows\System32>cd \

C:>cd leptontheme

C:\LeptonTheme>abp login XXXXX -p XXXXX [11:27:28 INF] ABP CLI (https://abp.io) [11:27:28 INF] Version 4.4.3 (Stable) [11:27:37 INF] Successfully logged in as 'XXXXX'

C:\LeptonTheme>abp get-source Volo.LeptonTheme [11:31:48 INF] ABP CLI (https://abp.io) [11:31:49 INF] Version 4.4.3 (Stable) [11:31:50 INF] Output folder: C:\LeptonTheme [11:31:50 INF] Downloading source code of Volo.LeptonTheme [11:31:50 INF] Version: [11:31:50 INF] Output folder: C:\LeptonTheme Error occured while getting the latest version from https://abp.io/api/download/module/get-version/ : Remote server returns '500-Internal Server Error'. Message: An internal error occurred during your request! [11:31:54 WRN] The remote service is currently unavailable, please specify the version. [11:31:54 WRN] [11:31:54 WRN] Find the following template in your cache directory: [11:31:54 WRN] Template Name Version [11:31:54 WRN] [11:31:54 WRN] Use command: abp new Acme.BookStore -v version

C:\LeptonTheme>

Giving up on the CLI and trying to start ABP Suite (I've never used it before) I get this error:


** Visual Studio 2019 Developer Command Prompt v16.10.0-pre.2.0 ** Copyright (c) 2021 Microsoft Corporation


C:\Windows\System32>cd /

C:>cd leptontheme

C:\LeptonTheme>abp login XXXXX -p XXXXX [13:33:26 INF] ABP CLI (https://abp.io) [13:33:26 INF] Version 4.4.3 (Stable) [13:33:33 INF] Successfully logged in as 'XXXXX'

C:\LeptonTheme>abp suite update [13:33:45 INF] ABP CLI (https://abp.io) [13:33:46 INF] Version 4.4.3 (Stable) [13:33:48 INF] Updating ABP Suite ... Tool 'volo.abp.suite' was reinstalled with the latest stable version (version '4.4.3').

C:\LeptonTheme>abp suite [13:34:26 INF] ABP CLI (https://abp.io) [13:34:26 INF] Version 4.4.3 (Stable) Starting Suite v4.4.3 ... [13:34:35 FTL] Unable to start Kestrel. System.IO.IOException: Failed to bind to address http://localhost:3000. ---> System.AggregateException: One or more errors occurred. (An attempt was made to access a socket in a way forbidden by its access permissions.) (An attempt was made to access a socket in a way forbidden by its access permissions.) ---> System.Net.Sockets.SocketException (10013): An attempt was made to access a socket in a way forbidden by its access permissions. at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName) at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.Bind(EndPoint localEP) at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.<Bind>g__BindSocket|13_0(<>c__DisplayClass13_0& ) at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind() at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TransportManager.BindAsync(EndPoint endPoint, ConnectionDelegate connectionDelegate, EndpointConfig endpointConfig) at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass29_01.<<StartAsync>g__OnBind|0>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context) --- End of inner exception stack trace --- ---> (Inner Exception [#1](https://support.abp.io/QA/Questions/1)) System.Net.Sockets.SocketException (10013): An attempt was made to access a socket in a way forbidden by its access permissions. at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName) at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.Bind(EndPoint localEP) at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.<Bind>g__BindSocket|13_0(<>c__DisplayClass13_0& ) at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind() at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TransportManager.BindAsync(EndPoint endPoint, ConnectionDelegate connectionDelegate, EndpointConfig endpointConfig) at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass29_01.<<StartAsync>g__OnBind|0>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context)<---

--- End of inner exception stack trace --- at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.AddressesStrategy.BindAsync(AddressBindContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IEnumerable1 listenOptions, AddressBindContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication1 application, CancellationToken cancellationToken) [13:34:35 FTL] Volo.Abp.Suite terminated unexpectedly! System.IO.IOException: Failed to bind to address http://localhost:3000. ---> System.AggregateException: One or more errors occurred. (An attempt was made to access a socket in a way forbidden by its access permissions.) (An attempt was made to access a socket in a way forbidden by its access permissions.) ---> System.Net.Sockets.SocketException (10013): An attempt was made to access a socket in a way forbidden by its access permissions. at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName) at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.Bind(EndPoint localEP) at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.<Bind>g__BindSocket|13_0(<>c__DisplayClass13_0& ) at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind() at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TransportManager.BindAsync(EndPoint endPoint, ConnectionDelegate connectionDelegate, EndpointConfig endpointConfig) at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass29_01.<<StartAsync>g__OnBind|0>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context) --- End of inner exception stack trace --- ---> (Inner Exception [#1](https://support.abp.io/QA/Questions/1)) System.Net.Sockets.SocketException (10013): An attempt was made to access a socket in a way forbidden by its access permissions. at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName) at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.Bind(EndPoint localEP) at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.<Bind>g__BindSocket|13_0(<>c__DisplayClass13_0& ) at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind() at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TransportManager.BindAsync(EndPoint endPoint, ConnectionDelegate connectionDelegate, EndpointConfig endpointConfig) at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass29_01.<<StartAsync>g__OnBind|0>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context)<---

--- End of inner exception stack trace --- at Microsoft.AspNetCore.Server.Kestrel.Core.LocalhostListenOptions.BindAsync(AddressBindContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.AddressesStrategy.BindAsync(AddressBindContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IEnumerable1 listenOptions, AddressBindContext context) at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken) at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication1 application, CancellationToken cancellationToken) at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Volo.Abp.Suite.Program.Main(String[] args)

C:\LeptonTheme>

Any suggestions on how to fix these? Because currently I'm dead in the water.

Thanks!

T

Beautiful. CLI appears to be working now:

C:\LeptonTheme>abp get-source Volo.LeptonTheme [16:51:12 INF] ABP CLI (https://abp.io) [16:51:13 INF] Version 4.4.3 (Stable) [16:51:16 INF] Output folder: C:\LeptonTheme [16:51:16 INF] Downloading source code of Volo.LeptonTheme [16:51:16 INF] Version: [16:51:16 INF] Output folder: C:\LeptonTheme [16:51:19 INF] Using cached module: Volo.LeptonTheme, version: 4.4.3 [16:51:22 INF] Check out the documents at https://docs.abp.io/en/commercial/latest/themes/lepton [16:51:28 INF] 'Volo.LeptonTheme' has been successfully downloaded to 'C:\LeptonTheme'

C:\LeptonTheme>

Still no luck kicking up ABP Suite though:

C:\LeptonTheme>abp suite [16:51:56 INF] ABP CLI (https://abp.io) [16:51:56 INF] Version 4.4.3 (Stable) Starting Suite v4.4.3 ... [16:52:03 FTL] Unable to start Kestrel. System.IO.IOException: Failed to bind to address http://localhost:3000. ---> System.AggregateException: One or more errors occurred. (An attempt was made to access a socket in a way forbidden by its access permissions.) (An attempt was made to access a socket in a way forbidden by its access permissions.) ---> System.Net.Sockets.SocketException (10013): An attempt was made to access a socket in a way forbidden by its access permissions. at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName) at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.Bind(EndPoint localEP)

That looks to be something my end (I'm guessing) with the "Unable to start Kestrel". Any ideas on what could be causing that?

I would prefer to use the Suite rather than the CLI moving forward, if possible, so getting this working would be advantageous...

Thanks!

T

Ah, excellent. I was wondering if there was a way to do this.

I ended up running "netstat -aon" to get a list of everything using ports on my machine.

I found an entry that was using Port 3000, and made a note of it's PID.

Using Task Manager, I added the PID column, and found and instance of "Node.js" (server-side Node) using the port in question.

Turns out this was running in the background as part of an application called "Logi Analytics".

I terminated the services related to that application, and was able to get ABP Suite up and running without the Kestrel error.

I'll leave this note here, in case it helps someone else out in the future.

Thanks so much for your help! Although now it looks like I'm going to have a busy weekend :-)

T

I've previously used ASP.NET Zero, where I could modify the authentication code so that the username / password combination was passed to my own external service, which would then authenticate the user against a standalone database used for a separate application.

When the response was returned, ASP.NET Zero was automatically creating the user in it's own database as well.

Is there a way to achieve something similar in ABP.io? Basically, I need to take the username / password that the user enters, and pass those, along with a custom key stored against the tenant, to an external service. That service will return a boolean indicating whether the username / password was a valid combination, along with a key/value list that will need to be stored against the ICurrentUser ... I'm guessing as Claims?

Any help / examples would be appreciated!

T

Indeed, that could be the core of the solution! I will try it in the next day or so, and see if it meets the requirements.

I'm not sure how/where I could create new user Claims in this scenario, though.

Is that something that would happen in GetUserInfoAsync?

Okay, partway there with this. I'm just stuck on where to put this code:

Configure<AbpIdentityAspNetCoreOptions>(options => { options.ExternalLoginProviders.Add<FakeExternalLoginProvider>(FakeExternalLoginProvider.Name); });

I'm on current build, Blazor, minimal .NET 6.

I thought it might have to go into the module class, in the "ConfigureExternalProviders" method ... but I can't seem to get the syntax correct.

Can you please assist?

Great, thanks.

Read a little further down, and someone had corrected the registration code so that it used "AbpIdentityOptions", rather than "AbpIdentityAspNetCoreOptions":

Configure<AbpIdentityOptions>(options => { options.ExternalLoginProviders.Add<FakeExternalLoginProvider>(FakeExternalLoginProvider.Name); });

Actually got it working in the Blazor app ... I'm building for server-side Blazor, not WASM. That said, yes, it probably needs implementing in the API project as well.

That's half the problem solved ... now to tackle the Claims component ... :-)

I have a ToolbarItem that has a text string bound to an extension method attached to my CurrentUser. It only updates if I specifically call StateHasChanged from within the component itself, eg. by adding a click event:

@inject ICurrentUser _currentUser; <div class="btn"> <i class="far fa-chart-pie" @onclick="ShowNotifications">@_currentUser.CurrentDivision()</i> </div> @code { private async Task ShowNotifications() { await Message.Info("TODO: Switch Divisions"); StateHasChanged(); }

Changing the value of CurrentDivision outside of the component doesn't trigger a refresh.

There is only one point in the application where this value changes, when a user selects a value from a dropdown list. I tried getting a reference to the component, with the view that I would add a "Refresh" method to it that would call StateHasChanged ... but I can't cast the object:

var toolbar = _toolbarManager.GetAsync("Main"); var item = toolbar.Result.Items[0]; ToolbarNotificationDivision notification = item as ToolbarNotificationDivision; // this won't compile

Is there another way I can force a StateHasChanged on the main toolbar component? Or, preferably, call a custom method (eg. "Refresh") on a toolbar component?

Thanks!

T

PERFECT!

Not only is this exactly what I needed to achieve, your explanation and code samples are some of the best explanations I've seen so far. Nothing assumed, nothing left out.

Might be worth adding this sample to your official documentation?

Thanks!

T

Hi Team,

I've recently upgraded my solution from 5.2 to 7.0.3.

I've checked the code into source control, and my remote VS Build Agent is attempting to build.

It keeps crashing out, with a couple of hundred errors. It appears to be failing on file copies ... the sample below shows a failure, then 3 successes, then another failure:

C:\agent\TestVx\_work\_tool\dotnet\sdk\7.0.202\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(593,5): warning MSB3026: Could not copy "C:\Windows\ServiceProfiles\NetworkService\.nuget\packages\volo.abp.aspnetcore.components.web.leptonxtheme\2.0.5\staticwebassets\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker.standalone.css" to "C:\agent\TestVx\_work\2\s\GUI\BlazorServer\src\TestCompany.TestApplication.BlazorServer.Blazor\obj\Debug\net7.0\PubTmp\Out\wwwroot\_content\Volo.Abp.AspNetCore.Components.Web.LeptonXTheme\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker.standalone.css". Beginning retry 2 in 1000ms. Could not find a part of the path 'C:\agent\TestVx\_work\2\s\GUI\BlazorServer\src\TestCompany.TestApplication.BlazorServer.Blazor\obj\Debug\net7.0\PubTmp\Out\wwwroot\_content\Volo.Abp.AspNetCore.Components.Web.LeptonXTheme\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker.standalone.css'.  [C:\agent\TestVx\_work\2\s\GUI\BlazorServer\src\TestCompany.TestApplication.BlazorServer.Blazor\TestCompany.TestApplication.BlazorServer.Blazor.csproj]

  Copying file from "C:\Windows\ServiceProfiles\NetworkService\.nuget\packages\volo.abp.aspnetcore.components.web.leptonxtheme\2.0.5\staticwebassets\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker3.standalone.css" to "C:\agent\TestVx\_work\2\s\GUI\BlazorServer\src\TestCompany.TestApplication.BlazorServer.Blazor\obj\Debug\net7.0\PubTmp\Out\wwwroot\_content\Volo.Abp.AspNetCore.Components.Web.LeptonXTheme\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker3.standalone.css".

  Copying file from "C:\Windows\ServiceProfiles\NetworkService\.nuget\packages\volo.abp.aspnetcore.components.web.leptonxtheme\2.0.5\staticwebassets\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker.standalone.min.css" to "C:\agent\TestVx\_work\2\s\GUI\BlazorServer\src\TestCompany.TestApplication.BlazorServer.Blazor\obj\Debug\net7.0\PubTmp\Out\wwwroot\_content\Volo.Abp.AspNetCore.Components.Web.LeptonXTheme\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker.standalone.min.css".

  Copying file from "C:\Windows\ServiceProfiles\NetworkService\.nuget\packages\volo.abp.aspnetcore.components.web.leptonxtheme\2.0.5\staticwebassets\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker.standalone.css.map" to "C:\agent\TestVx\_work\2\s\GUI\BlazorServer\src\TestCompany.TestApplication.BlazorServer.Blazor\obj\Debug\net7.0\PubTmp\Out\wwwroot\_content\Volo.Abp.AspNetCore.Components.Web.LeptonXTheme\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker.standalone.css.map".

##[warning]C:\agent\TestVx\_work\_tool\dotnet\sdk\7.0.202\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(593,5): Warning MSB3026: Could not copy "C:\Windows\ServiceProfiles\NetworkService\.nuget\packages\volo.abp.aspnetcore.components.web.leptonxtheme\2.0.5\staticwebassets\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker.standalone.min.css" to "C:\agent\TestVx\_work\2\s\GUI\BlazorServer\src\TestCompany.TestApplication.BlazorServer.Blazor\obj\Debug\net7.0\PubTmp\Out\wwwroot\_content\Volo.Abp.AspNetCore.Components.Web.LeptonXTheme\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker.standalone.min.css". Beginning retry 2 in 1000ms. Could not find a part of the path 'C:\agent\TestVx\_work\2\s\GUI\BlazorServer\src\TestCompany.TestApplication.BlazorServer.Blazor\obj\Debug\net7.0\PubTmp\Out\wwwroot\_content\Volo.Abp.AspNetCore.Components.Web.LeptonXTheme\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker.standalone.min.css'. 

The filename changes each time, but the error is the same: can't copy it, can't find part of a path, and with eventual "exceeded retry count". A quick scan seems to indicate that they're all related to leptonxtheme.

I've tried rebooting the build server, in case there are file locks etc ... but that hasn't helped.

Any idea what might be causing this, and how I might fix it?

Thanks!

T

Showing 1 to 10 of 21 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11