.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Publishing metadata with relative URI's; why won't it work?

Posted By:      Posted Date: October 18, 2010    Points: 0   Category :WCF


I have some WCF services that are hosted in a Windows Service and I need to publish the metadata. Preferrably, I would like to use one baseAddress for all my services.

So this works;

Uri baseAddress = new Uri("https://localhost:8181/MyInterface");
<snip />
serviceHost.AddServiceEndpoint(typeof(IMyInterface), binding, "");
serviceHost.AddServiceEndpoint(ServiceMetadataBehavior.MexContractName, binding, "mex");
<snip />

I can get the metadata from https://localhost:8181/MyInterface?wsdl

Now, I want to publish the same service using a relative URI;

Uri baseAddress = new Uri("https://localhost:8181");
<snip />
serviceHost.AddServiceEndpoint(typeof(IMyInterface), binding, "MyInterface");
serviceHost.AddServiceEndpoint(ServiceMetadataBehavior.MexContractName, binding, "MyInterface/mex");
<snip />

Now, the service is still 'listening' at

View Complete Post

More Related Resource Links

2010 Metadata Publishing not works as expected

When enabling Metadata Publishing in library settings, used terms that come from managed metadata or enterprise keyword columns should also be published as social tags and used tags should be available on mysite, e.g. in activity list. But that is not the case in my installations. If I link to a used tag, e.g. /tagprofile.aspx?termid=27a8997d-4459-4bae-ad76-bdb2e249fced the tag is found on the tag profile and displayed with name and source (e.g. some taxonomy). But the list of marked items, that used the tag in last days, remains empty. Also the search for all items that are tagged with this term delivers no results. I know that there is security trimming, but I'm the owner of these documents, so this should not be the reason. How to display these taged documents on mysite automatically? For pure social tagging (e.g. by using tags & notes neear like it) it works, but not in case of metadata publishing. Any ideas? Any documentation? That would be great. Thanks in advance, SharePointFrank http://www.layer2.de/en/products/pages/knowledge-management-suite-sharepoint-2010.aspx  

Metadata publishing for this service is currently disabled Problem under IIS7



I am struggling with an issue that I haven't seen before, at least not without a simple resolution. I have seen numerous articles about this issue but I haven't found one that actually gives a solution that works and its really becoming a royal pain.

I am getting the message, "Metadata publishing for this service is currently disabled" when attempting to host my service in IIS7 on windows 7. I have only seen this problem since I migrated to VS2010 using the .NET 4 Framework.

I have adjusted my web.config file in effort of resolving the problem but to no avail. Anyone here able to help me out on this one? I am totally exhausted on going in circles for this issue.

Here is my code:

<?xml version="1.0"?>
    <compilation debug="true" targetFramework="4.0" />
        <behavior name ="MapServiceBehavior">
          <serviceMetadata httpGetEnabled="true"/>

Metadata publishing is disabled


Hello there,

Im going crazy with my first WCF development. I have been working fine couple of minutes back before service died again. Meta data publishing is disabled. Here is my service config




Metadata publishing for this service is currently disabled.


I have tried to do what some have suggested to have the metadata publishing enabled but cant figure this out. Could anyone assist in what i could be doing wrong here? Ive read a few blogs and nothing seems to work. Im running as an admin, Win 7, VS2010 + all updates. My Web.Config file under my ASP .net site is:

<?xml version="1.0"?>
  <compilation debug="false" strict="false"

"Metadata publishing for this service is currently disabled" yet again!


I've followed all of the suggestions described in the other Q&As on this subject but so far nothing has worked - I still get the "Metadata publishing for this service is currently disabled" page.  Here is my web.config file:

   <service name="StationCasinos.Workflow.RuntimeService.WorkflowRuntimeService" behaviorConfiguration="StandardBehavior">
      <add baseAddress="http://localhost:6555/EnterpriseWorkflow/MessagingServic

'Metadata publishing for this service is currently disabled' message with WCF service


Whenever I try to add a web reference to the WCF service in my project, I get an error:

'The HTML document does not contain Web service discovery information.
There was an error downloading 'http://localhost/OFTestSite/Service.svc/$metadata'.
The request failed with HTTP status 400: Bad Request.'

When I browse Service.svc directly from the IIS, the page opens with the statement 'Metadata publishing for this service is currently disabled.'

I followed all the steps correctly to make metadata publishing enabled, but still I get the same message and I'm not able to add the web refernce.

Could anyone please help me? 

(I am using VS 2010 Professional on Windows XP machine with IIS 5.1)

Metadata publishing not available for list


Hello All,

I need a little help. I cannot enable metadata publishing on a list, because this section is entirely missing. I can enable it on a document library, but it does not work: I create a managed metadata column, I tag a document and the used tag does not become a social tag. I ran an incremental crawl, the Social Data Maintainence Job but still the used tag was not included in the social tags.

I know something is wrong, but cannot figure out what.

Thank you,


Publishing the Managed Metadata Service, through a firewall to another AD Forrest - fun and games...


Hi People,

we've got two SP2010 Farms in two separate AD Domains/Forrests, which are connected via a firewall and there is no trust at the AD level.

Both farms consist of an App Server (Central Admin and all Service Applications) and a WFE (Content plus Query/Index role).

The Managed Metadata Service on Farm A is published through to Farm B and so we've had to open up ports through the firewall so the App Server in Farm B can talk to the SharePoint Web Services on Farm A (32843, 32844 and 32845) and that all appears to be working properly, even to the extent that the Content Deployment from Farm A to Farm B is also working and the managed properties in the content are all being mapped/managed correctly.

