开发者

Adding WCF reference error

开发者 https://www.devze.com 2023-02-16 04:14 出处:网络
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.

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/M开发者_如何学PythonediatorAccounting.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!


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.


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消