private async Task <IisFixture> StartIis(IisAppType appType) { var fixture = new IisFixture { ShutdownPath = "/shutdown" }; try { fixture.TryStartIis(this, appType); } catch (Exception) { fixture.Dispose(); throw; } // Send a request to initialize the app using var httpClient = new HttpClient(); await httpClient.GetAsync($"http://localhost:{fixture.HttpPort}/"); return(fixture); }