Search code examples
wcfweb-services.net-2.0reference

Adding WCF reference error


When trying to add a WCF reference to .NET 2, I get the following error:

The document was understood, but it could not be processed.
- The WSDL document contains links that could not be resolved.
- DTD is prohibited in this XML document.

  • The WCF is a web service which is hosted on a remote server and I access it using internet. This is what I would like to add as a reference:
    http://1.1.1.1/AccountService/MediatorAccounting.svc?wsdl
  • When I try to add this address as a web reference to a .NET 4 project, I have no problem. ion the .Net 4.0 generated config file, I see the bindings are set to use wsHttpBinding. Is this going to cause a problem when trying to connect from a .Net 2 client to the service?
    Anyone knows what the workarounds are?

UPDATE: here's the error result when using the address without ?wsdl:

The document at the url http://1.1.1.1/AccountService/MediatorAccounting.svc was not recognized as a known document type. The error message from each known type may help you fix the problem: - Report from 'http://1.1.1.1/AccountService/MediatorAccounting.svc' is 'The documen

this is the exact unfinished error details!


Solution

  • There is no WCF on .Net 2.0. WCF first appeared first in .Net 3.0. .Net 2.0 supports ASMX web services. If you can change the service binding to basicHttpBinding on server side, that will make it compatible to ASMX web services.