114 System.
Net.
NetEventSource.
Info(
$"DisconnectAsyncResult: ThreadPoolBoundHandle.AllocateNativeOverlapped({session.RequestQueueBoundHandle}) -> {_nativeOverlapped->GetHashCode()}",
null,
".ctor");
159 System.
Net.
NetEventSource.
Info(
null,
$"errorCode: {errorCode}, numBytes: {numBytes}, nativeOverlapped: {(IntPtr)nativeOverlapped:x}",
"WaitCallback");
170 System.
Net.
NetEventSource.
Info(
this,
$"DisconnectResults {listener.DisconnectResults} removing for _connectionId: {_connectionId}",
"HandleDisconnect");
214 87, 87, 87, 45, 65, 117, 116, 104, 101, 110,
215 116, 105, 99, 97, 116, 101
289 if (
value.CustomChannelBinding !=
null)
336 public static bool IsSupported => global::Interop.HttpApi.s_supported;
364 value2.AuthenticatedConnection =
null;
416 for (i = num; i < uriPrefix.Length &&
uriPrefix[i] !=
'/' && (
uriPrefix[i] !=
':' || flag); i++)
603 global::Interop.HttpApi.HTTP_TIMEOUT_LIMIT_INFO
hTTP_TIMEOUT_LIMIT_INFO =
default(global::Interop.HttpApi.HTTP_TIMEOUT_LIMIT_INFO);
604 hTTP_TIMEOUT_LIMIT_INFO.Flags = global::Interop.HttpApi.HTTP_FLAGS.HTTP_RECEIVE_REQUEST_FLAG_COPY_BODY;
605 hTTP_TIMEOUT_LIMIT_INFO.DrainEntityBody = (ushort)
timeouts[1];
606 hTTP_TIMEOUT_LIMIT_INFO.EntityBody = (ushort)
timeouts[0];
607 hTTP_TIMEOUT_LIMIT_INFO.RequestQueue = (ushort)
timeouts[2];
608 hTTP_TIMEOUT_LIMIT_INFO.IdleConnection = (ushort)
timeouts[3];
609 hTTP_TIMEOUT_LIMIT_INFO.HeaderWait = (ushort)
timeouts[4];
625 num = global::Interop.HttpApi.HttpCreateServerSession(global::Interop.HttpApi.s_version, &
num2, 0
u);
694 uint num = global::Interop.HttpApi.HttpCloseUrlGroup(
_urlGroupId);
697 System.
Net.
NetEventSource.
Error(
this,
$"CloseV2Config {System.SR.Format(System.SR.net_listener_close_urlgroup_error, num)}",
"CleanupV2Config");
706 global::Interop.HttpApi.HTTP_BINDING_INFO
hTTP_BINDING_INFO =
default(global::Interop.HttpApi.HTTP_BINDING_INFO);
707 hTTP_BINDING_INFO.Flags = global::Interop.HttpApi.HTTP_FLAGS.HTTP_RECEIVE_REQUEST_FLAG_COPY_BODY;
715 global::Interop.HttpApi.HTTP_BINDING_INFO
hTTP_BINDING_INFO =
default(global::Interop.HttpApi.HTTP_BINDING_INFO);
716 hTTP_BINDING_INFO.Flags = global::Interop.HttpApi.HTTP_FLAGS.NONE;
717 hTTP_BINDING_INFO.RequestQueueHandle =
IntPtr.
Zero;
721 System.
Net.
NetEventSource.
Error(
this,
$"DetachRequestQueueFromUrlGroup {System.SR.Format(System.SR.net_listener_detach_error, num)}",
"DetachRequestQueueFromUrlGroup");
888 if (num == 87 &&
num3 != 0
L)
949 if (
requestMemory.RequestBlob->Headers.UnknownHeaderCount > 1000)
969 if (num != 0 && num != 997)
1007 listenerAsyncResult.EndCalled =
true;
1051 System.
Net.
NetEventSource.
Info(
this,
$"Principal: {windowsPrincipal} principal.Identity.Name: {windowsPrincipal.Identity.Name} creating request",
"HandleAuthentication");
1068 value.AuthenticatedConnection =
null;
1082 if (
value !=
null && !
value.StartOwningDisconnectHandling())
1177 byte[]
array =
null;
1179 string text2 =
null;
1228 System.
Net.
NetEventSource.
Info(
this,
$"GetOutgoingBlob returned IsCompleted: {nTAuthentication2.IsCompleted} and statusCodeNew: {statusCode}",
"HandleAuthentication");
1264 System.
Net.
NetEventSource.
Info(
this,
$"HandleAuthentication GetContextToken failed with statusCodeNew: {statusCode}",
"HandleAuthentication");
1272 System.
Net.
NetEventSource.
Info(
this,
$"HandleAuthentication creating new WindowsIdentity from user context: {token.DangerousGetHandle():x8}",
"HandleAuthentication");
1282 System.
Net.
NetEventSource.
Info(
this,
$"HandleAuthentication inserting principal: {principal} for connectionId: {connectionId}",
"HandleAuthentication");
1323 string text3 =
s.Substring(0, i);
1349 System.
Net.
NetEventSource.
Info(
this,
$"Got principal: {principal}, IdentityName: {principal.Identity.Name} for creating request.",
"HandleAuthentication");
1488 value.Session =
null;
1499 value?.FinishOwningDisconnectHandling();
1559 System.
Net.
NetEventSource.
Info(
this,
"GetChannelBindingFromTls returned null even though OS supposedly supports Extended Protection",
"GetChannelBinding");
1570 if (context.IsKerberos)
1656 if (
policy.CustomServiceNames ==
null)
1664 return policy.CustomServiceNames;
1679 if (
policy.PolicyEnforcement != 0)
1710 return error ==
System.
Net.SecurityStatusPalErrorCode.BadBinding;
1719 return error ==
System.
Net.SecurityStatusPalErrorCode.UnsupportedPreauth;
1782 if (num == 0 || num == 997)
1808 global::Interop.HttpApi.HTTP_RESPONSE
hTTP_RESPONSE =
default(global::Interop.HttpApi.HTTP_RESPONSE);
1809 hTTP_RESPONSE.Version =
default(global::Interop.HttpApi.HTTP_VERSION);
1810 hTTP_RESPONSE.Version.MajorVersion = 1;
1811 hTTP_RESPONSE.Version.MinorVersion = 1;
1819 hTTP_RESPONSE.pReason = (sbyte*)pReason;
1820 hTTP_RESPONSE.ReasonLength = (ushort)
bytes.Length;
1824 (&
hTTP_RESPONSE.Headers.KnownHeaders)[11].pRawValue = (sbyte*)pRawValue;
1826 hTTP_RESPONSE.Headers.UnknownHeaderCount =
checked((ushort)(
challenges?.Count ?? 0));
1828 global::Interop.HttpApi.HTTP_UNKNOWN_HEADER[]
array2 =
null;
1834 array2 =
new global::Interop.HttpApi.HTTP_UNKNOWN_HEADER[
hTTP_RESPONSE.Headers.UnknownHeaderCount];
1844 for (
int i = 0; i <
array.Length; i++)
1872 for (
int j = 0;
j <
array.Length;
j++)
1874 if (
array[
j].IsAllocated)
1899 IntPtr channelToken = ((global::Interop.HttpApi.HTTP_REQUEST_CHANNEL_BIND_STATUS*)(
void*)blob)->ChannelToken;
1900 return (
int)((
byte*)(
void*)
channelToken - (
byte*)(
void*)blob);
1905 return (
int)((global::Interop.HttpApi.HTTP_REQUEST_CHANNEL_BIND_STATUS*)(
void*)blob)->ChannelTokenSize;
1910 int num =
sizeof(global::Interop.HttpApi.HTTP_REQUEST_CHANNEL_BIND_STATUS) + 128;
1911 byte[]
array =
null;
1917 array =
new byte[num];
1938 num =
sizeof(global::Interop.HttpApi.HTTP_REQUEST_CHANNEL_BIND_STATUS) +
tokenSizeFromBlob2;
static readonly Microsoft.Win32.SafeHandles.SafeLocalAllocHandle Zero
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
bool ICollection< KeyValuePair< TKey, TValue > >. Remove(KeyValuePair< TKey, TValue > keyValuePair)
bool ICollection< KeyValuePair< TKey, TValue > >. Contains(KeyValuePair< TKey, TValue > keyValuePair)
void Add(TKey key, TValue value)
virtual bool Contains(object key)
virtual ICollection Values
virtual void Remove(object key)
static string ToBase64String(byte[] inArray)
static unsafe byte[] FromBase64String(string s)
static ReadOnlySpan< byte > AsciiToLower
static NetworkCredential DefaultNetworkCredentials
static bool IsFatal(Exception exception)
static readonly System.Net.SSPIAuthType SSPIAuth
HttpListenerResponse Response
AuthenticationSchemes AuthenticationSchemes
ExtendedProtectionPolicy ExtendedProtectionPolicy
HttpListenerRequest Request
static void CancelRequest(SafeHandle requestQueueHandle, ulong requestId)
readonly SafeHandle RequestQueueHandle
unsafe void CloseRequestQueueHandle()
readonly HttpListener Listener
bool CompletedSynchronously
unsafe DisconnectAsyncResult(HttpListenerSession session, ulong connectionId)
bool StartOwningDisconnectHandling()
WaitHandle AsyncWaitHandle
unsafe void IOCompleted(uint errorCode, uint numBytes, NativeOverlapped *nativeOverlapped)
WindowsPrincipal _authenticatedConnection
WindowsPrincipal AuthenticatedConnection
static unsafe void IOCompleted(DisconnectAsyncResult asyncResult, uint errorCode, uint numBytes, NativeOverlapped *nativeOverlapped)
readonly ulong _connectionId
static unsafe void WaitCallback(uint errorCode, uint numBytes, NativeOverlapped *nativeOverlapped)
System.Net.NTAuthentication Session
unsafe readonly NativeOverlapped * _nativeOverlapped
readonly HttpListenerSession _listenerSession
System.Net.NTAuthentication _session
static unsafe readonly IOCompletionCallback s_IOCallback
void FinishOwningDisconnectHandling()
static bool ScenarioChecksChannelBinding(bool isSecureConnection, ProtectionScenario scenario)
readonly ServiceNameStore _defaultServiceNames
unsafe void DetachRequestQueueFromUrlGroup()
bool ContainsPrefix(string uriPrefix)
unsafe void SetServerTimeout(int[] timeouts, uint minSendBytesPerSecond)
System.Net.ContextFlagsPal GetContextFlags(ExtendedProtectionPolicy policy, bool isSecureConnection)
AuthenticationSchemeSelector? AuthenticationSchemeSelectorDelegate
void SetUrlGroupProperty(global::Interop.HttpApi.HTTP_SERVER_PROPERTY property, IntPtr info, uint infosize)
readonly HttpListenerTimeoutManager _timeoutManager
static unsafe int GetTokenOffsetFromBlob(IntPtr blob)
bool RemovePrefix(string uriPrefix)
readonly HttpListenerPrefixCollection _prefixes
AuthenticationSchemes _authenticationScheme
Dictionary< ulong, DisconnectAsyncResult > DisconnectResults
HttpListenerTimeoutManager TimeoutManager
static readonly bool SkipIOCPCallbackOnSuccess
void ValidateV2Property()
void RemoveAll(bool clear)
IAsyncResult BeginGetContext(AsyncCallback? callback, object? state)
ExtendedProtectionSelector? ExtendedProtectionSelectorDelegate
unsafe HttpListenerContext GetContext()
static void AddChallenge(ref ArrayList challenges, string challenge)
HttpStatusCode HttpStatusFromSecurityStatus(System.Net.SecurityStatusPalErrorCode statusErrorCode)
static unsafe int GetTokenSizeFromBlob(IntPtr blob)
static unsafe void RegisterForDisconnectNotification(HttpListenerSession session, ulong connectionId, ref DisconnectAsyncResult disconnectResult)
unsafe void SetupV2Config()
ExtendedProtectionPolicy _extendedProtectionPolicy
void CloseRequestQueueHandle()
ArrayList BuildChallenge(AuthenticationSchemes authenticationScheme, ulong connectionId, out System.Net.NTAuthentication newContext, ExtendedProtectionPolicy policy, bool isSecureConnection)
unsafe HttpListenerContext HandleAuthentication(HttpListenerSession session, RequestContextBase memoryBlob, out bool stoleBlob)
static bool IsCredentialFailure(System.Net.SecurityStatusPalErrorCode error)
void SetAuthenticationHeaders(HttpListenerContext context)
AuthenticationSchemeSelector _authenticationDelegate
bool CheckSpn(System.Net.NTAuthentication context, bool isSecureConnection, ExtendedProtectionPolicy policy)
readonly object _internalLock
bool _unsafeConnectionNtlmAuthentication
static unsafe void SendError(HttpListenerSession session, ulong requestId, HttpStatusCode httpStatusCode, ArrayList challenges)
ChannelBinding GetChannelBinding(HttpListenerSession session, ulong connectionId, bool isSecureConnection, ExtendedProtectionPolicy policy)
delegate ExtendedProtectionPolicy ExtendedProtectionSelector(HttpListenerRequest request)
unsafe void AttachRequestQueueToUrlGroup()
void CreateRequestQueueHandle()
void AddPrefix(string uriPrefix)
ExtendedProtectionPolicy ExtendedProtectionPolicy
bool IgnoreWriteExceptions
ServiceNameCollection GetServiceNames(ExtendedProtectionPolicy policy)
bool UnsafeConnectionNtlmAuthentication
AuthenticationSchemes AuthenticationSchemes
static readonly byte[] s_wwwAuthenticateBytes
Task< HttpListenerContext > GetContextAsync()
void IDisposable. Dispose()
static unsafe bool ValidateRequest(HttpListenerSession session, RequestContextBase requestMemory)
HttpListenerContext EndGetContext(IAsyncResult asyncResult)
static bool IsClientFault(System.Net.SecurityStatusPalErrorCode error)
HttpListenerSession _currentSession
ExtendedProtectionSelector _extendedProtectionSelectorDelegate
void RemovePrefixCore(string uriPrefix)
bool _ignoreWriteExceptions
static unsafe ChannelBinding GetChannelBindingFromTls(HttpListenerSession session, ulong connectionId)
ServiceNameCollection DefaultServiceNames
Dictionary< ulong, DisconnectAsyncResult > _disconnectResults
static void FreeContext(ref HttpListenerContext httpContext, RequestContextBase memoryBlob)
void AddPrefixCore(string registeredPrefix)
HttpServerSessionHandle _serverSessionHandle
ICollection PrefixCollection
ulong DangerousGetServerSessionId()
static string Get(HttpStatusCode code)
static readonly System.Net.NetEventSource Log
static void Info(object thisOrContextObject, FormattableString formattableString=null, [CallerMemberName] string memberName=null)
static void Error(object thisOrContextObject, FormattableString formattableString, [CallerMemberName] string memberName=null)
static int QuerySecurityContextToken(System.Net.ISSPIInterface secModule, System.Net.Security.SafeDeleteContext context, out System.Net.Security.SecurityContextTokenHandle token)
bool Add(string uriPrefix)
bool Remove(string uriPrefix)
ServiceNameCollection ServiceNames
static void Copy(int[] source, int startIndex, IntPtr destination, int length)
static unsafe IntPtr UnsafeAddrOfPinnedArrayElement(Array arr, int index)
static int SizeOf(object structure)
IntPtr DangerousGetHandle()
static string net_log_listener_no_cbt_http
static string net_log_listener_no_spn_loopback
static string net_log_listener_no_spn_kerberos
static string net_log_listener_unmatched_authentication_scheme
static string net_log_listener_spn_failed_always
static string net_listener_cannot_set_custom_cbt
static string net_log_listener_no_spn_whensupported
static string net_log_listener_no_cbt_trustedproxy
static string net_io_invalidendcall
static string Format(string resourceFormat, object p1)
static string net_listener_host
static string net_log_listener_no_spn_disabled
static string net_log_listener_unsupported_authentication_scheme
static string net_listener_slash
static string net_listener_mustcall
static string net_log_listener_delegate_exception
static string net_log_listener_spn_failed
static string net_PropertyNotImplementedException
static string net_listener_scheme
static string net_io_invalidasyncresult
static string net_log_listener_cbt
static string net_log_listener_spn_failed_empty
static string net_log_listener_no_cbt_disabled
static string net_log_listener_spn_failed_dump
static string net_log_listener_spn_passed
static string net_log_listener_no_spn_cbt
static string net_listener_already
static string net_ssp_dont_support_cbt
static string net_log_listener_spn
static string net_listener_no_spns
override IIdentity Identity
static int CompareExchange(ref int location1, int value, int comparand)
static int Exchange(ref int location1, int value)
static new TaskFactory< TResult > Factory
static unsafe? object GetNativeOverlappedState(NativeOverlapped *overlapped)
unsafe delegate void IOCompletionCallback(uint errorCode, uint numBytes, NativeOverlapped *pOVERLAP)
static readonly IntPtr Zero
static GCHandle Alloc(object? value)