Quantcast
Channel: Service Bus forum
Viewing all articles
Browse latest Browse all 1916

application/json not working with webHttpRelayBinding / Azure

$
0
0

I have a WCF data service which allows for both xml or json.  When I hit the service directly on-premise, it works for xml or json.

When making requests for json via Azure / relay binding I get a non-descript errror “the connection was forcibly closed..”.

Request for atom/xml works fine via Azure / relay binding.

I have set message level tracing, and tested a json request and an atom request via Azure :

1.  Both requests are making it to the on-premise server, so I think I can conclude it is nothing to do with Azure or anything firewall / nat related.

2.  Both requests are processed identically as follows :

A message was read
A message was written
A message was closed

3.  The Json request has no more steps visible for the relevant activity.

4.  The atom/xml request has the following additional steps that are missing from the Json request :

Understood message header (5 times)

.....

Incoming HTTP request to URI 'https://xxxxx.servicebus.windows.net/UserService/GetUserIdByCurrentUser' matched operation 'ProcessRequestForMessage'

So it seems pretty clear that the message header for the Json request is "Not understood", which makes sense, because one of the message headers is different in the Json request:

<Content-Type xmlns="http://schemas.microsoft.com/netservices/2009/05/servicebus/web">application/json;odata=minimalmetadata;streaming=true;charset=utf-8</Content-Type>

vs

<Content-Type xmlns="http://schemas.microsoft.com/netservices/2009/05/servicebus/web">application/atom+xml;type=feed;charset=utf-8</Content-Type>






Viewing all articles
Browse latest Browse all 1916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>