WinHttpRequestCallback.OnRequestSendingRequest was throwing ERROR_WINHTTP_INCORRECT_HANDLE_STATE when trying
to retrieve the WINHTTP_OPTION_SERVER_CERT_CONTEXT during custom server certificate validation. This problem
would repro when POST'ing a request body to a secure (TLS/SSL) server thru an authenticating proxy.
The error was being returned because the request handle was not yet bound to a secure connection. This occurs
while connecting thru a proxy where the CONNECT verb hasn't yet been processed due to the proxy requiring
authentication. Discussions with the WinHTTP team confirmed this analysis and fix.
The fix is to ignore this notification when getting this error. Another notification will be sent once the final
secure connection thru the proxy is completed.
Fixesdotnet/corefx#11973
Commit migrated from https://github.com/dotnet/corefx/commit/9cfe9e3d8fe760fe4970ffd0aab21879c92902c8
Remove references to all depprojs where the exact same file can be
included via harvesting.
Remove all depproj's that are no longer referenced.
The only depprojs that remain are those that are required for live p2p
references.
Commit migrated from https://github.com/dotnet/corefx/commit/d5ea64de4e7092aed686faabfa2a638fe7a322b8
Ports the .NET Framework implementation to corefx and adds some tests. There is a large portion of the implementation that's internal and not actually reachable from the exposed surface area, but exists to support SmtpClient. I've left that code in so as to enable subsequent porting of System.Net.Mail; at that point, we may want to combine all of this into a System.Net.Mail contract, but for now I've left it in a System.Net.Mime one.
Commit migrated from https://github.com/dotnet/corefx/commit/9594452b79f80f1262c6586ff8f2f5c21fb18ee2
Pick up buildtools version that enables redistributing reference dlls.
For 3 packages we needed to explicitly preserve the latest ref since
these packages use netstandard assets to support desktop.
The package index is also updated to account for versions which no
longer appear in packages.
Commit migrated from https://github.com/dotnet/corefx/commit/c8ea1c32f6db4d5803b09e9b642cbf58aabc1c9e
The latest Windows 10 preview builds contain enough functionality in Ubuntu/Bash on Windows (a.k.a. Windows Subsystem for Linux, or WSL) that .NET Core mostly works now. With the fix for dotnet/corefx#11058, we can even build/test the CoreFx tree in this environment. Currently there are a few test failures; I've been working on identifying the causes of these, and filing bugs in the appropriate repos.
This change implements workarounds for all of the current known issues in the "inner loop" tests. Mostly, I've just conditionally disabled tests when running in the WSL environment.
There is still an issue, under investigation, causing non-deterministic failures in the System.Net.Http tests (Microsoft/BashOnWindowsdotnet/corefx#1068). And I haven't tried OuterLoop runs of anything but the networking tests.
Commit migrated from https://github.com/dotnet/corefx/commit/d9aa92f6616d851256339318aadb89a6737e6d13
WinHTTP returns an error from WinHttpQueryAuthSchemes if a server sends back a response with a scheme that isn't handled by WinHTTP. Many servers use custom auth schemes. A few don't even send a `WWW-Authenticate` header in the response at all (technically against RFC7235). To handle these cases and to match Desktop behavior, we ignore the error from WinHttpQueryAuthSchemes.
Fixesdotnet/corefx#11452 and dotnet/corefx#11456.
Commit migrated from https://github.com/dotnet/corefx/commit/ff50e500356f94c566baef786cc23e78cee870fd
We were getting an error "The parameter is incorrect" from WinHTTP when we tried to invoke default credential handling even for cases where the server doesn't use Negotiate or NTLM. Negotiate and NTLM are the only schemes that can use default credentials since they need to be transmitted via a challenge-response mechanism.
The fix here is to only set WinHTTP default credentials handling for Negotiate or NTLM schemes. Otherwise, it should behave as-if there were no credentials set.
Fixesdotnet/corefx#11266
Commit migrated from https://github.com/dotnet/corefx/commit/f48eb3480c51dd5b08fe6089c8d7a5041019d1e8