37 instantiations of WebSocketException
dotnet-svcutil-lib (1)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ClientWebSocketTransportDuplexSessionChannel.cs (1)
101new WebSocketException(WebSocketError.ConnectionClosedPrematurely).Message);
Microsoft.AspNetCore.Http.Connections.Tests (1)
TestWebSocketConnectionFeature.cs (1)
91_output.TryComplete(new WebSocketException(WebSocketError.ConnectionClosedPrematurely));
System.Net.HttpListener (6)
System\Net\WebSockets\HttpWebSocket.cs (6)
41throw new WebSocketException(WebSocketError.UnsupportedProtocol, 73throw new WebSocketException(WebSocketError.UnsupportedProtocol, 108throw new WebSocketException(WebSocketError.NotAWebSocket, 120throw new WebSocketException(WebSocketError.HeaderError, 128throw new WebSocketException(WebSocketError.UnsupportedVersion, 151throw new WebSocketException(WebSocketError.HeaderError,
System.Net.WebSockets (16)
System\Net\WebSockets\Compression\WebSocketDeflater.cs (3)
204throw new WebSocketException(message); 222throw new WebSocketException(SR.ZLibErrorDLLLoadError, cause); 235throw new WebSocketException(message);
System\Net\WebSockets\Compression\WebSocketInflater.cs (3)
253throw new WebSocketException(message); 268throw new WebSocketException(SR.ZLibErrorDLLLoadError, exception); 281throw new WebSocketException(message);
System\Net\WebSockets\ManagedWebSocket.cs (7)
549new WebSocketException(WebSocketError.ConnectionClosedPrematurely, exc)); 590new WebSocketException(WebSocketError.ConnectionClosedPrematurely, exc); 630new WebSocketException(WebSocketError.ConnectionClosedPrematurely, exc); 1038throw new WebSocketException(WebSocketError.ConnectionClosedPrematurely, exc); 1290new WebSocketException(error, errorMessage, innerException) : 1291new WebSocketException(error, innerException); 1620throw new WebSocketException(WebSocketError.ConnectionClosedPrematurely);
System\Net\WebSockets\ManagedWebSocket.KeepAlive.cs (1)
82new WebSocketException(WebSocketError.Faulted, SR.net_Websockets_KeepAlivePingTimeout));
System\Net\WebSockets\WebSocket.cs (1)
107throw new WebSocketException(WebSocketError.InvalidState, SR.Format(SR.net_WebSockets_InvalidState, state, validStatesText));
System\Net\WebSockets\WebSocketStateHelper.cs (1)
30throw new WebSocketException(WebSocketError.InvalidState, invalidStateMessage, innerException);
System.Net.WebSockets.Client (12)
System\Net\WebSockets\WebSocketHandle.Managed.cs (12)
85throw new WebSocketException(WebSocketError.UnsupportedProtocol); 97throw new WebSocketException(WebSocketError.UnsupportedProtocol); 170throw new WebSocketException( 222throw new WebSocketException(WebSocketError.Faulted, SR.net_webstatus_ConnectFailure, exc); 347throw new WebSocketException(WebSocketError.HeaderError, 364throw new WebSocketException(SR.Format(SR.net_WebSockets_ClientWindowBitsNegotiationFailure, 370throw new WebSocketException(SR.Format(SR.net_WebSockets_ServerWindowBitsNegotiationFailure, 455throw new WebSocketException(WebSocketError.NotAWebSocket, SR.Format(SR.net_WebSockets_ConnectStatusExpected, (int)response.StatusCode, (int)HttpStatusCode.SwitchingProtocols)); 469throw new WebSocketException(WebSocketError.NotAWebSocket, SR.Format(SR.net_WebSockets_ConnectStatusExpected, (int)response.StatusCode, (int)HttpStatusCode.OK)); 475throw new WebSocketException(WebSocketError.ConnectionClosedPrematurely); 527throw new WebSocketException(WebSocketError.HeaderError, SR.Format(SR.net_WebSockets_InvalidResponseHeader, name, hsv)); 530throw new WebSocketException(WebSocketError.Faulted, SR.Format(SR.net_WebSockets_MissingResponseHeader, name));
System.ServiceModel.Http (1)
System\ServiceModel\Channels\ClientWebSocketTransportDuplexSessionChannel.cs (1)
85new WebSocketException(WebSocketError.ConnectionClosedPrematurely).Message);
17 references to WebSocketException
dotnet-svcutil-lib (2)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ClientWebSocketTransportDuplexSessionChannel.cs (2)
124catch (WebSocketException ex) 149private static void TryConvertAndThrow(WebSocketException ex)
Interop.FunctionalTests (1)
Http2WebSocketInteropTests.cs (1)
155Assert.True(ex is WebSocketException || ex is TaskCanceledException, ex.GetType().FullName);
Microsoft.AspNetCore.Http.Connections (2)
Internal\HttpConnectionManager.cs (1)
213catch (WebSocketException ex) when (ex.InnerException is IOException)
Internal\Transports\WebSocketsServerTransport.cs (1)
173catch (WebSocketException ex) when (ex.WebSocketErrorCode == WebSocketError.ConnectionClosedPrematurely)
Microsoft.AspNetCore.Http.Connections.Tests (1)
TestWebSocketConnectionFeature.cs (1)
173catch (WebSocketException ex)
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (1)
HubConnectionTests.cs (1)
2906Assert.True(ex is TaskCanceledException || ex is WebSocketException);
Microsoft.AspNetCore.SignalR.Tests (1)
EndToEndTests.cs (1)
420await Assert.ThrowsAsync<WebSocketException>(() => connection.StartAsync().DefaultTimeout());
Microsoft.AspNetCore.SpaServices.Extensions (1)
Proxying\SpaProxy.cs (1)
254catch (WebSocketException)
Microsoft.AspNetCore.WebSockets.Tests (2)
SendReceiveTests.cs (1)
99catch (WebSocketException ex)
WebSocketMiddlewareTests.cs (1)
843Assert.True(ex is ConnectionAbortedException or WebSocketException, ex.GetType().FullName);
netstandard (1)
netstandard.cs (1)
1316[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.WebSockets.WebSocketException))]
System (1)
src\libraries\shims\System\ref\System.cs (1)
807[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.WebSockets.WebSocketException))]
System.Net.WebSockets (1)
System\Net\WebSockets\ManagedWebSocket.cs (1)
1033if (exc is WebSocketException)
System.Net.WebSockets.Client (1)
System\Net\WebSockets\WebSocketHandle.Managed.cs (1)
216if (exc is WebSocketException ||
System.ServiceModel.Http (2)
System\ServiceModel\Channels\ClientWebSocketTransportDuplexSessionChannel.cs (2)
108catch (WebSocketException ex) 249private static void TryConvertAndThrow(WebSocketException ex)