[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Adding a web reference to a project

Posted on 2009-04-23
6
Medium Priority
?
371 Views
Last Modified: 2012-05-06
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
Comment
Question by:BobBarker_99
  • 3
  • 2
6 Comments
 
LVL 26

Expert Comment

by:Anurag Thakur
ID: 24222344
try this one out - might be helpful
0
 

Author Comment

by:BobBarker_99
ID: 24224938
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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
LVL 48

Accepted Solution

by:
Mikal613 earned 2000 total points
ID: 24224959
whoever is hosting the service
0
 
LVL 26

Expert Comment

by:Anurag Thakur
ID: 24225604
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
 
LVL 48

Expert Comment

by:Mikal613
ID: 24225619
"whoever is hosting the service" They have access to the Service
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Integration Management Part 2
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses
Course of the Month18 days, 7 hours left to enroll

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question