Tuesday 11 January 2011

Cannot obtain Metadata from http://IPAddress/Service/default.svc?wsdl ----DNS Settings

C:\Program Files\Microsoft Visual Studio 8\VC>svcutil /t:metadata http://192.168.1.51/MBPublicScheme/default.svc?wsdl
Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.30]
Copyright (c) Microsoft Corporation. All rights reserved.

Attempting to download metadata from 'http://192.168.1.51/MBPublicScheme/default.svc?wsdl' using WS-Metadata Exchange or DISCO.
Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.30]
Copyright (c) Microsoft Corporation. All rights reserved.

Error: Cannot obtain Metadata from http://192.168.1.51/MBPublicScheme/default.svc?wsdl

If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata pu
blishing at the specified address. For help enabling metadata publishing, please refer to the MSDN documentation at http://go.mic
rosoft.com/fwlink/?LinkId=65455.


WS-Metadata Exchange Error
URI: http://192.168.1.51/MBPublicScheme/default.svc?wsdl

Metadata contains a reference that cannot be resolved: 'http://192.168.1.51/MBPublicScheme/default.svc?wsdl'.

Content Type application/soap+xml; charset=utf-8 was not supported by service http://192.168.1.51/MBPublicScheme/default.svc?w
sdl. The client and service bindings may be mismatched.

The remote server returned an error: (415) Cannot process the message because the content type 'application/soap+xml; charset=
utf-8' was not the expected type 'text/xml; charset=utf-8'..


HTTP GET Error
URI: http://192.168.1.51/MBPublicScheme/default.svc?wsdl

The document was understood, but it could not be processed.
- The WSDL document contains links that could not be resolved.
- There was an error downloading 'http://s2-utdsrv07/MBPublicScheme/default.svc?xsd=xsd0'.
- The remote name could not be resolved: 's2-utdsrv07'

If you would like more help, type "svcutil /?"




Solution :

I did added the IpAddress of the machine to the DNS Manager and it worked fine for me.

If you want to use IPAddress of the machine instead of machine name in wsdl file :

Go to IIS..


Right Click on Default Website --> Edit Binings --> Host Name : IP Address of the Machine.


Or
Go to C:\WINDOWS\system32\drivers\etc\hosts.txt file
and add an entry for the machine and IPAddress.

No comments:

Post a Comment