diff --git a/csharp/Sample.Blog/Sample.Blog/Models/ApiClient.cs b/csharp/Sample.Blog/Sample.Blog/Models/ApiClient.cs index b5b48387..30cfd197 100644 --- a/csharp/Sample.Blog/Sample.Blog/Models/ApiClient.cs +++ b/csharp/Sample.Blog/Sample.Blog/Models/ApiClient.cs @@ -10,6 +10,7 @@ using System.Threading.Tasks; using Microsoft.Extensions.Options; using Squidex.ClientLibrary; +using Squidex.ClientLibrary.Configuration; namespace Sample.Blog.Models { @@ -22,6 +23,8 @@ public ApiClient(IOptions appOptions) { var options = appOptions.Value; + options.Configurator = AcceptAllCertificatesConfigurator.Instance; + var clientManager = new SquidexClientManager(options); diff --git a/csharp/Sample.Blog/Sample.Blog/Sample.Blog.csproj b/csharp/Sample.Blog/Sample.Blog/Sample.Blog.csproj index c9e19318..bca87ba0 100644 --- a/csharp/Sample.Blog/Sample.Blog/Sample.Blog.csproj +++ b/csharp/Sample.Blog/Sample.Blog/Sample.Blog.csproj @@ -5,12 +5,12 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/csharp/Sample.Profile/Sample.Profile/Startup.cs b/csharp/Sample.Profile/Sample.Profile/Startup.cs index 9dac79ee..d1ec9381 100644 --- a/csharp/Sample.Profile/Sample.Profile/Startup.cs +++ b/csharp/Sample.Profile/Sample.Profile/Startup.cs @@ -12,6 +12,7 @@ using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Options; using Squidex.ClientLibrary; +using Squidex.ClientLibrary.Configuration; namespace Sample.Profile { @@ -29,7 +30,13 @@ public void ConfigureServices(IServiceCollection services) services.Configure(Configuration.GetSection("app")); services.AddSingleton(c => - new SquidexClientManager(c.GetRequiredService>().Value)); + { + var options = c.GetRequiredService>().Value; + + options.Configurator = AcceptAllCertificatesConfigurator.Instance; + + return new SquidexClientManager(options); + }); services.AddMvc(); }