-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Failed assert in NegotiateStream_StreamToStream_Authentication_TargetName_Success #18557
Copy link
Copy link
Closed
Closed
Copy link
Description
I hit this assert when I try to run the System.Net.Security tests (outerloop) locally:
System.Net.Security.Tests.NegotiateStreamStreamToStreamTest.NegotiateStream_StreamToStream_Authentication_TargetName_Success [FAIL]
System.Diagnostics.Debug+DebugAssertException : Unknown Interop.SecurityStatus value: -2146892976
at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Environment.get_StackTrace()
at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage)
at System.Net.SecurityStatusAdapterPal.GetSecurityStatusPalFromInterop(SecurityStatus win32SecurityStatus) in c:\Users\stoub\Source\repos\corefx\src
\System.Net.Security\src\System\Net\SecurityStatusAdapterPal.Windows.cs:line 74
at System.Net.Security.NegotiateStreamPal.InitializeSecurityContext(SafeFreeCredentials credentialsHandle, SafeDeleteContext& securityContext, Strin
g spn, ContextFlagsPal requestedContextFlags, SecurityBuffer[] inSecurityBufferArray, SecurityBuffer outSecurityBuffer, ContextFlagsPal& contextFlags) in c:\
Users\stoub\Source\repos\corefx\src\System.Net.Security\src\System\Net\NegotiateStreamPal.Windows.cs:line 166
at System.Net.NTAuthentication.GetOutgoingBlob(Byte[] incomingBlob, Boolean throwOnError, SecurityStatusPal& statusCode) in c:\Users\stoub\Source\re
pos\corefx\src\System.Net.Security\src\System\Net\NTAuthentication.cs:line 344
at System.Net.Security.NegoState.GetOutgoingBlob(Byte[] incomingBlob, Exception& e) in c:\Users\stoub\Source\repos\corefx\src\System.Net.Security\sr
c\System\Net\SecureProtocols\NegoState.cs:line 787
at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult) in c:\Users\stoub\Source\repos\corefx\src\System.Net.Secu
rity\src\System\Net\SecureProtocols\NegoState.cs:line 443
at System.Net.Security.NegoState.ProcessAuthentication(LazyAsyncResult lazyResult) in c:\Users\stoub\Source\repos\corefx\src\System.Net.Security\src
\System\Net\SecureProtocols\NegoState.cs:line 356
at System.Net.Security.NegotiateStream.BeginAuthenticateAsClient(NetworkCredential credential, ChannelBinding binding, String targetName, Protection
Level requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel, AsyncCallback asyncCallback, Object asyncState) in c:\Users\stoub\Source\re
pos\corefx\src\System.Net.Security\src\System\Net\SecureProtocols\NegotiateStream.cs:line 101
at System.Net.Security.NegotiateStream.BeginAuthenticateAsClient(NetworkCredential credential, String targetName, AsyncCallback asyncCallback, Objec
t asyncState) in c:\Users\stoub\Source\repos\corefx\src\System.Net.Security\src\System\Net\SecureProtocols\NegotiateStream.cs:line 60
at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl[TArg1,TArg2](Func`5 beginMethod, Func`2 endFunction, Action`1 endAction, TArg1 arg1, TArg2 arg
2, Object state, TaskCreationOptions creationOptions)
at System.Threading.Tasks.TaskFactory.FromAsync[TArg1,TArg2](Func`5 beginMethod, Action`1 endMethod, TArg1 arg1, TArg2 arg2, Object state)
at System.Net.Security.NegotiateStream.AuthenticateAsClientAsync(NetworkCredential credential, String targetName) in c:\Users\stoub\Source\repos\cor
efx\src\System.Net.Security\src\System\Net\SecureProtocols\NegotiateStream.cs:line 183
at System.Net.Security.Tests.NegotiateStreamStreamToStreamTest.NegotiateStream_StreamToStream_Authentication_TargetName_Success() in c:\Users\stoub\
Source\repos\corefx\src\System.Net.Security\tests\FunctionalTests\NegotiateStreamStreamToStreamTest.cs:line 90
According to https://msdn.microsoft.com/en-us/library/windows/desktop/dd542646(v=vs.85).aspx, that status code is SEC_E_DOWNGRADE_DETECTED ("The system cannot contact a domain controller to service the authentication request. Please try again later."). Do we need to add this error and others to the table in https://github.com/dotnet/corefx/blob/2ff9b2a1e367a9694af6bdaf9856ea12f9ae13cd/src/System.Net.Security/src/System/Net/SecurityStatusAdapterPal.Windows.cs?
Reactions are currently unavailable