Daniel Fisher (lennybacon.com)

SOA, DATA & THE WEB

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 /?"

Seems that svcutil does not support http proxies that require authentication... After i disabled the proxy in IE's settings it worked ;-)

WCF

« finally 0x1B LogOff 2006 »

Comments

Hi there from Israel. On reusing files in .csproj: http://weblogs.asp.net/savanness/archive/2003/07/22/10417.aspx As you can see, the meaning of the keywords Link and RelPath is counterintuitive. Cheers, Alex
Hi Daniel, I got exactly the same error, but instead of a local proxy I am using the ISA Server 2006 as a (reverse) proxy server. It might be understandable that I didn't want to disable it :-) This error isn't really often found in the web. I think it is a result of the proxy behaviour, because the ISA doesn't route the original request to my IIS Server. Or something ugly happens with the secur

Write a comment