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