locked
How to disable Expect:100-Continue when using WCF in Windows Store App

    Question

  • I need to get rid of the Expect: 100-Continue header in HTTP message, when communicating with WebService using WCF in Windows Store App. I have found a lot of solutions, but none of them is possible in Windows 8:

    1. ServicePoint.Expect100Continue = false; doesn't exist in Store App any more (No SericePoint or ServicePointManager class),
    2. It is possible to change the flag in HttpClient, but I cannot access it, when using WCF,
    3. I tried to manipulate with message headers using IClientMessageInspector, but the default HTTP headers are being added later, in higher layers, so my changes will be ovverriden.

    Does anyone have any other ideas?

    Friday, February 28, 2014 10:12 AM

Answers

  • Is there any particular reason why you want the Expect header to be removed? The client side is going to only wait for a small amount of time before it eventually sends the entity body over to the server. What is the reason you are trying to remove the Expect header for?

    The ServicePointManager.Expect100Continue property that you are trying to access is not available in a Windows Store app, so it will be good to understand why you are trying to remove that header in the first place before investigating into other options.


    Windows Store Developer Solutions, follow us on Twitter: @WSDevSol|| Want more solutions? See our blog


    Friday, February 28, 2014 8:24 PM
    Moderator

All replies

  • Is there any particular reason why you want the Expect header to be removed? The client side is going to only wait for a small amount of time before it eventually sends the entity body over to the server. What is the reason you are trying to remove the Expect header for?

    The ServicePointManager.Expect100Continue property that you are trying to access is not available in a Windows Store app, so it will be good to understand why you are trying to remove that header in the first place before investigating into other options.


    Windows Store Developer Solutions, follow us on Twitter: @WSDevSol|| Want more solutions? See our blog


    Friday, February 28, 2014 8:24 PM
    Moderator
  • The problem is that the application runs behind a proxy server that does not yet support HTTP/1.1 protocol...
    Monday, March 03, 2014 9:37 AM