diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Dashboard/DashboardPage.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Dashboard/DashboardPage.razor.cs index fa9300d3d3..d25abdf15e 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Dashboard/DashboardPage.razor.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Dashboard/DashboardPage.razor.cs @@ -15,7 +15,7 @@ protected async override Task OnInitAsync() { if (OperatingSystem.IsBrowser()) { - await lazyAssemblyLoader.LoadAssembliesAsync(["Newtonsoft.Json.wasm"]); + await lazyAssemblyLoader.LoadAssembliesAsync(["System.Private.Xml.wasm", "System.Data.Common.wasm", "Newtonsoft.Json.wasm"]); } } finally diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Extensions/IServiceCollectionExtensions.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Extensions/IServiceCollectionExtensions.cs index da674839eb..4b362e85f0 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Extensions/IServiceCollectionExtensions.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Extensions/IServiceCollectionExtensions.cs @@ -27,7 +27,7 @@ public static IServiceCollection AddClientCoreProjectServices(this IServiceColle services.TryAddTransient(); services.TryAddTransient(); services.TryAddTransient(); - services.TryAddSessioned(); + services.TryAddSessioned(); services.AddSessioned(); // Use 'Add' instead of 'TryAdd' to override the aspnetcore's default AuthenticationStateProvider. services.TryAddSessioned(sp => (AuthenticationManager)sp.GetRequiredService()); diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/HttpMessageHandlers/ExceptionDelegatingHandler.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/HttpMessageHandlers/ExceptionDelegatingHandler.cs index ca01c6c564..5b445b0067 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/HttpMessageHandlers/ExceptionDelegatingHandler.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/HttpMessageHandlers/ExceptionDelegatingHandler.cs @@ -3,8 +3,8 @@ namespace Boilerplate.Client.Core.Services.HttpMessageHandlers; -public class ExceptionDelegatingHandler(IStringLocalizer localizer, JsonSerializerOptions jsonSerializerOptions, HttpClientHandler httpClientHandler) - : DelegatingHandler(httpClientHandler) +public class ExceptionDelegatingHandler(IStringLocalizer localizer, JsonSerializerOptions jsonSerializerOptions, HttpMessageHandler httpMessageHandler) + : DelegatingHandler(httpMessageHandler) { protected override async Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) { diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Boilerplate.Client.Web.csproj b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Boilerplate.Client.Web.csproj index b96e9f0a11..5fdbc86ae1 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Boilerplate.Client.Web.csproj +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Boilerplate.Client.Web.csproj @@ -52,7 +52,11 @@ - + + + + + diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Api/Properties/launchSettings.json b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Api/Properties/launchSettings.json index 1d29ab8e43..915416aeb7 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Api/Properties/launchSettings.json +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Api/Properties/launchSettings.json @@ -31,6 +31,22 @@ "publishAllPorts": true, "useSSL": false, "httpPort": 5031 + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "launchUrl": "swagger", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + }, + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:57278/", + "httpPort": 5031 } }, "$schema": "http://json.schemastore.org/launchsettings.json" diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Web/Extensions/IConfigurationBuilderExtensions.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Web/Extensions/IConfigurationBuilderExtensions.cs deleted file mode 100644 index 6694f63541..0000000000 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Web/Extensions/IConfigurationBuilderExtensions.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace Microsoft.Extensions.Configuration; - -public static class IConfigurationBuilderExtensions -{ - public static void AddApiConfigurations(this IConfigurationBuilder builder, string env) - { - builder.AddSharedConfigurations(); - - var appsettingsJsonFilePath = Path.Combine(AppContext.BaseDirectory, "appsettings.json"); - var appsettingsEnvJsonFilePath = Path.Combine(AppContext.BaseDirectory, $"appsettings.{env}.json"); - - builder.AddJsonFile(appsettingsJsonFilePath, optional: false, reloadOnChange: true); - builder.AddJsonFile(appsettingsEnvJsonFilePath, optional: true, reloadOnChange: true); - } -} diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Web/Program.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Web/Program.cs index 0d03ca4c4f..7983bc286c 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Web/Program.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Web/Program.cs @@ -8,10 +8,13 @@ public static partial class Program { public static async Task Main(string[] args) { - var builder = WebApplication.CreateBuilder(args); + var builder = WebApplication.CreateBuilder(options: new() + { + Args = args, + ContentRootPath = AppContext.BaseDirectory + }); builder.Configuration.AddClientConfigurations(); - builder.Configuration.AddApiConfigurations(builder.Environment.EnvironmentName); // The following line (using the * in the URL), allows the emulators and mobile devices to access the app using the host IP address. if (BuildConfiguration.IsDebug() && OperatingSystem.IsWindows()) diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Web/Properties/launchSettings.json b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Web/Properties/launchSettings.json index 1cb3d2cd08..383516a642 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Web/Properties/launchSettings.json +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Web/Properties/launchSettings.json @@ -42,14 +42,29 @@ "commandName": "SdkContainer", "launchBrowser": true, "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/", - "DockerfileRunArguments": "-v C:\\DockerVolumes\\AC87AA5B-4B37-4E52-8468-2D5DF24AF256:/container_volume", "environmentVariables": { "ASPNETCORE_HTTP_PORTS": "5030", "ConnectionStrings__SqliteConnectionString": "Data Source=/container_volume/App_Data/BoilerplateDb.db;" }, + "DockerfileRunArguments": "-v C:\\DockerVolumes\\AC87AA5B-4B37-4E52-8468-2D5DF24AF256:/container_volume", "publishAllPorts": true, "useSSL": false, "httpPort": 5030 + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + }, + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:57278/", + "httpPort": 5030 } }, "$schema": "http://json.schemastore.org/launchsettings.json"