dotnet run --urls "https://192.168.1.134:8080;http://192.168.1.134:9090"
Building...
[16:25:14 INF] Acquiring MainDom.
[16:25:14 INF] Acquired MainDom.
[16:25:20 WRN] The ASP.NET Core developer certificate is not trusted. For information about trusting the ASP.NET Core developer certificate, see https://aka.ms/aspnet/https-trust-dev-cert.
[16:25:20 ERR] BackgroundService failed
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Umbraco.Cms.Infrastructure.HostedServices.BackgroundTaskQueue.DequeueAsync(CancellationToken cancellationToken)
at Umbraco.Cms.Infrastructure.HostedServices.QueuedHostedService.BackgroundProcessing(CancellationToken stoppingToken)
at Umbraco.Cms.Infrastructure.HostedServices.QueuedHostedService.ExecuteAsync(CancellationToken stoppingToken)
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
[16:25:20 FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Umbraco.Cms.Infrastructure.HostedServices.BackgroundTaskQueue.DequeueAsync(CancellationToken cancellationToken)
at Umbraco.Cms.Infrastructure.HostedServices.QueuedHostedService.BackgroundProcessing(CancellationToken stoppingToken)
at Umbraco.Cms.Infrastructure.HostedServices.QueuedHostedService.ExecuteAsync(CancellationToken stoppingToken)
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
[16:25:20 INF] Stopping (environment)
[16:25:20 ERR] Error while running callback
System.ObjectDisposedException: Safe handle has been closed.
Object name: 'SafeHandle'.
at System.Runtime.InteropServices.SafeHandle.DangerousAddRef(Boolean& success)
at System.Threading.WaitHandle.WaitOneNoCheck(Int32 millisecondsTimeout)
at Umbraco.Cms.Infrastructure.Sync.DatabaseServerMessenger.<InitializeWithMainDom>b__37_0()
at Umbraco.Cms.Core.Runtime.MainDom.OnSignal(String source)
[16:25:20 INF] Released (environment)
Unhandled exception.[16:25:20 ERR] Unhandled exception in AppDomain (terminating).
System.Net.Sockets.SocketException (49): Can't assign requested address
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.SocketTransportOptions.CreateDefaultBoundListenSocket(EndPoint endpoint)
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, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass30_0`1.<<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, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.AddressesStrategy.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IEnumerable`1 listenOptions, AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
at MicrosoSystem.Net.Sockets.SocketException (49): Can't assign requested address
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.SocketTransportOptions.CreateDefaultBoundListenSocket(EndPoint endpoint)
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, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass30_0`1.<<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, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.AddressesStrategy.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IEnumerable`1 listenOptions, AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 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 Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
at UmbracoSQLite_11.Program.Main(String[] args) in /Users/wpplumber/Workspace/umb-sqlite/Program.cs:line 6
ft.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 Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
at UmbracoSQLite_11.Program.Main(String[] args) in /Users/wpplumber/Workspace/umb-sqlite/Program.cs:line 6
This error indicates that there is an issue with binding to one of the specified IP addresses and there are also some problems with the certificate. Here are some steps you can take to resolve these errors:
Step 1: Check IP Address
Ensure that the IP address is correctly assigned and that your device can use this IP address. Verify your network connection and IP address configuration before rerunning the command if 192.168.1.134 is assigned to your device.
Step 2: Check Ports
Make sure that no other applications are using the same ports concurrently. Check that ports 8080 and 9090 are not in use by another application. You can check port availability by running the following command in the terminal:
sh
netstat -an | find "8080"
This will check if port 8080 is open. Similarly, check for port 9090.
Step 3: Trust HTTPS Certificate
To ensure that the ASP.NET Core developer certificate is trusted, run the following command:
sh
dotnet dev-certs https --trust
This command will make the developer certificate trusted.
Step 4: Update Kestrel Configuration
Ensure that your Kestrel configuration is correctly set up. Check your Program.cs or Startup.cs file for proper Kestrel settings:
csharp
webBuilder.ConfigureKestrel(serverOptions =>
{
serverOptions.Listen(IPAddress.Parse("192.168.1.134"), 8080);
serverOptions.Listen(IPAddress.Parse("192.168.1.134"), 9090);
});
Step 5: Update .NET SDK and Runtime
Ensure that your .NET SDK and Runtime are up to date. Check for updates by running:
sh
dotnet --version
If your version is not up to date, update your .NET SDK and Runtime.
Step 6: Reinstall Developer Certificate
Try recreating the developer certificate:
sh
dotnet dev-certs https --clean
dotnet dev-certs https --trust
These steps should help resolve your issue. If the problem persists, I may need to look into specific code or configuration files to provide more detailed troubleshooting.
How to run an Umbraco CLI project on local network
You type in the browser localhost:44315
Welcome @Meni, local network
LAN
not local machine!https://andrewlock.net/5-ways-to-set-the-urls-for-an-aspnetcore-app/
Did you test it on the network? or dotnet core 7 ?
Did you?
Perhaps you could tell us what you have tried and what results you got and someone may be in a better position to offfer some assistance.
Don't take it wrong.. I see the question is clear and it is a usual process for developer.
Until I find a solution you're welcome Huw Reddick.
I tested that before but not working..
What doesn't work? Did you open the ports on your firewall?
Error's output on Mac OS Catalina:
I don't know much about the MAC, but your problem is you are trying to bind a https address without an ssl certificate.
Try this article https://dev.to/cesarcodes/troubleshooting-net-core-dev-certs-on-macos-179d
This error indicates that there is an issue with binding to one of the specified IP addresses and there are also some problems with the certificate. Here are some steps you can take to resolve these errors:
Step 1: Check IP Address
Ensure that the IP address is correctly assigned and that your device can use this IP address. Verify your network connection and IP address configuration before rerunning the command if 192.168.1.134 is assigned to your device.
Step 2: Check Ports
Make sure that no other applications are using the same ports concurrently. Check that ports 8080 and 9090 are not in use by another application. You can check port availability by running the following command in the terminal:
sh netstat -an | find "8080"
This will check if port 8080 is open. Similarly, check for port 9090.Step 3: Trust HTTPS Certificate
To ensure that the ASP.NET Core developer certificate is trusted, run the following command:
sh dotnet dev-certs https --trust
This command will make the developer certificate trusted.Step 4: Update Kestrel Configuration
Ensure that your Kestrel configuration is correctly set up. Check your
Program.cs
orStartup.cs
file for proper Kestrel settings:csharp webBuilder.ConfigureKestrel(serverOptions => { serverOptions.Listen(IPAddress.Parse("192.168.1.134"), 8080); serverOptions.Listen(IPAddress.Parse("192.168.1.134"), 9090); });
Step 5: Update .NET SDK and Runtime
Ensure that your .NET SDK and Runtime are up to date. Check for updates by running:
sh dotnet --version
If your version is not up to date, update your .NET SDK and Runtime.Step 6: Reinstall Developer Certificate
Try recreating the developer certificate:
sh dotnet dev-certs https --clean dotnet dev-certs https --trust
These steps should help resolve your issue. If the problem persists, I may need to look into specific code or configuration files to provide more detailed troubleshooting.is working on a reply...