Application in IIS fails to start after authentication upgrade

Application running in IIS fails to start after the change of authentication process to OpenIddict.

Tested with build 2025.11.0.4093.

Application: w3wp.exe
CoreCLR Version: 8.0.1224.60305
.NET Version: 8.0.12
Description: The process was terminated due to an unhandled exception.
Exception Info: System.UriFormatException: Invalid URI: The format of the URI could not be determined.
   at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions)
   at System.Uri..ctor(String uriString)
   at Origam.Server.OpenIddictConfigManager.CreateOrUpdateMobileClient(ClientApplicationTemplates config, IOpenIddictApplicationManager apps) in D:\a\1\s\backend\Origam.Server\OpenIddictConfigManager.cs:line 153
   at Origam.Server.OpenIddictConfigManager.CreateOrUpdateAsync(IServiceProvider serviceProvider, OpenIddictConfig config) in D:\a\1\s\backend\Origam.Server\OpenIddictConfigManager.cs:line 65
   at Origam.Server.Program.Main(String[] args) in D:\a\1\s\backend\Origam.Server\Program.cs:line 55
Application '/LM/W3SVC/2/ROOT' with physical root 'C:\inetpub\model-tests\' hit unexpected managed exception, exception code = '0xe0434352'. First 30KB characters of captured stdout and stderr logs:
dbug: Microsoft.EntityFrameworkCore.Infrastructure[10401]
      An 'IServiceProvider' was created for internal use by Entity Framework.
dbug: Microsoft.EntityFrameworkCore.Model[10601]
      The index {'ApplicationId'} was not created on entity type 'OpenIddictEntityFrameworkCoreAuthorization' as the properties are already covered by the index {'ApplicationId', 'Status', 'Subject', 'Type'}.
dbug: Microsoft.EntityFrameworkCore.Model[10601]
      The index {'ApplicationId'} was not created on entity type 'OpenIddictEntityFrameworkCoreToken' as the properties are already covered by the index {'ApplicationId', 'Status', 'Subject', 'Type'}.
dbug: Microsoft.EntityFrameworkCore.Infrastructure[10403]
      Entity Framework Core 8.0.21 initialized 'AuthDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer:8.0.21' with options: None
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10800]
      DetectChanges starting for 'AuthDbContext'.
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10801]
      DetectChanges completed for 'AuthDbContext'.
dbug: Microsoft.EntityFrameworkCore.Query[10111]
      Compiling query expression: 
      'DbSet<OpenIddictEntityFrameworkCoreScope>()
          .AsTracking()
          .Where(scope => scope.Name == __name_0)
          .FirstOrDefault()'
dbug: Microsoft.EntityFrameworkCore.Query[10107]
      Generated query execution expression: 
      'queryContext => ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync<OpenIddictEntityFrameworkCoreScope>(
          asyncEnumerable: new SingleQueryingEnumerable<OpenIddictEntityFrameworkCoreScope>(
              (RelationalQueryContext)queryContext, 
              RelationalCommandCache.QueryExpression(
                  Projection Mapping:
                      EmptyProjectionMember -> Dictionary<IProperty, int> { [Property: OpenIddictEntityFrameworkCoreScope.Id (string) Required PK AfterSave:Throw ValueGenerated.OnAdd, 0], [Property: OpenIddictEntityFrameworkCoreScope.ConcurrencyToken (string) Concurrency MaxLength(50), 1], [Property: OpenIddictEntityFrameworkCoreScope.Description (string), 2], [Property: OpenIddictEntityFrameworkCoreScope.Descriptions (string), 3], [Property: OpenIddictEntityFrameworkCoreScope.DisplayName (string), 4], [Property: OpenIddictEntityFrameworkCoreScope.DisplayNames (string), 5], [Property: OpenIddictEntityFrameworkCoreScope.Name (string) Index MaxLength(200), 6], [Property: OpenIddictEntityFrameworkCoreScope.Properties (string), 7], [Property: OpenIddictEntityFrameworkCoreScope.Resources (string), 8] }
                  SELECT TOP(1) o.Id, o.ConcurrencyToken, o.Description, o.Descriptions, o.DisplayName, o.DisplayNames, o.Name, o.Properties, o.Resources
                  FROM OpenIddictScopes AS o
                  WHERE o.Name == @__name_0), 
              null, 
              Func<QueryContext, DbDataReader, ResultContext, SingleQueryResultCoordinator, OpenIddictEntityFrameworkCoreScope>, 
              Origam.Server.AuthDbContext, 
              False, 
              False, 
              True
          ), 
          cancellationToken: queryContext.CancellationToken)'
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20005]
      Creating DbConnection.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20006]
      Created DbConnection. (1ms).
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000]
      Opening connection to database 'origam_tests' on server '.\sqlexpress'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001]
      Opened connection to database 'origam_tests' on server '.\sqlexpress'.
