• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 375
  • Last Modified:

Adding a web reference to a project

I am trying to add a reference to a webservice (not one I created, its off somewhere else).  When I try and add the reference I get the message:

"Metadata publishing for this service is currently disabled" (see details in code section below)

Is this somethign I am doing wrong?  Or is it something that needs to be changed on the other end?
Service
 
 
This is a Windows© Communication Foundation service.
 
Metadata publishing for this service is currently disabled.
 
If you have access to the service, you can enable metadata publishing by completing the following steps to modify your web or application configuration file:
 
1. Create the following service behavior configuration, or add the <serviceMetadata> element to an existing service behavior configuration:
 
<behaviors>
    <serviceBehaviors>
        <behavior name="MyServiceTypeBehaviors" >
            <serviceMetadata httpGetEnabled="true" />
        </behavior>
    </serviceBehaviors>
</behaviors>
 
2. Add the behavior configuration to the service:
 
<service name="MyNamespace.MyServiceType" behaviorConfiguration="MyServiceTypeBehaviors" >
 
Note: the service name must match the configuration name for the service implementation.
 
3. Add the following endpoint to your service configuration:
 
<endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
 
Note: your service must have an http base address to add this endpoint.
 
The following is an example service configuration file with metadata publishing enabled:
 
<configuration>
    <system.serviceModel>
 
        <services>
            <!-- Note: the service name must match the configuration name for the service implementation. -->
            <service name="MyNamespace.MyServiceType" behaviorConfiguration="MyServiceTypeBehaviors" >
                <!-- Add the following endpoint.  -->
                <!-- Note: your service must have an http base address to add this endpoint. -->
                <endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
            </service>
        </services>
 
        <behaviors>
            <serviceBehaviors>
                <behavior name="MyServiceTypeBehaviors" >
                    <!-- Add the following element to your service behavior configuration. -->
                    <serviceMetadata httpGetEnabled="true" />
                </behavior>
            </serviceBehaviors>
        </behaviors>
 
    </system.serviceModel>
</configuration>
 
For more information on publishing metadata please see the following documentation: http://go.microsoft.com/fwlink/?LinkId=65455.

Open in new window

0
BobBarker_99
Asked:
BobBarker_99
  • 3
  • 2
1 Solution
 
Anurag ThakurTechnical ManagerCommented:
try this one out - might be helpful
0
 
BobBarker_99Author Commented:
Yes I have read that, but is that something I need to do on my end?  Or is it something the owner of the webservice needs to do on their end?
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
Mikal613Commented:
whoever is hosting the service
0
 
Anurag ThakurTechnical ManagerCommented:
the following clearly states that it has to done on the web service front

Metadata publishing is no longer enabled by default for WCF services. You must now explicitly configure metadata endpoints for your service by adding the ServiceMetadataBehavior (from System.ServiceModel.Description namespace) to your service and adding a IMetadataExchange-based endpoint using the standard mechanisms for adding endpoints to a WCF service.
0
 
Mikal613Commented:
"whoever is hosting the service" They have access to the Service
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now