60 references to WebExceptionStatus
dotnet-svcutil-lib (3)
Metadata\HttpAuthenticationHelper.cs (1)
52if (webException != null && webException.Status == WebExceptionStatus.ProtocolError)
Metadata\MetadaExchangeResolver.cs (2)
293throw new WebException(errorMsg, null, WebExceptionStatus.ProtocolError, webResponse); 310if (webException.Status == WebExceptionStatus.TrustFailure)
Microsoft.AspNetCore.Http.Connections.Client (1)
Internal\LongPollingTransport.cs (1)
169catch (WebException ex) when (!OperatingSystem.IsBrowser() && ex.Status == WebExceptionStatus.RequestCanceled)
Microsoft.Build.Tasks.Core (4)
DownloadFile.cs (4)
293case WebExceptionStatus.TrustFailure: 294case WebExceptionStatus.MessageLengthLimitExceeded: 295case WebExceptionStatus.RequestProhibitedByCachePolicy: 296case WebExceptionStatus.RequestProhibitedByProxy:
Microsoft.Build.Tasks.UnitTests (1)
DownloadFile_Tests.cs (1)
217throw new WebException("Error", WebExceptionStatus.ReceiveFailure);
Microsoft.Extensions.Diagnostics.ExceptionSummarization (4)
HttpExceptionSummaryProvider.cs (4)
24private static readonly FrozenDictionary<WebExceptionStatus, int> _webExceptionStatusMap; 52var webStatuses = new Dictionary<WebExceptionStatus, int>(); 54foreach (var status in Enum.GetValues<WebExceptionStatus>())
netstandard (1)
netstandard.cs (1)
1302[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.WebExceptionStatus))]
PresentationCore (2)
MS\Internal\WpfWebRequestHelper.cs (1)
88throw new WebException(requestUri.ToString(), WebExceptionStatus.RequestCanceled);
System\IO\Packaging\PackWebResponse.cs (1)
901_responseException = new WebException(SR.Format(SR.WebRequestTimeout, null), WebExceptionStatus.Timeout);
System (1)
src\libraries\shims\System\ref\System.cs (1)
792[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.WebExceptionStatus))]
System.Net (1)
System.Net.cs (1)
52[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.WebExceptionStatus))]
System.Net.HttpListener (1)
System\Net\Managed\ChunkStream.cs (1)
392WebException we = new WebException(message, null, WebExceptionStatus.ServerProtocolViolation, null);
System.Net.Requests (39)
System\Net\CommandStream.cs (7)
133protected static Exception GenerateException(string message, WebExceptionStatus status, Exception? innerException) 145innerException, WebExceptionStatus.ProtocolError, null); 319exception = GenerateException(SR.net_ftp_protocolerror, WebExceptionStatus.ServerProtocolViolation, null); 546throw GenerateException(SR.net_ftp_receivefailure, WebExceptionStatus.ReceiveFailure, e); 582throw GenerateException(SR.net_ftp_protocolerror, WebExceptionStatus.ServerProtocolViolation, null); 591throw GenerateException(SR.net_ftp_protocolerror, WebExceptionStatus.ServerProtocolViolation, null); 605throw GenerateException(SR.net_ftp_protocolerror, WebExceptionStatus.ServerProtocolViolation, null);
System\Net\FileWebRequest.cs (6)
112new WebException(SR.Format(SR.net_requestaborted, WebExceptionStatus.RequestCanceled), WebExceptionStatus.RequestCanceled); 261throw new WebException(SR.net_webstatus_Timeout, WebExceptionStatus.Timeout); 277throw new WebException(SR.net_webstatus_Timeout, WebExceptionStatus.Timeout); 468throw new WebException(SR.Format(SR.net_requestaborted, WebExceptionStatus.RequestCanceled), WebExceptionStatus.RequestCanceled);
System\Net\FileWebResponse.cs (1)
45throw new WebException(e.Message, e, WebExceptionStatus.ConnectFailure, null);
System\Net\FtpControlStream.cs (4)
115throw new WebException(SR.net_ftp_active_address_different, WebExceptionStatus.ProtocolError); 261throw new WebException(SR.net_InvalidStatusCode, WebExceptionStatus.ProtocolError); 748throw new WebException(SR.net_ftp_active_address_different, WebExceptionStatus.ProtocolError); 1141throw GenerateException(SR.net_ftp_protocolerror, WebExceptionStatus.ProtocolError, e); // could not open data connection
System\Net\FtpWebRequest.cs (4)
922SetException(ExceptionDispatchInfo.SetCurrentStackTrace(new WebException(SR.net_timeout, WebExceptionStatus.Timeout))); 941return new WebException(SR.net_webstatus_NameResolutionFailure, WebExceptionStatus.NameResolutionFailure); 945return new WebException(SR.net_webstatus_ConnectFailure, WebExceptionStatus.ConnectFailure); 1116_exception = new WebException(SR.Format(SR.net_ftp_servererror, connection.StatusLine), exception, WebExceptionStatus.ProtocolError, _ftpWebResponse);
System\Net\HttpWebRequest.cs (4)
1264WebExceptionStatus.ProtocolError, 1314throw new WebException(SR.CacheEntryNotFound, WebExceptionStatus.CacheEntryNotFound); 1370throw new WebException(SR.CacheEntryNotFound, WebExceptionStatus.CacheEntryNotFound); 1570throw new WebException(SR.net_reqaborted, WebExceptionStatus.RequestCanceled);
System\Net\WebException.cs (12)
17private const WebExceptionStatus DefaultStatus = WebExceptionStatus.UnknownError; 19private readonly WebExceptionStatus _status = DefaultStatus; 36public WebException(string? message, WebExceptionStatus status) : 43WebExceptionStatus status, 63public WebExceptionStatus Status => _status; 96WebExceptionStatus.Timeout, 103private static WebExceptionStatus GetStatusFromExceptionHelper(HttpRequestException ex) 109return WebExceptionStatus.UnknownError; 112WebExceptionStatus status; 117status = WebExceptionStatus.NameResolutionFailure; 120status = WebExceptionStatus.UnknownError;
System\Net\WebExceptionPal.Unix.cs (1)
10internal static WebExceptionStatus GetStatusFromException(HttpRequestException ex)
System.Net.WebClient (2)
System\Net\WebClient.cs (2)
839throw new WebException(SR.net_webstatus_MessageLengthLimitExceeded, WebExceptionStatus.MessageLengthLimitExceeded); 886throw new WebException(SR.net_webstatus_MessageLengthLimitExceeded, WebExceptionStatus.MessageLengthLimitExceeded);