118 references to SR
System.Net.HttpListener (118)
src\libraries\Common\src\System\Net\WebSockets\WebSocketValidate.cs (8)
53
throw new ArgumentException(
SR
.Format(
SR
.net_WebSockets_InvalidCharInProtocolString, subProtocol, invalidCharDescription), nameof(subProtocol));
61
throw new ArgumentException(
SR
.Format(
SR
.net_WebSockets_ReasonNotNull,
79
throw new ArgumentException(
SR
.Format(
SR
.net_WebSockets_InvalidCloseStatusCode,
88
throw new ArgumentException(
SR
.Format(
SR
.net_WebSockets_InvalidCloseStatusDescription,
System\Net\HttpListener.cs (4)
89
throw new ArgumentException(
SR
.net_listener_cannot_set_custom_cbt, nameof(value));
126
throw new ArgumentException(
SR
.net_listener_scheme, nameof(uriPrefix));
149
throw new ArgumentException(
SR
.net_listener_host, nameof(uriPrefix));
153
throw new ArgumentException(
SR
.net_listener_slash, nameof(uriPrefix));
System\Net\HttpListenerPrefixCollection.cs (2)
44
throw new ArgumentOutOfRangeException(nameof(array),
SR
.net_array_too_small);
60
throw new ArgumentOutOfRangeException(nameof(array),
SR
.net_array_too_small);
System\Net\HttpListenerRequest.cs (8)
233
throw new InvalidOperationException(
SR
.Format(
SR
.net_listener_callinprogress, $"{nameof(GetClientCertificate)}()/{nameof(BeginGetClientCertificate)}()"));
248
throw new InvalidOperationException(
SR
.Format(
SR
.net_listener_callinprogress, $"{nameof(GetClientCertificate)}()/{nameof(BeginGetClientCertificate)}()"));
270
throw new InvalidOperationException(
SR
.Format(
SR
.net_listener_mustcall, "GetClientCertificate()/BeginGetClientCertificate()"));
272
throw new InvalidOperationException(
SR
.Format(
SR
.net_listener_mustcompletecall, "GetClientCertificate()/BeginGetClientCertificate()"));
System\Net\HttpListenerRequestUriBuilder.cs (18)
91
NetEventSource.Error(this,
SR
.Format(
SR
.net_log_listener_cant_create_uri, _cookedUriScheme, _cookedUriHost, _cookedUriPath, _cookedUriQuery));
116
NetEventSource.Error(this,
SR
.Format(
SR
.net_log_listener_cant_create_uri, _cookedUriScheme, _cookedUriHost, _rawPath, _cookedUriQuery));
164
NetEventSource.Error(this,
SR
.Format(
SR
.net_log_listener_cant_convert_raw_path, _rawPath, encoding.EncodingName));
253
NetEventSource.Error(this,
SR
.Format(
SR
.net_log_listener_cant_convert_percent_value, codePoint));
268
NetEventSource.Error(this,
SR
.Format(
SR
.net_log_listener_cant_convert_percent_value, codePoint));
273
if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(this,
SR
.Format(
SR
.net_log_listener_cant_convert_to_utf8, unicodeString, e.Message));
284
if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(this,
SR
.Format(
SR
.net_log_listener_cant_convert_percent_value, escapedCharacter));
323
if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(this,
SR
.Format(
SR
.net_log_listener_cant_convert_bytes, GetOctetsAsString(_rawOctets), e.Message));
328
if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(this,
SR
.Format(
SR
.net_log_listener_cant_convert_to_utf8, decodedString, e.Message));
System\Net\HttpListenerResponse.cs (4)
66
throw new ProtocolViolationException(
SR
.net_nochunkuploadonhttp10);
165
throw new ArgumentException(
SR
.net_WebHeaderInvalidControlChars, nameof(value));
262
throw new ArgumentException(
SR
.net_cookie_exists, nameof(cookie));
277
throw new InvalidOperationException(
SR
.net_rspsubmitted);
System\Net\HttpRequestStream.cs (8)
42
public override long Length => throw new NotSupportedException(
SR
.net_noseek);
46
get => throw new NotSupportedException(
SR
.net_noseek);
47
set => throw new NotSupportedException(
SR
.net_noseek);
50
public override long Seek(long offset, SeekOrigin origin) => throw new NotSupportedException(
SR
.net_noseek);
52
public override void SetLength(long value) => throw new NotSupportedException(
SR
.net_noseek);
54
public override void Write(byte[] buffer, int offset, int count) => throw new InvalidOperationException(
SR
.net_readonlystream);
58
throw new InvalidOperationException(
SR
.net_readonlystream);
61
public override void EndWrite(IAsyncResult asyncResult) => throw new InvalidOperationException(
SR
.net_readonlystream);
System\Net\HttpResponseStream.cs (8)
22
public override long Length => throw new NotSupportedException(
SR
.net_noseek);
26
get => throw new NotSupportedException(
SR
.net_noseek);
27
set => throw new NotSupportedException(
SR
.net_noseek);
30
public override long Seek(long offset, SeekOrigin origin) => throw new NotSupportedException(
SR
.net_noseek);
32
public override void SetLength(long value) => throw new NotSupportedException(
SR
.net_noseek);
34
public override int Read(byte[] buffer, int offset, int size) => throw new InvalidOperationException(
SR
.net_writeonlystream);
38
throw new InvalidOperationException(
SR
.net_writeonlystream);
41
public override int EndRead(IAsyncResult asyncResult) => throw new InvalidOperationException(
SR
.net_writeonlystream);
System\Net\Managed\ChunkedInputStream.cs (5)
159
throw new ArgumentException(
SR
.net_io_invalidasyncresult, nameof(asyncResult));
163
throw new InvalidOperationException(
SR
.Format(
SR
.net_io_invalidendcall, nameof(EndRead)));
171
throw new HttpListenerException((int)HttpStatusCode.BadRequest,
SR
.Format(
SR
.net_io_operation_aborted, ares._error.Message));
System\Net\Managed\HttpEndPointListener.cs (4)
267
throw new HttpListenerException((int)HttpStatusCode.BadRequest,
SR
.Format(
SR
.net_listener_already, prefix));
354
throw new HttpListenerException((int)HttpStatusCode.BadRequest,
SR
.Format(
SR
.net_listener_already, prefix));
System\Net\Managed\HttpEndPointManager.cs (6)
91
throw new HttpListenerException((int)HttpStatusCode.BadRequest,
SR
.net_invalid_port);
97
throw new HttpListenerException((int)HttpStatusCode.BadRequest,
SR
.net_listener_host);
100
throw new HttpListenerException((int)HttpStatusCode.BadRequest,
SR
.net_invalid_path);
103
throw new HttpListenerException((int)HttpStatusCode.BadRequest,
SR
.net_invalid_path);
127
throw new HttpListenerException(NotSupportedErrorCode,
SR
.net_listener_not_supported);
133
throw new HttpListenerException(NotSupportedErrorCode,
SR
.net_listener_not_supported);
System\Net\Managed\HttpListener.Managed.cs (9)
278
throw new InvalidOperationException(
SR
.Format(
SR
.net_listener_mustcall, "Start()"));
310
throw new ArgumentException(
SR
.net_io_invalidasyncresult, nameof(asyncResult));
314
throw new InvalidOperationException(
SR
.Format(
SR
.net_io_invalidendcall, nameof(EndGetContext)));
344
throw new InvalidOperationException(
SR
.Format(
SR
.net_listener_mustcall, "Start()"));
348
throw new InvalidOperationException(
SR
.Format(
SR
.net_listener_mustcall, "AddPrefix()"));
System\Net\Managed\HttpListenerRequest.Managed.cs (5)
53
throw new NotSupportedException(
SR
.Format(
SR
.net_listener_invalid_cbt_type, kind.ToString()));
363
throw new ArgumentException(
SR
.net_io_invalidasyncresult, nameof(asyncResult));
367
throw new InvalidOperationException(
SR
.Format(
SR
.net_io_invalidendcall, nameof(EndGetClientCertificate)));
System\Net\Managed\HttpListenerResponse.Managed.cs (2)
67
throw new ArgumentException(
SR
.net_wrongversion, nameof(value));
82
throw new ProtocolViolationException(
SR
.net_invalidstatus);
System\Net\Managed\HttpRequestStream.Managed.cs (3)
172
throw new ArgumentException(
SR
.net_io_invalidasyncresult, nameof(asyncResult));
176
throw new InvalidOperationException(
SR
.Format(
SR
.net_io_invalidendcall, nameof(EndRead)));
System\Net\Managed\ListenerAsyncResult.Managed.cs (2)
70
_exception = new HttpListenerException((int)HttpStatusCode.InternalServerError,
SR
.net_listener_close);
170
Complete(new HttpListenerException((int)HttpStatusCode.Unauthorized,
SR
.net_listener_auth_errors));
System\Net\Managed\ListenerPrefix.cs (1)
110
throw new ArgumentException(
SR
.net_listener_host);
System\Net\ServiceNameStore.cs (8)
148
if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this,
SR
.Format(
SR
.net_log_listener_spn_add, spn, uriPrefix));
158
NetEventSource.Info(this,
SR
.Format(
SR
.net_log_listener_spn_not_add, uriPrefix));
182
NetEventSource.Info(this,
SR
.Format(
SR
.net_log_listener_spn_remove, newServiceName, uriPrefix));
186
NetEventSource.Info(this,
SR
.Format(
SR
.net_log_listener_spn_not_remove, uriPrefix));
System\Net\WebSockets\HttpWebSocket.cs (13)
42
SR
.Format(
SR
.net_WebSockets_ClientAcceptingNoProtocols, subProtocol));
74
SR
.Format(
SR
.net_WebSockets_AcceptUnsupportedProtocol,
103
throw new PlatformNotSupportedException(
SR
.net_WebSockets_UnsupportedPlatform);
109
SR
.Format(
SR
.net_WebSockets_AcceptNotAWebSocket,
121
SR
.Format(
SR
.net_WebSockets_AcceptHeaderNotFound,
129
SR
.Format(
SR
.net_WebSockets_AcceptUnsupportedWebSocketVersion,
152
SR
.Format(
SR
.net_WebSockets_AcceptHeaderNotFound,