310 references to EnsureSuccessStatusCode
Aspire.Dashboard.Tests (9)
Integration\OtlpHttpServiceTests.cs (5)
48responseMessage.EnsureSuccessStatusCode(); 174responseMessage.EnsureSuccessStatusCode(); 288responseMessage.EnsureSuccessStatusCode(); 317responseMessage.EnsureSuccessStatusCode(); 346responseMessage.EnsureSuccessStatusCode();
Integration\StartupTests.cs (4)
300response.EnsureSuccessStatusCode(); 401responseMessage.EnsureSuccessStatusCode(); 408responseMessage.EnsureSuccessStatusCode(); 696response.EnsureSuccessStatusCode();
Aspire.EndToEnd.Tests (1)
tests\Shared\WorkloadTesting\AspireProject.cs (1)
365res.EnsureSuccessStatusCode();
Aspire.Hosting.PostgreSQL.Tests (1)
PostgresFunctionalTests.cs (1)
180response.EnsureSuccessStatusCode();
Aspire.Hosting.Redis (2)
RedisBuilderExtensions.cs (2)
290deleteResponse.EnsureSuccessStatusCode(); 300response.EnsureSuccessStatusCode();
Aspire.Hosting.Redis.Tests (4)
RedisFunctionalTests.cs (4)
261response.EnsureSuccessStatusCode(); 288response.EnsureSuccessStatusCode(); 666response.EnsureSuccessStatusCode(); 698response.EnsureSuccessStatusCode();
Aspire.Workload.Tests (1)
tests\Shared\WorkloadTesting\AspireProject.cs (1)
365res.EnsureSuccessStatusCode();
BasicWebSite (1)
Services\WeatherForecastService.cs (1)
22result.EnsureSuccessStatusCode();
IIS.FunctionalTests (19)
Http2TrailersResetTests.cs (10)
51response.EnsureSuccessStatusCode(); 62response.EnsureSuccessStatusCode(); 73response.EnsureSuccessStatusCode(); 85response.EnsureSuccessStatusCode(); 100response.EnsureSuccessStatusCode(); 115response.EnsureSuccessStatusCode(); 133response.EnsureSuccessStatusCode(); 150response.EnsureSuccessStatusCode(); 164response.EnsureSuccessStatusCode(); 180response.EnsureSuccessStatusCode();
Http3Tests.cs (6)
52response.EnsureSuccessStatusCode(); 71response1.EnsureSuccessStatusCode(); 93response2.EnsureSuccessStatusCode(); 110response.EnsureSuccessStatusCode(); 138response.EnsureSuccessStatusCode(); 155response.EnsureSuccessStatusCode();
src\Servers\IIS\IIS\test\Common.FunctionalTests\Http2Tests.cs (1)
322response.EnsureSuccessStatusCode();
src\Servers\IIS\IIS\test\Common.FunctionalTests\WebSocketTests.cs (2)
44response.EnsureSuccessStatusCode(); 59response.EnsureSuccessStatusCode();
IIS.Tests (1)
Utilities\TestServer.cs (1)
76(await server.HttpClient.GetAsync("/start")).EnsureSuccessStatusCode();
IISExpress.FunctionalTests (5)
InProcess\IISExpressShutdownTests.cs (2)
85response.EnsureSuccessStatusCode(); 97response.EnsureSuccessStatusCode();
src\Servers\IIS\IIS\test\Common.FunctionalTests\Http2Tests.cs (1)
322response.EnsureSuccessStatusCode();
src\Servers\IIS\IIS\test\Common.FunctionalTests\WebSocketTests.cs (2)
44response.EnsureSuccessStatusCode(); 59response.EnsureSuccessStatusCode();
InMemory.FunctionalTests (6)
EventSourceTests.cs (1)
196responseMessage.EnsureSuccessStatusCode();
KestrelMetricsTests.cs (4)
575responseMessage.EnsureSuccessStatusCode(); 654responseMessage.EnsureSuccessStatusCode(); 732responseMessage.EnsureSuccessStatusCode(); 816responseMessage.EnsureSuccessStatusCode();
TestTransport\InMemoryHttpClientSlim.cs (1)
99new HttpResponseMessage(status).EnsureSuccessStatusCode();
installer.tasks (1)
StaticFileRegeneration\RegenerateThirdPartyNotices.cs (1)
78response.EnsureSuccessStatusCode();
Interop.FunctionalTests (46)
Http2\Http2RequestTests.cs (3)
131response1.EnsureSuccessStatusCode(); 188response.EnsureSuccessStatusCode(); 299responseMessage.EnsureSuccessStatusCode();
Http3\Http3RequestTests.cs (24)
94response1.EnsureSuccessStatusCode(); 258response.EnsureSuccessStatusCode(); 309response.EnsureSuccessStatusCode(); 388response.EnsureSuccessStatusCode(); 437response.EnsureSuccessStatusCode(); 738response.EnsureSuccessStatusCode(); 820response.EnsureSuccessStatusCode(); 856response1.EnsureSuccessStatusCode(); 867response2.EnsureSuccessStatusCode(); 916response1.EnsureSuccessStatusCode(); 929response2.EnsureSuccessStatusCode(); 945response3.EnsureSuccessStatusCode(); 1375response.EnsureSuccessStatusCode(); 1427response1.EnsureSuccessStatusCode(); 1437response2.EnsureSuccessStatusCode(); 1494response1.EnsureSuccessStatusCode(); 1505response2.EnsureSuccessStatusCode(); 1567response2.EnsureSuccessStatusCode(); 1608response1.EnsureSuccessStatusCode(); 1668response1.EnsureSuccessStatusCode(); 1724response1.EnsureSuccessStatusCode(); 1809response1.EnsureSuccessStatusCode(); 1831response3.EnsureSuccessStatusCode(); 1967response1.EnsureSuccessStatusCode();
Http3\Http3TlsTests.cs (6)
62response.EnsureSuccessStatusCode(); 108response.EnsureSuccessStatusCode(); 150response.EnsureSuccessStatusCode(); 210response.EnsureSuccessStatusCode(); 328response.EnsureSuccessStatusCode(); 493response.EnsureSuccessStatusCode();
HttpClientHttp2InteropTests.cs (13)
626response.EnsureSuccessStatusCode(); 654response.EnsureSuccessStatusCode(); 1066response.EnsureSuccessStatusCode(); 1110response.EnsureSuccessStatusCode(); 1175response.EnsureSuccessStatusCode(); 1236response.EnsureSuccessStatusCode(); 1297response.EnsureSuccessStatusCode(); 1331response.EnsureSuccessStatusCode(); 1446response.EnsureSuccessStatusCode(); 1535response0.EnsureSuccessStatusCode(); 1536response1.EnsureSuccessStatusCode(); 1569response.EnsureSuccessStatusCode(); 1591response.EnsureSuccessStatusCode();
JwtClientSample (1)
Program.cs (1)
85httpResponse.EnsureSuccessStatusCode();
Microsoft.AspNetCore.Authentication.OpenIdConnect (1)
OpenIdConnectHandler.cs (1)
1061responseMessage.EnsureSuccessStatusCode();
Microsoft.AspNetCore.Authentication.Test (2)
WsFederation\WsFederationTest.cs (1)
192response.EnsureSuccessStatusCode();
WsFederation\WsFederationTest_Handler.cs (1)
190response.EnsureSuccessStatusCode();
Microsoft.AspNetCore.Authentication.Twitter (3)
TwitterHandler.cs (3)
362response.EnsureSuccessStatusCode(); 376response.EnsureSuccessStatusCode(); 383response.EnsureSuccessStatusCode();
Microsoft.AspNetCore.Cors.Test (7)
CorsMiddlewareTests.cs (7)
56response.EnsureSuccessStatusCode(); 98response.EnsureSuccessStatusCode(); 149response.EnsureSuccessStatusCode(); 199response.EnsureSuccessStatusCode(); 265response.EnsureSuccessStatusCode(); 486response.EnsureSuccessStatusCode(); 543response.EnsureSuccessStatusCode();
Microsoft.AspNetCore.Diagnostics.Tests (6)
ExceptionHandlerTest.cs (6)
117response.EnsureSuccessStatusCode(); 294response.EnsureSuccessStatusCode(); 436response.EnsureSuccessStatusCode(); 821response.EnsureSuccessStatusCode(); 875response.EnsureSuccessStatusCode(); 927response.EnsureSuccessStatusCode();
Microsoft.AspNetCore.Http.Connections.Client (6)
HttpConnection.cs (1)
487response.EnsureSuccessStatusCode();
Internal\LongPollingTransport.cs (3)
59response.EnsureSuccessStatusCode(); 179response.EnsureSuccessStatusCode(); 244response.EnsureSuccessStatusCode();
Internal\SendUtils.cs (1)
53response.EnsureSuccessStatusCode();
Internal\ServerSentEventsTransport.cs (1)
63response.EnsureSuccessStatusCode();
Microsoft.AspNetCore.Http.Extensions.Tests (2)
HttpResponseJsonExtensionsTests.cs (2)
513result.EnsureSuccessStatusCode(); 545result.EnsureSuccessStatusCode();
Microsoft.AspNetCore.Identity.FunctionalTests (2)
MapIdentityApiTests.cs (2)
112loginResponse.EnsureSuccessStatusCode(); 145loginResponse.EnsureSuccessStatusCode();
Microsoft.AspNetCore.InternalTesting (1)
HttpClientSlim.cs (1)
102new HttpResponseMessage(status).EnsureSuccessStatusCode();
Microsoft.AspNetCore.Localization.Tests (3)
CookieRequestCultureProviderTest.cs (2)
218response.EnsureSuccessStatusCode(); 278response.EnsureSuccessStatusCode();
RequestLocalizationMiddlewareTest.cs (1)
71response.EnsureSuccessStatusCode();
Microsoft.AspNetCore.Mvc.FunctionalTests (19)
AntiforgeryMiddlewareTest.cs (2)
51result.EnsureSuccessStatusCode(); 199result.EnsureSuccessStatusCode();
ApiExplorerTest.cs (7)
1329var responseBody = await response.EnsureSuccessStatusCode().Content.ReadAsStringAsync(); 1360var responseBody = await response.EnsureSuccessStatusCode().Content.ReadAsStringAsync(); 1395var responseBody = await response.EnsureSuccessStatusCode().Content.ReadAsStringAsync(); 1430var responseBody = await response.EnsureSuccessStatusCode().Content.ReadAsStringAsync(); 1470var responseBody = await response.EnsureSuccessStatusCode().Content.ReadAsStringAsync(); 1511var responseBody = await response.EnsureSuccessStatusCode().Content.ReadAsStringAsync(); 1540var responseBody = await response.EnsureSuccessStatusCode().Content.ReadAsStringAsync();
ControllerFromServicesTests.cs (2)
84response.EnsureSuccessStatusCode(); 100response.EnsureSuccessStatusCode();
HtmlGenerationTest.cs (1)
619(await Client.SendAsync(requestMessage)).EnsureSuccessStatusCode();
RazorBuildTest.cs (2)
181response.EnsureSuccessStatusCode(); 187response.EnsureSuccessStatusCode();
RazorPagesTest.cs (2)
1301response.EnsureSuccessStatusCode(); 1342response.EnsureSuccessStatusCode();
RazorRuntimeCompilationHostingStartupTest.cs (2)
126response.EnsureSuccessStatusCode(); 132response.EnsureSuccessStatusCode();
RequestServicesTestBase.cs (1)
60response.EnsureSuccessStatusCode();
Microsoft.AspNetCore.OutputCaching.Tests (7)
OutputCacheTests.cs (7)
598initialResponse.EnsureSuccessStatusCode(); 714initialResponse.EnsureSuccessStatusCode(); 763initialResponse.EnsureSuccessStatusCode(); 1051initialResponse.EnsureSuccessStatusCode(); 1052subsequentResponse.EnsureSuccessStatusCode(); 1064initialResponse.EnsureSuccessStatusCode(); 1065subsequentResponse.EnsureSuccessStatusCode();
Microsoft.AspNetCore.ResponseCaching.Tests (7)
ResponseCachingTests.cs (7)
536initialResponse.EnsureSuccessStatusCode(); 661initialResponse.EnsureSuccessStatusCode(); 714initialResponse.EnsureSuccessStatusCode(); 955initialResponse.EnsureSuccessStatusCode(); 956subsequentResponse.EnsureSuccessStatusCode(); 968initialResponse.EnsureSuccessStatusCode(); 969subsequentResponse.EnsureSuccessStatusCode();
Microsoft.AspNetCore.Routing.FunctionalTests (11)
EndpointRoutingIntegrationTest.cs (4)
58response.EnsureSuccessStatusCode(); 122response.EnsureSuccessStatusCode(); 277response.EnsureSuccessStatusCode(); 313response.EnsureSuccessStatusCode();
MinimalFormTests.cs (6)
65response.EnsureSuccessStatusCode(); 125response.EnsureSuccessStatusCode(); 286response.EnsureSuccessStatusCode(); 333response.EnsureSuccessStatusCode(); 493response.EnsureSuccessStatusCode(); 600response.EnsureSuccessStatusCode();
RouteHandlerTest.cs (1)
53response.EnsureSuccessStatusCode();
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (56)
DelegateTests.cs (1)
279response.EnsureSuccessStatusCode();
Http3Tests.cs (5)
79response1.EnsureSuccessStatusCode(); 117response2.EnsureSuccessStatusCode(); 149response.EnsureSuccessStatusCode(); 208response.EnsureSuccessStatusCode(); 234response.EnsureSuccessStatusCode();
HttpsTests.cs (1)
292response.EnsureSuccessStatusCode();
Listener\RequestBodyTests.cs (1)
206response.EnsureSuccessStatusCode();
Listener\ResponseBodyTests.cs (4)
380response.EnsureSuccessStatusCode(); 419response.EnsureSuccessStatusCode(); 458response.EnsureSuccessStatusCode(); 492response.EnsureSuccessStatusCode();
Listener\ResponseHeaderTests.cs (11)
39response.EnsureSuccessStatusCode(); 61response.EnsureSuccessStatusCode(); 84response.EnsureSuccessStatusCode(); 112response.EnsureSuccessStatusCode(); 142response.EnsureSuccessStatusCode(); 171response.EnsureSuccessStatusCode(); 194response.EnsureSuccessStatusCode(); 233response.EnsureSuccessStatusCode(); 243response.EnsureSuccessStatusCode(); 268response.EnsureSuccessStatusCode(); 335response.EnsureSuccessStatusCode();
Listener\ServerOnExistingQueueTests.cs (1)
328response.EnsureSuccessStatusCode();
Listener\ServerTests.cs (1)
67response.EnsureSuccessStatusCode();
OpaqueUpgradeTests.cs (1)
301response.EnsureSuccessStatusCode();
RequestBodyLimitTests.cs (1)
416response.EnsureSuccessStatusCode();
RequestBodyTests.cs (1)
304response.EnsureSuccessStatusCode();
RequestHeaderTests.cs (1)
241result.EnsureSuccessStatusCode();
ResponseHeaderTests.cs (8)
30response.EnsureSuccessStatusCode(); 131response.EnsureSuccessStatusCode(); 150response.EnsureSuccessStatusCode(); 175response.EnsureSuccessStatusCode(); 202response.EnsureSuccessStatusCode(); 234response.EnsureSuccessStatusCode(); 264response.EnsureSuccessStatusCode(); 287response.EnsureSuccessStatusCode();
ResponseSendFileTests.cs (4)
171response.EnsureSuccessStatusCode(); 190response.EnsureSuccessStatusCode(); 615response.EnsureSuccessStatusCode(); 664response.EnsureSuccessStatusCode();
ResponseTrailersTests.cs (14)
33response.EnsureSuccessStatusCode(); 51response.EnsureSuccessStatusCode(); 72response.EnsureSuccessStatusCode(); 90response.EnsureSuccessStatusCode(); 108response.EnsureSuccessStatusCode(); 138response.EnsureSuccessStatusCode(); 161response.EnsureSuccessStatusCode(); 186response.EnsureSuccessStatusCode(); 212response.EnsureSuccessStatusCode(); 236response.EnsureSuccessStatusCode(); 258response.EnsureSuccessStatusCode(); 278response.EnsureSuccessStatusCode(); 306response.EnsureSuccessStatusCode(); 326response.EnsureSuccessStatusCode();
ServerTests.cs (1)
650response.EnsureSuccessStatusCode();
Microsoft.AspNetCore.Server.IISIntegration.Tests (1)
IISMiddlewareTests.cs (1)
58response.EnsureSuccessStatusCode();
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (7)
WebHostTests.cs (7)
87response.EnsureSuccessStatusCode(); 251response1.EnsureSuccessStatusCode(); 265response2.EnsureSuccessStatusCode(); 322response1.EnsureSuccessStatusCode(); 335response2.EnsureSuccessStatusCode(); 360response1.EnsureSuccessStatusCode(); 372response2.EnsureSuccessStatusCode();
Microsoft.AspNetCore.Session.Tests (20)
SessionTests.cs (20)
56response.EnsureSuccessStatusCode(); 93response.EnsureSuccessStatusCode(); 148response.EnsureSuccessStatusCode(); 199response.EnsureSuccessStatusCode(); 259response.EnsureSuccessStatusCode(); 317response.EnsureSuccessStatusCode(); 363response.EnsureSuccessStatusCode(); 422response.EnsureSuccessStatusCode(); 491response.EnsureSuccessStatusCode(); 547response.EnsureSuccessStatusCode(); 633response.EnsureSuccessStatusCode(); 678response.EnsureSuccessStatusCode(); 727response.EnsureSuccessStatusCode(); 776response.EnsureSuccessStatusCode(); 824response.EnsureSuccessStatusCode(); 876response.EnsureSuccessStatusCode(); 939response.EnsureSuccessStatusCode(); 1005response.EnsureSuccessStatusCode(); 1070response.EnsureSuccessStatusCode(); 1122response.EnsureSuccessStatusCode();
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (2)
HubConnectionTests.cs (2)
1479httpResponse.EnsureSuccessStatusCode(); 2696httpResponse.EnsureSuccessStatusCode();
Microsoft.AspNetCore.TestHost.Tests (9)
RequestLifetimeTests.cs (2)
65response.EnsureSuccessStatusCode(); 88response.EnsureSuccessStatusCode();
ResponseResetTests.cs (5)
31response.EnsureSuccessStatusCode(); 47response.EnsureSuccessStatusCode(); 63response.EnsureSuccessStatusCode(); 124response.EnsureSuccessStatusCode(); 150response.EnsureSuccessStatusCode();
TestClientTests.cs (2)
437response.EnsureSuccessStatusCode(); 484response.EnsureSuccessStatusCode();
Microsoft.AspNetCore.Tests (4)
WebApplicationTests.cs (3)
1456result.EnsureSuccessStatusCode(); 1605oldResult.EnsureSuccessStatusCode(); 1676definedResult.EnsureSuccessStatusCode();
WebHostTests.cs (1)
83result.EnsureSuccessStatusCode();
Microsoft.AspNetCore.WebSockets.ConformanceTests (1)
Autobahn\AutobahnTester.cs (1)
166resp.EnsureSuccessStatusCode();
Microsoft.Build.Tasks.Core (1)
DownloadFile.cs (1)
157response.EnsureSuccessStatusCode();
Microsoft.DotNet.Arcade.Sdk (1)
src\DownloadFile.cs (1)
166httpResponse.EnsureSuccessStatusCode();
Microsoft.DotNet.Build.Tasks.Feed (1)
src\common\AzureStorageUtils.cs (1)
257response.EnsureSuccessStatusCode();
Microsoft.DotNet.Git.IssueManager (1)
Clients\AzureDevOpsClient.cs (1)
37response.EnsureSuccessStatusCode();
Microsoft.DotNet.Helix.Sdk (5)
FindDotNetCliPackage.cs (4)
115res.EnsureSuccessStatusCode(); 214genericResponse.EnsureSuccessStatusCode(); 224specificResponse.EnsureSuccessStatusCode(); 338versionResponse.EnsureSuccessStatusCode();
StopAzurePipelinesTestRun.cs (1)
41res.EnsureSuccessStatusCode();
Microsoft.DotNet.Internal.SymbolHelper (4)
SymbolPromotionHelper.cs (3)
156regResponse.EnsureSuccessStatusCode(); 216statusResponse.EnsureSuccessStatusCode(); 272statusResponse.EnsureSuccessStatusCode();
SymbolUploadHelperFactory.cs (1)
156response.EnsureSuccessStatusCode();
Microsoft.DotNet.VersionTools (1)
BuildInfo.cs (1)
205response.EnsureSuccessStatusCode();
Microsoft.Extensions.Logging.AzureAppServices (1)
BlobAppendReferenceWrapper.cs (1)
72response.EnsureSuccessStatusCode();
Microsoft.ML.AutoML.Tests (1)
DatasetUtil.cs (1)
211var stream = await response.EnsureSuccessStatusCode().Content.ReadAsStreamAsync().ConfigureAwait(false);
Microsoft.ML.Core (2)
Utilities\ResourceManagerUtils.cs (2)
272response.EnsureSuccessStatusCode(); 280var stream = await response.EnsureSuccessStatusCode().Content.ReadAsStreamAsync().ConfigureAwait(false);
Microsoft.ML.Tokenizers (1)
Utils\Helpers.netcoreapp.cs (1)
28response.EnsureSuccessStatusCode();
OpenIdConnectSample (1)
Startup.cs (1)
262tokenResponse.EnsureSuccessStatusCode();
SocialSample (3)
Startup.cs (3)
142response.EnsureSuccessStatusCode(); 203response.EnsureSuccessStatusCode(); 331refreshResponse.EnsureSuccessStatusCode();
Sockets.FunctionalTests (5)
SocketTransportTests.cs (1)
56response.EnsureSuccessStatusCode();
src\Servers\Kestrel\test\FunctionalTests\RequestTests.cs (2)
188response.EnsureSuccessStatusCode(); 1124response.EnsureSuccessStatusCode();
src\Servers\Kestrel\test\FunctionalTests\ResponseTests.cs (2)
79response.EnsureSuccessStatusCode(); 128response.EnsureSuccessStatusCode();
Stress.AppHost (1)
ResourceBuilderExtensions.cs (1)
67response.EnsureSuccessStatusCode();
System.Net.Http (3)
System\Net\Http\HttpClient.cs (3)
190response.EnsureSuccessStatusCode(); 262response.EnsureSuccessStatusCode(); 336response.EnsureSuccessStatusCode();
System.Net.Http.Json (2)
System\Net\Http\Json\HttpClientJsonExtensions.cs (1)
85response.EnsureSuccessStatusCode();
System\Net\Http\Json\HttpClientJsonExtensions.Get.AsyncEnumerable.cs (1)
164response.EnsureSuccessStatusCode();
Templates.Mvc.Tests (1)
BlazorTemplateTest.cs (1)
111response.EnsureSuccessStatusCode();