dbug: Microsoft.EntityFrameworkCore.Database.Command[20103]
      Creating DbCommand for 'ExecuteReader'.
dbug: Microsoft.EntityFrameworkCore.Database.Command[20104]
      Created DbCommand for 'ExecuteReader' (1ms).
dbug: Microsoft.EntityFrameworkCore.Database.Command[20106]
      Initialized DbCommand for 'ExecuteReader' (5ms).
dbug: Microsoft.EntityFrameworkCore.Database.Command[20100]
      Executing DbCommand [Parameters=[@__name_0='?' (Size = 200)], CommandType='Text', CommandTimeout='30']
      SELECT TOP(1) [o].[Id], [o].[ConcurrencyToken], [o].[Description], [o].[Descriptions], [o].[DisplayName], [o].[DisplayNames], [o].[Name], [o].[Properties], [o].[Resources]
      FROM [OpenIddictScopes] AS [o]
      WHERE [o].[Name] = @__name_0
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (39ms) [Parameters=[@__name_0='?' (Size = 200)], CommandType='Text', CommandTimeout='30']
      SELECT TOP(1) [o].[Id], [o].[ConcurrencyToken], [o].[Description], [o].[Descriptions], [o].[DisplayName], [o].[DisplayNames], [o].[Name], [o].[Properties], [o].[Resources]
      FROM [OpenIddictScopes] AS [o]
      WHERE [o].[Name] = @__name_0
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10806]
      Context 'AuthDbContext' started tracking 'OpenIddictEntityFrameworkCoreScope' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values.
dbug: Microsoft.EntityFrameworkCore.Database.Command[20301]
      Closing data reader to 'origam_tests' on server '.\sqlexpress'.
dbug: Microsoft.EntityFrameworkCore.Database.Command[20300]
      A data reader for 'origam_tests' on server '.\sqlexpress' is being disposed after spending 47ms reading results.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002]
      Closing connection to database 'origam_tests' on server '.\sqlexpress'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003]
      Closed connection to database 'origam_tests' on server '.\sqlexpress' (0ms).
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10800]
      DetectChanges starting for 'AuthDbContext'.
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10801]
      DetectChanges completed for 'AuthDbContext'.
dbug: Microsoft.EntityFrameworkCore.Query[10111]
      Compiling query expression: 
      'DbSet<OpenIddictEntityFrameworkCoreApplication>()
          .AsTracking()
          .Where(application => application.ClientId == __identifier_0)
          .FirstOrDefault()'
dbug: Microsoft.EntityFrameworkCore.Query[10107]
      Generated query execution expression: 
      'queryContext => ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync<OpenIddictEntityFrameworkCoreApplication>(
          asyncEnumerable: new SingleQueryingEnumerable<OpenIddictEntityFrameworkCoreApplication>(
              (RelationalQueryContext)queryContext, 
              RelationalCommandCache.QueryExpression(
                  Projection Mapping:
                      EmptyProjectionMember -> Dictionary<IProperty, int> { [Property: OpenIddictEntityFrameworkCoreApplication.Id (string) Required PK AfterSave:Throw ValueGenerated.OnAdd, 0], [Property: OpenIddictEntityFrameworkCoreApplication.ApplicationType (string) MaxLength(50), 1], [Property: OpenIddictEntityFrameworkCoreApplication.ClientId (string) Index MaxLength(100), 2], [Property: OpenIddictEntityFrameworkCoreApplication.ClientSecret (string), 3], [Property: OpenIddictEntityFrameworkCoreApplication.ClientType (string) MaxLength(50), 4], [Property: OpenIddictEntityFrameworkCoreApplication.ConcurrencyToken (string) Concurrency MaxLength(50), 5], [Property: OpenIddictEntityFrameworkCoreApplication.ConsentType (string) MaxLength(50), 6], [Property: OpenIddictEntityFrameworkCoreApplication.DisplayName (string), 7], [Property: OpenIddictEntityFrameworkCoreApplication.DisplayNames (string), 8], [Property: OpenIddictEntityFrameworkCoreApplication.JsonWebKeySet (string), 9], [Property: OpenIddictEntityFrameworkCoreApplication.Permissions (string), 10], [Property: OpenIddictEntityFrameworkCoreApplication.PostLogoutRedirectUris (string), 11], [Property: OpenIddictEntityFrameworkCoreApplication.Properties (string), 12], [Property: OpenIddictEntityFrameworkCoreApplication.RedirectUris (string), 13], [Property: OpenIddictEntityFrameworkCoreApplication.Requirements (string), 14], [Property: OpenIddictEntityFrameworkCoreApplication.Settings (string), 15] }
                  SELECT TOP(1) o.Id, o.ApplicationType, o.ClientId, o.ClientSecret, o.ClientType, o.ConcurrencyToken, o.ConsentType, o.DisplayName, o.DisplayNames, o.JsonWebKeySet, o.Permissions, o.PostLogoutRedirectUris, o.Properties, o.RedirectUris, o.Requirements, o.Settings
                  FROM OpenIddictApplications AS o
                  WHERE o.ClientId == @__identifier_0), 
              null, 
              Func<QueryContext, DbDataReader, ResultContext, SingleQueryResultCoordinator, OpenIddictEntityFrameworkCoreApplication>, 
              Origam.Server.AuthDbContext, 
              False, 
              False, 
              True
          ), 
          cancellationToken: queryContext.CancellationToken)'
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000]
      Opening connection to database 'origam_tests' on server '.\sqlexpress'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001]
      Opened connection to database 'origam_tests' on server '.\sqlexpress'.
dbug: Microsoft.EntityFrameworkCore.Database.Command[20103]
      Creating DbCommand for 'ExecuteReader'.
dbug: Microsoft.EntityFrameworkCore.Database.Command[20104]
      Created DbCommand for 'ExecuteReader' (0ms).
dbug: Microsoft.EntityFrameworkCore.Database.Command[20106]
      Initialized DbCommand for 'ExecuteReader' (0ms).
dbug: Microsoft.EntityFrameworkCore.Database.Command[20100]
      Executing DbCommand [Parameters=[@__identifier_0='?' (Size = 100)], CommandType='Text', CommandTimeout='30']
      SELECT TOP(1) [o].[Id], [o].[ApplicationType], [o].[ClientId], [o].[ClientSecret], [o].[ClientType], [o].[ConcurrencyToken], [o].[ConsentType], [o].[DisplayName], [o].[DisplayNames], [o].[JsonWebKeySet], [o].[Permissions], [o].[PostLogoutRedirectUris], [o].[Properties], [o].[RedirectUris], [o].[Requirements], [o].[Settings]
      FROM [OpenIddictApplications] AS [o]
      WHERE [o].[ClientId] = @__identifier_0
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (14ms) [Parameters=[@__identifier_0='?' (Size = 100)], CommandType='Text', CommandTimeout='30']
      SELECT TOP(1) [o].[Id], [o].[ApplicationType], [o].[ClientId], [o].[ClientSecret], [o].[ClientType], [o].[ConcurrencyToken], [o].[ConsentType], [o].[DisplayName], [o].[DisplayNames], [o].[JsonWebKeySet], [o].[Permissions], [o].[PostLogoutRedirectUris], [o].[Properties], [o].[RedirectUris], [o].[Requirements], [o].[Settings]
      FROM [OpenIddictApplications] AS [o]
      WHERE [o].[ClientId] = @__identifier_0
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10806]
      Context 'AuthDbContext' started tracking 'OpenIddictEntityFrameworkCoreApplication' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values.
dbug: Microsoft.EntityFrameworkCore.Database.Command[20301]
      Closing data reader to 'origam_tests' on server '.\sqlexpress'.
dbug: Microsoft.EntityFrameworkCore.Database.Command[20300]
      A data reader for 'origam_tests' on server '.\sqlexpress' is being disposed after spending 28ms reading results.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002]
      Closing connection to database 'origam_tests' on server '.\sqlexpress'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003]
      Closed connection to database 'origam_tests' on server '.\sqlexpress' (0ms).
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10800]
      DetectChanges starting for 'AuthDbContext'.
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10802]
      The unchanged property 'OpenIddictEntityFrameworkCoreApplication.ClientSecret' was detected as changed and will be marked as modified. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see property values.
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10807]
      An entity of type 'OpenIddictEntityFrameworkCoreApplication' tracked by 'AuthDbContext' changed state from 'Unchanged' to 'Modified'. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values.
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10801]
      DetectChanges completed for 'AuthDbContext'.
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10807]
      An entity of type 'OpenIddictEntityFrameworkCoreApplication' tracked by 'AuthDbContext' changed state from 'Modified' to 'Unchanged'. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values.
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10807]
      An entity of type 'OpenIddictEntityFrameworkCoreApplication' tracked by 'AuthDbContext' changed state from 'Unchanged' to 'Modified'. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values.
dbug: Microsoft.EntityFrameworkCore.Update[10004]
      SaveChanges starting for 'AuthDbContext'.
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10800]
      DetectChanges starting for 'AuthDbContext'.
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10801]
      DetectChanges completed for 'AuthDbContext'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20000]
      Opening connection to database 'origam_tests' on server '.\sqlexpress'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20001]
      Opened connection to database 'origam_tests' on server '.\sqlexpress'.
dbug: Microsoft.EntityFrameworkCore.Database.Command[20103]
      Creating DbCommand for 'ExecuteReader'.
dbug: Microsoft.EntityFrameworkCore.Database.Command[20104]
      Created DbCommand for 'ExecuteReader' (0ms).
dbug: Microsoft.EntityFrameworkCore.Database.Command[20106]
      Initialized DbCommand for 'ExecuteReader' (0ms).
dbug: Microsoft.EntityFrameworkCore.Database.Command[20100]
      Executing DbCommand [Parameters=[@p15='?' (Size = 450), @p0='?' (Size = 50), @p1='?' (Size = 100), @p2='?' (Size = 4000), @p3='?' (Size = 50), @p4='?' (Size = 50), @p16='?' (Size = 50), @p5='?' (Size = 50), @p6='?' (Size = 4000), @p7='?' (Size = 4000), @p8='?' (Size = 4000), @p9='?' (Size = 4000), @p10='?' (Size = 4000), @p11='?' (Size = 4000), @p12='?' (Size = 4000), @p13='?' (Size = 4000), @p14='?' (Size = 4000)], CommandType='Text', CommandTimeout='30']
      SET IMPLICIT_TRANSACTIONS OFF;
      SET NOCOUNT ON;
      UPDATE [OpenIddictApplications] SET [ApplicationType] = @p0, [ClientId] = @p1, [ClientSecret] = @p2, [ClientType] = @p3, [ConcurrencyToken] = @p4, [ConsentType] = @p5, [DisplayName] = @p6, [DisplayNames] = @p7, [JsonWebKeySet] = @p8, [Permissions] = @p9, [PostLogoutRedirectUris] = @p10, [Properties] = @p11, [RedirectUris] = @p12, [Requirements] = @p13, [Settings] = @p14
      OUTPUT 1
      WHERE [Id] = @p15 AND [ConcurrencyToken] = @p16;
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (16ms) [Parameters=[@p15='?' (Size = 450), @p0='?' (Size = 50), @p1='?' (Size = 100), @p2='?' (Size = 4000), @p3='?' (Size = 50), @p4='?' (Size = 50), @p16='?' (Size = 50), @p5='?' (Size = 50), @p6='?' (Size = 4000), @p7='?' (Size = 4000), @p8='?' (Size = 4000), @p9='?' (Size = 4000), @p10='?' (Size = 4000), @p11='?' (Size = 4000), @p12='?' (Size = 4000), @p13='?' (Size = 4000), @p14='?' (Size = 4000)], CommandType='Text', CommandTimeout='30']
      SET IMPLICIT_TRANSACTIONS OFF;
      SET NOCOUNT ON;
      UPDATE [OpenIddictApplications] SET [ApplicationType] = @p0, [ClientId] = @p1, [ClientSecret] = @p2, [ClientType] = @p3, [ConcurrencyToken] = @p4, [ConsentType] = @p5, [DisplayName] = @p6, [DisplayNames] = @p7, [JsonWebKeySet] = @p8, [Permissions] = @p9, [PostLogoutRedirectUris] = @p10, [Properties] = @p11, [RedirectUris] = @p12, [Requirements] = @p13, [Settings] = @p14
      OUTPUT 1
      WHERE [Id] = @p15 AND [ConcurrencyToken] = @p16;
dbug: Microsoft.EntityFrameworkCore.Database.Command[20301]
      Closing data reader to 'origam_tests' on server '.\sqlexpress'.
