2 instantiations of WinHttpException
System.Net.Http.WinHttpHandler (2)
System\Net\Http\WinHttpException.cs (2)
61
var e = new
WinHttpException
(error, GetErrorMessage(error, nameOfCalledFunction));
68
var e = new
WinHttpException
(error, GetErrorMessage(error, nameOfCalledFunction), innerException);
36 references to WinHttpException
System.Net.Http.WinHttpHandler (36)
System\Net\Http\WinHttpAuthHelper.cs (2)
307
WinHttpException
.ThrowExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpSetOption));
378
WinHttpException
.ThrowExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpSetCredentials));
System\Net\Http\WinHttpCookieContainerAdapter.cs (2)
68
throw
WinHttpException
.CreateExceptionUsingError(lastError, nameof(Interop.WinHttp.WinHttpAddRequestHeaders));
83
throw
WinHttpException
.CreateExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpAddRequestHeaders));
System\Net\Http\WinHttpException.cs (5)
53
public static
WinHttpException
CreateExceptionUsingLastError(string nameOfCalledFunction)
59
public static
WinHttpException
CreateExceptionUsingError(int error, string nameOfCalledFunction)
61
var
e = new WinHttpException(error, GetErrorMessage(error, nameOfCalledFunction));
66
public static
WinHttpException
CreateExceptionUsingError(int error, string nameOfCalledFunction, Exception innerException)
68
var
e = new WinHttpException(error, GetErrorMessage(error, nameOfCalledFunction), innerException);
System\Net\Http\WinHttpHandler.cs (11)
768
throw
WinHttpException
.CreateExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpAddRequestHeaders));
846
throw
WinHttpException
.CreateExceptionUsingError(lastError, nameof(Interop.WinHttp.WinHttpSetOption));
1213
throw
WinHttpException
.CreateExceptionUsingError(
1254
WinHttpException
.ThrowExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpSetTimeouts));
1537
WinHttpException
.ThrowExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpSetOption));
1554
WinHttpException
.ThrowExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpSetOption));
1566
else if (ex is
WinHttpException
|| ex is IOException || ex is InvalidOperationException)
1634
throw
WinHttpException
.CreateExceptionUsingError(lastError, nameof(Interop.WinHttp.WinHttpSetStatusCallback));
1648
throw
WinHttpException
.CreateExceptionUsingError(lastError, nameOfCalledFunction);
1674
WinHttpException
.ThrowExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpSendRequest));
1701
throw
WinHttpException
.CreateExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpReceiveResponse));
System\Net\Http\WinHttpRequestCallback.cs (5)
302
throw
WinHttpException
.CreateExceptionUsingError(lastError, "WINHTTP_CALLBACK_STATUS_SENDING_REQUEST/WinHttpQueryOption");
421
throw
WinHttpException
.CreateExceptionUsingError(
432
throw
WinHttpException
.CreateExceptionUsingError(
444
Exception innerException =
WinHttpException
.CreateExceptionUsingError(unchecked((int)asyncResult.dwError), "WINHTTP_CALLBACK_STATUS_REQUEST_ERROR");
543
throw
WinHttpException
.CreateExceptionUsingError(lastError, "WINHTTP_CALLBACK_STATUS_REDIRECT/WinHttpAddRequestHeaders");
System\Net\Http\WinHttpRequestStream.cs (2)
237
new IOException(SR.net_http_io_write,
WinHttpException
.CreateExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpWriteData))));
258
new IOException(SR.net_http_io_write,
WinHttpException
.CreateExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpWriteData))));
System\Net\Http\WinHttpResponseParser.cs (4)
98
WinHttpException
.ThrowExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpQueryHeaders));
169
throw
WinHttpException
.CreateExceptionUsingError(lastError, nameof(Interop.WinHttp.WinHttpQueryHeaders));
196
throw
WinHttpException
.CreateExceptionUsingError(lastError, nameof(Interop.WinHttp.WinHttpQueryHeaders));
227
throw
WinHttpException
.CreateExceptionUsingError(lastError, nameof(Interop.WinHttp.WinHttpQueryHeaders));
System\Net\Http\WinHttpResponseStream.cs (4)
126
throw new IOException(SR.net_http_io_read,
WinHttpException
.CreateExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpQueryDataAvailable)));
143
throw new IOException(SR.net_http_io_read,
WinHttpException
.CreateExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpReadData)));
227
throw new IOException(SR.net_http_io_read,
WinHttpException
.CreateExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpQueryDataAvailable)));
242
throw new IOException(SR.net_http_io_read,
WinHttpException
.CreateExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpReadData)));
System\Net\Http\WinHttpTraceHelper.cs (1)
31
$"api={apiName}, error={GetNameFromError(error)}({error}) \"{
WinHttpException
.GetErrorMessage((int)error, apiName)}\"",