I'm using the WCF Rest Starter Kit, and I'm able to send and receive data. I'm trying to serialize the data I receive from the service, but for whatever reason, the XML reponse from the service includes (what I'm guessing is) an invalid DTD. For example:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE response>
<response>
// blah blah
</response>
I can't get the service to change it's response (it's not my service).
In my code try to serialize it as:
var myObject = response.Content.ReadAsXmlSerializable<myObjectResponse>();
The error is: For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method.
How can I tell the serializer to ignore the DTD?