Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 27852

Encoded 'BEL' character in XML causes HTTP 400 error?

$
0
0

We have a WebService with several methods that accept a DataTable as an input.  A user reported that he was seeing an error, logs showed that a System.Net.WebException was being thrown, indicating HTTP status is 400 -- bad request.

Upon painstaking examination I discovered that the culprit was the presence of hex character 0x07 (the BEL character of yester year) properly encoded in the content.  For example:

<JobTitle>Manager, Economic &#x7; Community Development</JobTitle>

Clearly this is valid XML, and System.DataTable likes it just fine.  Could someone please tell me how this, in the body of an HTTP POST request, makes it a 'BAD' request?

tia,

Mark McGinty


Viewing all articles
Browse latest Browse all 27852

Trending Articles



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