Open Ewerton opened 2 years ago
You have to start two different host for example:
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
CreateHostBuilder().Build().RunAsync();
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>();
return builder.Build();
}
public static IHostBuilder CreateHostBuilder() =>
Host.CreateDefaultBuilder()
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
webBuilder.UseUrls("http://localhost:5003");
});
}
see CreateHostBuilder().Build().RunAsync();
I'am developing a .Net Maui Blazor App and wanted to use the hangfire dashboard in it. My attempt was to start the dashboard and show it inside and iframe in my blazor Component.
I 'cant make it work because in Maui App the Program.cs has the following
MauiAppBuilder builder = MauiApp.CreateBuilder();
and the samples in Hangfire docs shows that I need an aspnet core WebApp, which uses the followingWebApplicationBuilder builder = WebApplication.CreateBuilder(args);
Since the builders are different, the hangfire middlewares cant be used.
Is there a way to workaround it?