Domanda

Sto cercando di aggiungere un riferimento al servizio al mio progetto silverlight da un file archiviato sul mio server di hosting. Quando inserisco il collegamento ottengo il seguente errore:

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�

Qualcuno può dirmi qual è il problema? Il file XML non è stato modificato in alcun modo, sono nuovo in tutto questo, quindi sono un po 'perso al momento.

Grazie in anticipo,

Lloyd

È stato utile?

Soluzione

Stai indicando l'URL http://www.lloydp.co.uk /Test/WcfRectangleService.dll - annota l'estensione .dll. Questo è il codice interno per il servizio. Quindi il web server sta restituendo un sacco di codice binario piuttosto che un documento XML.

Indica invece il file .svc: questo è l'endpoint del servizio.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top