WCF Metadata, Proxies and real Proxies
I was just about to generate a client (proxy) for a WCF service on a computer (in a domain) on customer site when
svcutil.exe returned the following:
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://127.0.0.1/CallahanWeb/service.svc?wsdl If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455. WS-Metadata Exchange Error URI: http://127.0.0.1/CallahanWeb/service.svc?wsdl Metadata contains a reference that cannot be resolved: 'http://127.0.0.1/CallahanWeb/service.svc?wsdl'. <?xml version="1.0" encoding="utf-16"?><Fault xmlns="http://www.w3.org/2003/05/soap-envelope"><Code><Value> Sender </Value><Subcode><Value xmlns:a="http://schemas.xmlsoap.org/ws/2005/02/sc"> a:BadContextToken </Value></Subcode></Code><Reason><Text xml:lang="de-DE">The message could not be processed. This is most likely because the action 'http://schemas.xmlsoap.org/ws/2004/09/transfer/Get' is incorrect or because the message contains an invalid or expired security context token or because there is a mismatch between bindings. The security context token would be invalid if the service aborted the channel due to inactivity. To prevent the service from aborting idle sessions prematurely increase the Receive timeout on the service endpoint's binding.</Text></Reason></Fault> HTTP GET Error URI: http://127.0.0.1/CallahanWeb/service.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://dpc00000198.clients.eden/CallahanWeb/service.svc?wsdl=wsdl0'. - The request failed with HTTP status 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied. ). If you would like more help, type "svcutil /?"
svcutil.exe does not support http proxies that require authentication… After I disabled the proxy in IE’s settings it worked ;-)