metadataPublishing required on Service Behavior


If you tried generating the proxy against the STS sample this is what you end up with.


Microsoft (R) Service Model Metadata Tool
[Microsoftr .NET Framework, Version 3.0.50727.357]
Copyright (c) Microsoft Corporation.  All rights reserved.


Error: Unable to obtain Metadata from http://localhost/FederationSample/BookstoreService/store.svc


WS-MetadataExchange Error
    Uri:
http://localhost/FederationSample/BookstoreService/store.svc
    Metadata contains a reference that cannot be resolved: ‘http://localhost/FederationSample/Bookst
oreService/store.svc’.
    There was no endpoint listening at
http://localhost/FederationSample/BookstoreService/store.svc
that could accept the message.  This could be caused by an incorrect address or SOAP action, among o
ther things. See InnerException, if present, for more details.
    The remote server returned an error: (404) Not Found.


HTTP GET Error
    Uri:
http://localhost/FederationSample/BookstoreService/store.svc
    The document at the url http://localhost/FederationSample/BookstoreService/store.svc was not rec
ognized as a known document type.
The error message from each known type may help you fix the problem:
– Report from ‘DISCO Document’ is ‘Root element is missing.’.
– Report from ‘WSDL Document’ is ‘There is an error in XML document (0, 0).’.
  – Root element is missing.
– Report from ‘XML Schema’ is ‘Root element is missing.’.


If you would like more help, please type “svcutil /?”


Basically the point is the metadataPublishing configuration has to be set explicitly on the service behavior since the Feb CTP bits and this should get you through.


<metadataPublishing enableMetadataExchange=true
                 enableGetWsdl=true

                 enableHelpPage=true></metadataPublishing>

Comments (0)