You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to get started with your library and I hit the below issue.
System.InvalidOperationException: No authenticationScheme was specified, and there was no DefaultChallengeScheme found. The default schemes can be set using either AddAuthentication(string defaultScheme) or AddAuthentication(Action configureOptions).
at Microsoft.AspNetCore.Authentication.AuthenticationService.ChallengeAsync(HttpContext context, String scheme, AuthenticationProperties properties)
at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
protectedTestFixture(string relativeTargetProjectParentDir){varstartupAssembly=typeof(TStartup).GetTypeInfo().Assembly;varcontentRoot=GetProjectPath(relativeTargetProjectParentDir,startupAssembly);varconfigurationBuilder=newConfigurationBuilder().SetBasePath(contentRoot).AddJsonFile("appsettings.json");varwebHostBuilder=newWebHostBuilder().UseContentRoot(contentRoot).ConfigureServices(InitializeServices).UseConfiguration(configurationBuilder.Build()).UseEnvironment("Development").UseStartup(typeof(TStartup));// Create instance of test serverServer=newTestServer(webHostBuilder);// Add configuration for clientClient=Server.CreateClient();Client.DefaultRequestHeaders.Accept.Clear();Client.DefaultRequestHeaders.Accept.Add(new("application/json"));}
The text was updated successfully, but these errors were encountered:
Trying to get started with your library and I hit the below issue.
I've got this as my test
and the
Client
is setup like so:The text was updated successfully, but these errors were encountered: