Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmoradi committed Jul 8, 2024
1 parent d4f48e6 commit b7b7847
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static IServiceCollection AddClientCoreProjectServices(this IServiceColle
services.TryAddTransient<AuthDelegatingHandler>();
services.TryAddTransient<RetryDelegatingHandler>();
services.TryAddTransient<ExceptionDelegatingHandler>();
services.TryAddSessioned<HttpClientHandler>();
services.TryAddSessioned<HttpMessageHandler, HttpClientHandler>();

services.AddSessioned<AuthenticationStateProvider, AuthenticationManager>(); // Use 'Add' instead of 'TryAdd' to override the aspnetcore's default AuthenticationStateProvider.
services.TryAddSessioned(sp => (AuthenticationManager)sp.GetRequiredService<AuthenticationStateProvider>());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

namespace Boilerplate.Client.Core.Services.HttpMessageHandlers;

public class ExceptionDelegatingHandler(IStringLocalizer<AppStrings> localizer, JsonSerializerOptions jsonSerializerOptions, HttpClientHandler httpClientHandler)
: DelegatingHandler(httpClientHandler)
public class ExceptionDelegatingHandler(IStringLocalizer<AppStrings> localizer, JsonSerializerOptions jsonSerializerOptions, HttpMessageHandler httpMessageHandler)
: DelegatingHandler(httpMessageHandler)
{
protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@
</ItemGroup>

<!--/+:msbuild-conditional:noEmit -->
<ItemGroup Condition=" '$(sample)' == 'Admin' OR '$(sample)' == ''">
<ItemGroup Condition=" '$(sample)' == 'Admin' AND '$(offlineDb)' == 'false'">
<BlazorWebAssemblyLazyLoad Include="System.Private.Xml.wasm" />
<BlazorWebAssemblyLazyLoad Include="System.Data.Common.wasm" />
</ItemGroup>
<ItemGroup Condition=" ('$(sample)' == 'Admin' OR '$(sample)' == '') OR ('$(offlineDb)' == 'true' OR '$(offlineDb)' == '')">
<BlazorWebAssemblyLazyLoad Include="Newtonsoft.Json.wasm" />
</ItemGroup>
<!--/-:msbuild-conditional:noEmit -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit b7b7847

Please sign in to comment.