views:

149

answers:

1

I'm trying to add a service reference to my silverlight project from a file stored on my hosting server. When I put the link in I get the following error:

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�

Can anyone tell me what the problem is? The XML file hasn't been altered in anyway, I'm new to all this so I'm a bit lost at the minute.

Thanks in advance,

Lloyd

+1  A: 

You are pointing at the URL http://www.lloydp.co.uk/Test/WcfRectangleService.dll -- note the .dll extension. This is the internal code for the service. So the web server is returning a bunch of binary code rather than a XML document.

Point at the .svc file instead -- this is the service endpoint.

itowlson
Thanks for that. I've changed it to the .svc file and I'm getting an error about the second character being %
ThePower
better post the (first part of) the svc then.
Henk Holterman
Sounds like your Web server is returning the .svc file contents directly instead of interpreting this as a Web service request. This is probably a Web server configuration issue -- the .svc file extension is not associated with the .NET runtime. Is the .NET framework installed on the Web server?
itowlson