You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[release/2.1] Expect100Continue with Windows auth and request body > 1024 bytes fails #26662
blockingMarks issues that we want to fast track in order to unblock other important workbugtenet-compatibilityIncompatibility with previous versions or .NET Framework
@mconnew mentioned to me offline that it is a regression 2.0->2.1
What is the impact on WCF scenarios/customers? How common are the scenarios?
Are there any workarounds on WCF side or on customer side?
(just trying to understand the scope & impact)
@mconnew mentioned to me offline that it is a regression 2.0->2.1
It could only be a regression on Linux from using CurlHandler on .NET Core 2.0 (which supported Expect: 100-continue) to using SocketsHttpHandler on .NET Core 2.1.
On Windows, with .NET Core 2.0 (WinHttpHandler), Expect: 100-continue is not supported.
@davidsh, while Expect: 100-Continue is not supported by WinHTTP in actually implementing the functionality to hold off sending the request body, if you add the Expect header, it will still functionally be able to send the request and get the response when using authentication. Now on Windows, that is no longer the case. So while the purpose of the header couldn't be used, things were still functional if you did use it. So this is a regression on Windows in that you could get a response before, you can't now.
Without it, the entire request body will be sent for the initial request and for the challenge response. If the request message is for example 10MB, that's double the data you are then sending and double the amount of time it takes to get a response. Additionally, according to the customer who saw this issue, in their testing setting Connection: Close header without Expect: 100-Continue also has the same problem.
Impact
Anybody using Windows authentication with requests > 1024 bytes. I don't know how common this is as we don't have any telemetry around which authentication method is used.
Work around
Revert to earlier release of WCF which didn't use the Expect header. In an earlier release we sent a HEAD request before every real request as an attempted mitigation to the problems caused by lack of universal support for the Expect header. So basically roll back. The prior approach with the HEAD request was only best effort and would still sometimes have problems as well as introduced new problems.
I don't know how common this is as we don't have any telemetry around which authentication method is used.
If you have customers complaining, let's use that as indicator. How many impacted so far? Is there public issue where it happens or is it internal via support?
How badly is the specific customer impacted? (RSP/SLA/other metric) Or was it just something that was noticed during testing?
Regarding workaround: Does it mean "use older WCF package"? Is that even supported scenario?
The issue where this is reported is dotnet/wcf#2923 and there's 3 customers there who have reported it. I would expect any new instances of customers having the problem would see that issue and use the workaround.
Using the older WCF package is completely supported. We aren't a part of .Net Core, we're more like a third party library which also happens to have an implementation in the full framework when your runtime is netfx. That means all earlier WCF packages can run on later versions of .NET Core. In addition to that, as we target .NET standard and not .NET Core and .NET Standard is still at 2.0, as I made sure we didn't add any usage of classes added to .NET Core 2.1 someone can use our latest package on .NET Core 2.0 and they wouldn't get any runtime type errors. They might get functional problems if there's missing capabilities in e.g. HttpClientHandler, but it should generally run fine both ways.
Additionally, according to the customer who saw this issue, in their testing setting Connection: Close header without Expect: 100-Continue also has the same problem.
Do you expect this (i.e. setting Connection: close and doing NT auth) to work?
@mconnew, I'm not entirely sure what you want us to do in this scenario. When we get an early response with Expect: 100-continue, we either need to (a) finish sending the request body, so we can keep the connection alive, or (b) close the connection and stop sending the request body.
changed the title [-]Expect100Continue with Windows auth and request body > 1024 bytes fails[/-][+][release/2.1] Expect100Continue with Windows auth and request body > 1024 bytes fails[/+]on Jul 9, 2019
blockingMarks issues that we want to fast track in order to unblock other important workbugtenet-compatibilityIncompatibility with previous versions or .NET Framework
Activity
davidsh commentedon Jun 29, 2018
cc: @stephentoub @geoffkizer
karelz commentedon Jun 30, 2018
@mconnew mentioned to me offline that it is a regression 2.0->2.1
What is the impact on WCF scenarios/customers? How common are the scenarios?
Are there any workarounds on WCF side or on customer side?
(just trying to understand the scope & impact)
davidsh commentedon Jun 30, 2018
It could only be a regression on Linux from using CurlHandler on .NET Core 2.0 (which supported
Expect: 100-continue) to using SocketsHttpHandler on .NET Core 2.1.On Windows, with .NET Core 2.0 (WinHttpHandler),
Expect: 100-continueis not supported.mconnew commentedon Jun 30, 2018
@davidsh, while Expect: 100-Continue is not supported by WinHTTP in actually implementing the functionality to hold off sending the request body, if you add the Expect header, it will still functionally be able to send the request and get the response when using authentication. Now on Windows, that is no longer the case. So while the purpose of the header couldn't be used, things were still functional if you did use it. So this is a regression on Windows in that you could get a response before, you can't now.
geoffkizer commentedon Jun 30, 2018
@mconnew, I'm curious: Why are you setting Expect: 100-continue in this scenario?
mconnew commentedon Jul 1, 2018
Without it, the entire request body will be sent for the initial request and for the challenge response. If the request message is for example 10MB, that's double the data you are then sending and double the amount of time it takes to get a response. Additionally, according to the customer who saw this issue, in their testing setting Connection: Close header without Expect: 100-Continue also has the same problem.
karelz commentedon Jul 6, 2018
@mconnew can you please answer the questions above for us to prioritize it properly?
mconnew commentedon Jul 9, 2018
Impact
Anybody using Windows authentication with requests > 1024 bytes. I don't know how common this is as we don't have any telemetry around which authentication method is used.
Work around
Revert to earlier release of WCF which didn't use the Expect header. In an earlier release we sent a HEAD request before every real request as an attempted mitigation to the problems caused by lack of universal support for the Expect header. So basically roll back. The prior approach with the HEAD request was only best effort and would still sometimes have problems as well as introduced new problems.
karelz commentedon Jul 9, 2018
If you have customers complaining, let's use that as indicator. How many impacted so far? Is there public issue where it happens or is it internal via support?
How badly is the specific customer impacted? (RSP/SLA/other metric) Or was it just something that was noticed during testing?
Regarding workaround: Does it mean "use older WCF package"? Is that even supported scenario?
mconnew commentedon Jul 11, 2018
The issue where this is reported is dotnet/wcf#2923 and there's 3 customers there who have reported it. I would expect any new instances of customers having the problem would see that issue and use the workaround.
Using the older WCF package is completely supported. We aren't a part of .Net Core, we're more like a third party library which also happens to have an implementation in the full framework when your runtime is netfx. That means all earlier WCF packages can run on later versions of .NET Core. In addition to that, as we target .NET standard and not .NET Core and .NET Standard is still at 2.0, as I made sure we didn't add any usage of classes added to .NET Core 2.1 someone can use our latest package on .NET Core 2.0 and they wouldn't get any runtime type errors. They might get functional problems if there's missing capabilities in e.g. HttpClientHandler, but it should generally run fine both ways.
mconnew commentedon Jul 11, 2018
Btw, 3 reported issues in a short period of time is quite high for WCF.
danmoseley commentedon Jul 17, 2018
@karelz if this is to go into 2.1.x it will need a mail to corefx shiproom. Do you plan to do that?
danmoseley commentedon Jul 17, 2018
Removing label until this is ready for big shiproom.
geoffkizer commentedon Jul 17, 2018
Do you expect this (i.e. setting Connection: close and doing NT auth) to work?
geoffkizer commentedon Jul 17, 2018
@mconnew, I'm not entirely sure what you want us to do in this scenario. When we get an early response with Expect: 100-continue, we either need to (a) finish sending the request body, so we can keep the connection alive, or (b) close the connection and stop sending the request body.
12 remaining items
stofte commentedon Apr 25, 2019
I just found my function app stuffed full of classes like "PatchedHttpBinding". What a mess.
davidsh commentedon Jul 9, 2019
Fixed in master for .NET Core 3.0 with PR dotnet/corefx#38744
Re-opening for release/2.1 and release/2.2 consideration.
[-]Expect100Continue with Windows auth and request body > 1024 bytes fails[/-][+][release/2.1] Expect100Continue with Windows auth and request body > 1024 bytes fails[/+]Don't close connection for responses to NT auth using 100continue (#3…
davidsh commentedon Jul 16, 2019
Fix for release/2.1 checked in with PR dotnet/corefx#39341
karelz commentedon Jul 30, 2019
The fix will be part of 2.1.13 and 2.2.7 releases.