我正在尝试从托管服务器上存储的文件中为我的silverlight项目添加服务引用。当我把链接放入时,我收到以下错误:
The document at the url http://www.lloydp.co.uk/Test/WcfRectangleService.dll was not recognized as a known document type.
The error message from each known type may help you fix the problem:
- Report from 'DISCO Document' is 'Data at the root level is invalid. Line 1, position 1.'.
- Report from 'WSDL Document' is 'There is an error in XML document (1, 1).'.
- Data at the root level is invalid. Line 1, position 1.
- Report from 'XML Schema' is 'Data at the root level is invalid. Line 1, position 1.'.
Metadata contains a reference that cannot be resolved: 'http://www.lloydp.co.uk/Test/WcfRectangleService.dll'.
The content type application/octet-stream of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: 'MZ�
谁能告诉我这是什么问题?无论如何,XML文件还没有改变,我对这一切都不熟悉,所以我有点迷失了。
提前致谢,
劳埃德
答案 0 :(得分:1)
您指向网址http://www.lloydp.co.uk/Test/WcfRectangleService.dll - 请注意.dll扩展名。这是服务的内部代码。因此,Web服务器返回一堆二进制代码而不是XML文档。
指向.svc文件 - 这是服务端点。