I have a wcf webservice which is up and running. I have also visual studio 2012. I try to follow these tutorial to consume the wcf webservice in a console application:
http://www.csharptutorial.in/2012/01/cnet-how-to-consume-wcf-web-service-in.html#.UxxME_6x6JA
One of the first step is to running this SvcUtil.exe commando:
C:\WcfFiles>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\SvcUtil.exe" http s://service.mycompany.nl/PortalService.svc?wsdl
I got this error:
Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.648]
Copyright (c) Microsoft Corporation. All rights reserved.
Attempting to download metadata from 'https://service.mycompany.nl/PortalServic
e.svc?wsdl' using WS-Metadata Exchange or DISCO.
Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.648]
Copyright (c) Microsoft Corporation. All rights reserved.
Error: Cannot obtain Metadata from https://service.mycompany.nl/PortalService.s
vc?wsdl
If this is a Windows (R) Communication Foundation service to which you have acce
ss, please check that you have enabled metadata publishing at the specified addr
ess. For help enabling metadata publishing, please refer to the MSDN documentat
ion at http://go.microsoft.com/fwlink/?LinkId=65455.
WS-Metadata Exchange Error
URI: https://service.mycompany.nl/PortalService.svc?wsdl
Metadata contains a reference that cannot be resolved: 'https://service.mycompany.nl/PortalService.svc?wsdl'.
The HTTP request is unauthorized with client authentication scheme 'Anonymou
s'. The authentication header received from the server was 'Basic realm="service
.mycompany.nl"'.
The remote server returned an error: (401) Unauthorized.
HTTP GET Error
URI: https://service.mycompany.nl/PortalService.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 'https://sehapp01.dmz.rubicongroup.local/SEHP
ortalService.svc?wsdl=wsdl0'.
- The underlying connection was closed: Could not establish trust relationship
for the SSL/TLS secure channel.
- The remote certificate is invalid according to the validation procedure.
If you would like more help, type "svcutil /?"
C:\WcfFiles>