1

I've generated code to communicate with WCF service using command:

svcutil.exe /syncOnly http://example.com/api.wsdl

In runtime I catch the exception:

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 should I do that? How can I change XmlReaderSettings?

Victor Kochetkov
  • 221
  • 2
  • 13

1 Answers1

0

I have the exact same problem. I have been struggling with this the past 3 days. I am getting this error after TLS 1.2 was enforced on the server that host my webservice.

I also noticed that the WCF data service does not give the same problem. I only have to make sure .Net Framework is 4.6 or above. I assume because WCF data service is REST is why is does not give the same error.

I also read that the xmlreadersettings must be changed. But that is nog exposed in a WCF Service???

kmuller
  • 13
  • 1
  • 4