However I'm now seeing requests by the the WFE in Farm B to access the topology service running on WFE in Farm A! Hold on!
As it was, I already had to allow both the App Server and the WFE in Farm B to be able to access the SharePoint Web Service ports on the App Server in Farm A, and now I have to do the same for the WFE in Farm A?!?!? That can't be right.

Isn't the whole point of having proxy services, Central Admin and an App Server (hosting all the services) that you only have to open up a single server? Why does every machine in one farm have to know about every machine in another farm?

Talk about a firewall mana

Metadata publishing for this service is currently disabled.


I have created a WCF service from VS 2010 and started debugging only after makin changes in web.config file, and is looking like this.

<?xml version="1.0"?>

    <compilation debug="true" targetFramework="4.0" />
      <service name="WCFGettingStarted.Servie1" behaviorConfiguration="MyServiceBehavior">
        <endpoint address="" binding="basicHttpBinding" contract="WCFGettingStarted.IServie1"></endpoint>
        <endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
        <behavior name="MyServiceBehavior">
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="false"/>

Publishing SQL Server Database using Publishing Wizard : Tips & Tricks

We can use SQL Server Publishing Wizard to deploy our local Database to remote hosting server/production server.This feature is available in SQL Server 2008/VWD 2008.

Below is the complete step by step guide of this process.

RadioButton inside GridView, How to get it work as normal

Did you tried before to drag a RadioButton control inside a Gridivew templatefield, and then you attempt to select these RadioButtons , you will notice that the behavior of RadioButton control will be changed and it will work just like the behavior of checkbox control! the user will be able to select more than one radiobutton in the grid!

Looking for guidance: wanting to work with AJAX architecture



I'm starting a small website that will be backed by a database, and will allow a small number of users to authenticate and select an entry in the database, and then view (and optionally update) a corresponding entry (think master-detail).

I have some flexibility in how I'll do this, but I'd really like to incorperate some newer AJAX style coding, eliminating some page postbacks. I think this is a great opportunity to learn the concepts well.

I'll probably go with an ASP.NET 4.0 site. From what I've seen there are MANY ways to go about this:

-WCF Data Services to expose the data, and consume in ASP.NET

-Page methods to expose the data, separate method to update the data

-I'd rather avoid the UpdatePanel because I'm really looking for a full hands-on approach, with learning client side scripting being an objective as well.

Beyond that, it seems that one can use jQuery to build clientside templates, but also one can use the ASP.NET AJAX template engine (in ASP.NET 4.0 I believe).

A concern I have: users should only be able to work with the data exposed via these endpoints if they are logged into the website. Hopefully I can somehow reuse the ASP.NET forms authentication cookie for this purpose. 

Well, I hope I've posted enough to a

How to position one control relative to another one even after resizing windows?


I used following Jquery code trying to make image close to a table. It worked fine after first load, but the position changed after window is resized. Any ideas? thanks

$(document).ready(function() {
            var pos = $("#mytable").offset();
            var width = $("#mytable").width();
            var left = pos.left + width + 20;
            var top = pos.top + 200;
                position: 'absolute',
                zIndex: 5000,
                left: left,
                top: top

animate effect work but the render items are messed up.


Hi all,

     I have a very unique problem, humm i think. I am using a jquery effect that animate bounce effect, i have a line in my javascript pageLoad function $("#UserBrowserInfoDIV").show('bounce'); - the effects run smoothly but what it does is mess up the bolded text in the div. I have try the items inside the div without bolding and it works fine and no render problem but when bolded the text that are bolded is quite messed up, and barely readable.

Please let me know is there anything else i can do i really would like use this effect.

P.S all the effect have the same render problem, and i am using ie8 under compatibility mode.





Why getTreeNode does not work?



I try to run a  treeview example from msdn:


I also want to use code from


Here is my code:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register TagPrefix="mytree"
Assembly="Microsoft.Web.UI.WebControls" %>
 <script type="text/javascript" language="javascript">

     function xxx() {

         var myNode = treeview_one.getTreeNode(treeview_one.selectedNodeIndex);


<form id="myform" runat="server">
<mytree:treeview id="treeview_one"  runat="server" Child

Category attribute of user control property does not work correctly in categories tab.



I have a User Control (ascx) and a property which a want to display in my categories tab in Visual Studio in the category named "Styles".

[Category("Styles"), DefaultValue(""), Description("The value for formating something.")]
public String MyFormatProperty
set { /* the code for set */; }
get { /* the code for get */; }

And here is the problem: Actually I do not need a get, because I only have to set the property (write only property). But when I omit the get, the property is displayed in the "Misc" category in the categories tab in Visual Studio. Only when I code the get as well, then the property is displayed correctly in the "Styles" category in the categories tab in Visual Studio.

Does anybody know why? How can I display the category correctly only with set?

Thanks, S.

"Type ASP.x is not defined" error for dynamic user control when publishing updateable


I have a user control (ContainerCtrl) which programmatically instantiates another user control (SimpleCtrl) in OnLoad. It builds and runs fine, but when I publish it I get the error "error BC30002: Type 'ASP.SimpleCtrl' is not defined." (If I publish without the "updateable" option there's no error, but I need the site to be updateable.)

I assume this has to do with the particulars of how the assembly(ies) are built for the different compiler options. My question is, how can I get it to work properly for "updateable" publishing?

VS 2008 / .NET 3.5 sp1

The code follows (web.config is the default from Visual Studio).

Many thanks, Dave


<%@ Control Language="VB" ClassName="SimpleCtrl" CodeFile="SimpleCtrl.ascx.vb" Inherits="_SimpleCtrl" %>

    Simple control


Partial Class _SimpleCtrl
    Inherits UserControl

    'Nothing to see here.

End Class


<%@ Control Language="VB" CodeFile="ContainerCtrl.ascx.vb" Inherits="_ContainerCtrl"

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend