Skip to content

SimpleWithWebApplicationBuilderTests.HelloWorld #33494

@Tratcher

Description

@Tratcher

Error Message

System.ObjectDisposedException : Cannot access a disposed object.
Object name: 'IServiceProvider'.

Stacktrace

   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException() in Microsoft.Extensions.DependencyInjection.dll:token 0x600011e+0xa
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope) in Microsoft.Extensions.DependencyInjection.dll:token 0x6000067+0x8
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType) in Microsoft.Extensions.DependencyInjection.dll:token 0x6000062+0x0
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType) in Microsoft.Extensions.DependencyInjection.Abstractions.dll:token 0x6000094+0x34
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider) in Microsoft.Extensions.DependencyInjection.Abstractions.dll:token 0x6000095+0xe
   at Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1.ConfigureHostBuilder(IHostBuilder hostBuilder) in /_/src/Mvc/Mvc.Testing/src/WebApplicationFactory.cs:line 202
   at Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1.EnsureServer() in /_/src/Mvc/Mvc.Testing/src/WebApplicationFactory.cs:line 172
   at Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1.CreateDefaultClient(DelegatingHandler[] handlers) in /_/src/Mvc/Mvc.Testing/src/WebApplicationFactory.cs:line 462
   at Microsoft.AspNetCore.Mvc.FunctionalTests.SimpleWithWebApplicationBuilderTests..ctor(MvcTestFixture`1 fixture) in /_/src/Mvc/test/Mvc.FunctionalTests/SimpleWithWebApplicationBuilderTests.cs:line 16

Build

https://dev.azure.com/dnceng/public/_build/results?buildId=1183988&view=ms.vss-test-web.build-test-results-tab&runId=35603264&resultId=118571&paneView=debug

@davidfowl I'm concerned this happened on the first official build with your changes to WebApplicationFactory #33462.

Metadata

Metadata

Assignees

Labels

area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatestest-failure

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions