Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > Windows Communication Foundation
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 03:46 PM
(Resolved) TableAdapter Error ksamuel Pro Visual Basic 2005 1 January 16th, 2008 12: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 12:39 AM



All times are GMT -4. The time now is 02:24 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.