Derik Whittaker

Syndication

News


WCF & Mex are correct, but why is my metadata not published????

Today I ran into a very interesting issue where my WCF service was not publishing my metadata… but I had the Mex endpoint setup correctly.  When I tried to hit my hosted service in a browser I received the following message

image

 

I double checked that my config was indeed correct it was…. I was at a loss for a reason for this.  Then I started to retrace my config changes steps (because this was working only a few minutes prior) and I remembered that I had removed what I thought was an empty config section which did not appear to be needed.

If you look at the config section below I assumed that since there was not a name on the behavior it was not being used so it was not needed.  But I guess I was wrong.

image

 

Once I added this back I was able to get my metadata back and test via the browser or the WcfTestClient

I both love WCF and hate WCF at the exact same time…. :)

Till next time,


Posted 06-17-2010 7:15 AM by Derik Whittaker
Filed under: ,

[Advertisement]

Comments

Dennis van der Stelt wrote re: WCF & Mex are correct, but why is my metadata not published????
on 06-18-2010 1:19 AM

Your MEX endpoint was also not configured, this is default WCF4 behavior. You can do ServiceHost host = new ServiceHost() and then host.AddDefaultEndpoints but also host.AddEndpoint(new MetaDataEndpoint ()). But you also still need to add the behavior, because that's still not addes automatically. If you know internals of WCF its logical, but from outside it's kinda weird ;)

I always like exicitely defining everything I use, instead of having some default config and/or endpoints.

Aaaargh, I typed everything in on my mobile, but it doesn't support the dragging of yout captcha control. So i've emailed this story and posted it on my desktop, hours later.

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)