Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Conversation

@davidsh
Copy link
Contributor

@davidsh davidsh commented Sep 2, 2016

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.

Fixes #11266

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.

Fixes #11266
@davidsh
Copy link
Contributor Author

davidsh commented Sep 2, 2016

Test Outerloop Windows_NT Debug please
Test Outerloop Windows_NT Release please
Test Outerloop Ubuntu14.04 Debug Build and Test
Test Outerloop Ubuntu14.04 Release Build and Test

@davidsh
Copy link
Contributor Author

davidsh commented Sep 2, 2016

cc: @stephentoub @CIPop

@stephentoub
Copy link
Member

LGTM

@davidsh
Copy link
Contributor Author

davidsh commented Sep 2, 2016

Test Innerloop Ubuntu14.04 Debug Build and Test (Microsoft.Framework.WebEncoders.TextEncoderSettingsTests.ForbidRange)

@davidsh
Copy link
Contributor Author

davidsh commented Sep 2, 2016

Test OuterLoop Ubuntu14.04 Release Build and Test (segmentation fault)

@davidsh
Copy link
Contributor Author

davidsh commented Sep 2, 2016

Azure networking congestion for this CI run (""A task was canceled.")
http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/outerloop_ubuntu14.04_release_prtest/8/

@davidsh
Copy link
Contributor Author

davidsh commented Sep 2, 2016

Test OuterLoop Ubuntu14.04 Release

@davidsh davidsh merged commit c5c8afe into dotnet:master Sep 3, 2016
@davidsh davidsh deleted the winhttp_setcredential branch September 3, 2016 00:17
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…tial

Fix WinHttpHandler for Basic auth with default credentials

Commit migrated from dotnet/corefx@c5c8afe
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"WinHttpException: The parameter is incorrect" when server return 401

3 participants