dbug: Microsoft.EntityFrameworkCore.Database.Command[20300]
      A data reader for 'origam_tests' on server '.\sqlexpress' is being disposed after spending 3ms reading results.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20002]
      Closing connection to database 'origam_tests' on server '.\sqlexpress'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20003]
      Closed connection to database 'origam_tests' on server '.\sqlexpress' (0ms).
dbug: Microsoft.EntityFrameworkCore.ChangeTracking[10807]
      An entity of type 'OpenIddictEntityFrameworkCoreApplication' tracked by 'AuthDbContext' changed state from 'Modified' to 'Unchanged'. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values.
dbug: Microsoft.EntityFrameworkCore.Update[10005]
      SaveChanges completed for 'AuthDbContext' with 1 entities written to the database.
dbug: Microsoft.EntityFrameworkCore.Infrastructure[10407]
      'AuthDbContext' disposed.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20007]
      Disposing connection to database 'origam_tests' on server '.\sqlexpress'.
dbug: Microsoft.EntityFrameworkCore.Database.Connection[20008]
      Disposed connection to database '' on server '' (0ms).
Unhandled exception. System.UriFormatException: Invalid URI: The format of the URI could not be determined.
   at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions)
   at System.Uri..ctor(String uriString)
   at Origam.Server.OpenIddictConfigManager.CreateOrUpdateMobileClient(ClientApplicationTemplates config, IOpenIddictApplicationManager apps) in D:\a\1\s\backend\Origam.Server\OpenIddictConfigManager.cs:line 153
   at Origam.Server.OpenIddictConfigManager.CreateOrUpdateAsync(IServiceProvider serviceProvider, OpenIddictConfig config) in D:\a\1\s\backend\Origam.Server\OpenIddictConfigManager.cs:line 65
   at Origam.Server.Program.Main(String[] args) in D:\a\1\s\backend\Origam.Server\Program.cs:line 55

The application also fails to start unless AllowedCorsOrigins is filled in appsettings.json. When the parameter is missing or left empty, the application won’t start. It works when the application url is filled.

Application: w3wp.exe
CoreCLR Version: 8.0.1224.60305
.NET Version: 8.0.12
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentNullException: Value cannot be null. (Parameter 'origins')
   at System.ArgumentNullException.Throw(String paramName)
   at System.ArgumentNullException.ThrowIfNull(Object argument, String paramName)
   at Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder.WithOrigins(String[] origins)
   at Origam.Server.Startup.<>c__DisplayClass10_0.<ConfigureServices>b__31(CorsPolicyBuilder builder) in D:\a\1\s\backend\Origam.Server\Startup.cs:line 370
   at Microsoft.AspNetCore.Cors.Infrastructure.CorsOptions.AddPolicy(String name, Action`1 configurePolicy)
   at Origam.Server.Startup.<>c__DisplayClass10_0.<ConfigureServices>b__24(CorsOptions options) in D:\a\1\s\backend\Origam.Server\Startup.cs:line 366
   at Microsoft.Extensions.Options.OptionsFactory`1.Create(String name)
   at Microsoft.Extensions.Options.UnnamedOptionsManager`1.get_Value()
   at Microsoft.AspNetCore.Cors.Infrastructure.CorsService..ctor(IOptions`1 options, ILoggerFactory loggerFactory)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
   at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitDisposeCache(ServiceCallSite transientCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass2_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
   at Microsoft.Extensions.Internal.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
   at Microsoft.Extensions.Internal.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, Object[] parameters)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.ReflectionMiddlewareBinder.CreateMiddleware(RequestDelegate next)
   at Microsoft.AspNetCore.Builder.ApplicationBuilder.Build()
   at Microsoft.AspNetCore.Hosting.WebHost.BuildApplication()
   at Microsoft.AspNetCore.Hosting.WebHost.StartAsync(CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token, String startupMessage)
   at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token, String startupMessage)
   at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token)
   at Microsoft.AspNetCore.Hosting.WebHostExtensions.Run(IWebHost host)
   at Origam.Server.Program.Main(String[] args) in D:\a\1\s\backend\Origam.Server\Program.cs:line 61

That is expected. I have added a check to make sure the error message is descriptive.

Why is it mandatory to fill it if I am running an application that doesn’t have any cross-origin requests?

I have checked again and it actually works with empty array but not with null. I will make sure that an empty array is sent if nothing is in the config.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.