I am preparing a small talk & demo on WCF streaming and I’ve tried a lot of things to get it started and working (the practical demo).
I was trying to showcase uploading and downloading large files, in an async manner with progress report and so on.
Turns out I get an exception, with HTTP code 400 Bad request no matter what I’ve tried :
- transferMode : StreamedRequest, StreamedResponse or Streamed (Buffered works but it’s not streaming so…)
- Tried using MessageContracts or plain Stream’s
- .NET Framework 3.5 or 4.0
- .. and many other things.
What was the issue? Well the damn development server (code named Cassini) !!! It seems another guy had the same issue, reported on StackOverflow and I was lucky to find it in the large WCF pile.
Running the same server project on the new IIS Express or plain old IIS makes it work.
Hope this will help someone too.. At all costs avoid Cassini (“ASP.NET Development Server”). This is not the first issue that this damn server introduces and surely not the last. I hope Visual Studi vNext will NOT include it anymore and will ship with IIS Express only.