2

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!

1
  • What binding does the WCF service use? In order to be visible to .NET 2.0, WCF must use basicHttpBinding. Nov 14, 2011 at 18:11

3 Answers 3

1

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.

0

Does it work without ?wsdl suffix? Maybe it tries to add wsdl istelf, not the service of it.

0
-2

Try changing to the server name in config instead of "localhost".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.