Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Windows Communication Foundation
|
Windows Communication Foundation Discussion of the beta version of Windows Communication Foundation formerly know as codename "Indigo"
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Windows Communication Foundation section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 24th, 2009, 04:06 PM
Registered User
 
Join Date: Aug 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error: Metadata contains a reference that cannot be resolved

Environment - Vista Ultimate, VS2008

Taking the WCF Example from Chapter 5...

If you create the host using code, the next step in the book is to create the client.

In the client you Service Reference the TCP and NamedPipe endpoints.

The issue is, when you create the endpoints in code, you are able to create the service references in the client.

If you change the Host from code to using the appl.config file and run it, the client still runs correctly with no changes.

Now, you delete the Service Reference in the Client and try to re-create the Service References and it fails with the following errors.

TCP:

Metadata contains a reference that cannot be resolved: 'net.tcp://localhost:8000/TcpBinding'.
The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:04:59.7920055'.
An existing connection was forcibly closed by the remote host
If the service is defined in the current solution, try building the solution and adding the service reference again.

NamedPipe:

Metadata contains a reference that cannot be resolved: 'net.pipe://localhost/NetNamedPipeBinding'.
There was an error reading from the pipe: The pipe has been ended. (109, 0x6d).
There was an error reading from the pipe: The pipe has been ended. (109, 0x6d).
If the service is defined in the current solution, try building the solution and adding the service reference again.


So...You return to the host, hookup the hard coded end points, fire it off, and you are then again able to create the Service References in the client.

It appears it needs an endpoint such as...

<endpoint contract="IMetadataExchange" binding="netTcpBinding" address="net.tcp://localhost:8000/TcpBinding/mex" />

<endpoint contract="IMetadataExchange" binding="netNamedPipeBinding" address="net.pipe://localhost/NetNamedPipeBinding/mex" />

This does not do the trick.

Anyone know the trick to make this Host expose the endpoints for the client to reference?

As a note, this would be a good addition to the WCF book as an issue a developer might run into when creating their own WCF service, host, client. The steps above would be exactly what they would need to produce this error. Then the result and reasons, etc.

Thank you.

Richard Loba
RichLoba@hotmail.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Unexpected error writing metadata to file, The directory name is invalid aveekb ASP.NET 1.0 and 1.1 Professional 0 July 30th, 2009 03:46 AM
[Resolved] Error calling a sp - parameter error snufse .NET Framework 2.0 2 February 12th, 2008 04:46 PM
(Resolved) TableAdapter Error ksamuel Pro Visual Basic 2005 1 January 16th, 2008 01:03 PM
Error: Invalid PInvoke metadata format shahchi1 General .NET 1 May 26th, 2004 08:16 AM
metadata error question beertv Dreamweaver (all versions) 5 November 13th, 2003 01:39 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.