Reputation: 251
I'm trying to send requests from Fiddler to my WCF webservice.
When I send HTTP/1.2 requests it works, but when I try to send HTTP/2 requests I get the response:
HTTP Error 505. The HTTP Version in the request is not supported
My contract is defined like this:
[WebInvoke(Method = "POST", UriTemplate = "/GetEmployees", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
string GetEmployees(Stream jsonParameter);
My endpoint is defined like this:
<endpoint address="XMLService" behaviorConfiguration="restPoxBehavior"
binding="webHttpBinding" bindingConfiguration="" contract="WCF_SOAP_REST_Service.IService" />
<behavior name="restPoxBehavior">
<webHttp />
</behavior>
What am i doing wrong?
Upvotes: 1
Views: 1428
Reputation: 2764
I was looking at differences in http/2 (en.wikipedia.org/wiki/HTTP/2) and see two significant changes 1) Doesn't support http 1.1 chunk mode 2) Uses TLS 1.2 or later (which is TLS 1.3). The fiddler sniffer features should work with any connection (although the decoding of new protocols may not get decoded). The fiddler connection tools will not work if it is sending chunk mode 1.1 or using older TLS 1.1. so it means you cant test your http/2 wcf service with fiddler. try browsers like firefox or ... Im not sure but i guess i implemet the http/2 on wcf. here you can read ore.
Upvotes: 0
Reputation: 151584
What am i doing wrong?
You're using an outdated API. Don't use WCF REST, use ASP.NET WebAPI for new REST services.
The latter is hosting-agnostic, so as soon as you can find a web server supporting HTTP/2 and WebAPI (through OWIN or others), you can run your REST API on HTTP/2.
Upvotes: 0