mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-04 05:34:51 +00:00
CreateWindowAsync ConnectionException. Cannot connect to server 'http://localhost:8000' #866
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @AlphaZeroUno on GitHub (Apr 3, 2023).
Hi, I have a problem running an electronic application with the latest version.
When I launch the application, I get the error in image. With the previous version 13.5.1 I didn't have this error
Steps to Reproduce:
Program.cs
using System;
using ElectronNET.API;
using ElectronNET.API.Entities;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.DependencyInjection;
using MvcPwa.Models;
using MvcPwa.Hubs;
using Microsoft.AspNetCore.SignalR;
using NLog.Targets;
using Microsoft.AspNetCore.Http.Connections;
using Microsoft.EntityFrameworkCore;
namespace MvcPwa
{
public class Program
{
public static void Main(string[] args)
{
var builder = WebApplication.CreateBuilder(args);
builder.WebHost.UseElectron(args);
}
@FlorianRappl commented on GitHub (Apr 3, 2023):
Can you provide the MWE in a GitHub repository? Just code fragments is unfortunately not sufficient...
@GregorBiswanger commented on GitHub (Apr 3, 2023):
Did you also update the Electron CLI?
Then simply delete the obj/host directory from your project and try again.
@AlphaZeroUno commented on GitHub (Apr 3, 2023):
I tried to install electronNET.CLI but it is not supported by my application in NET 6.0
I tried deleting obj/host directory , but still get the same error
@AlphaZeroUno commented on GitHub (Apr 3, 2023):
@FlorianRappl commented on GitHub (Apr 3, 2023):
Please follow the README. You install the CLI via
dotnet tool- not as a normal NuGet package.@AlphaZeroUno commented on GitHub (Apr 3, 2023):
I updated as said and now it works, thanks.