none
Metadata publishing for this service is currently disabled.

    Question

  • I guess everybody is tired of this question. I am getting "Metada publishing for this service is currently disabled" when trying to reach my wcf service, which is located here. My project is an ASP.NET MVC project and I just added WCF Service to it. Below is my web.config file.

    <?xml version="1.0" encoding="utf-8"?>
    <!--
      For more information on how to configure your ASP.NET application, please visit
      http://go.microsoft.com/fwlink/?LinkId=301880
      -->
    <configuration>
      <configSections>
        <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
        <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
      </configSections>
      <appSettings>
        <add key="webpages:Version" value="3.0.0.0" />
        <add key="webpages:Enabled" value="false" />
        <add key="ClientValidationEnabled" value="true" />
        <add key="UnobtrusiveJavaScriptEnabled" value="true" />
      </appSettings>
      <system.web>
        <compilation debug="true" targetFramework="4.5" />
        <httpRuntime targetFramework="4.5" />
      </system.web>
      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="1.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
      <system.serviceModel>
        <services>
          <service name="Poseidon.ShowSer" behaviorConfiguration="ShowBehaviour">
            <endpoint contract="Poseidon.IShow" binding="basicHttpBinding"></endpoint>
          </service>
        </services>
        <behaviors>
          <serviceBehaviors>
            <behavior name="ShowBehaviour">
              <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
              <serviceDebug includeExceptionDetailInFaults="true" />
            </behavior>
          </serviceBehaviors>
        </behaviors>
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
      </system.serviceModel>
      <entityFramework>
        <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
          <parameters>
            <parameter value="v11.0" />
          </parameters>
        </defaultConnectionFactory>
        <providers>
          <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
        </providers>
      </entityFramework>
    <connectionStrings><add name="onlineEntities" connectionString="metadata=res://*/ShowEntity.csdl|res://*/ShowEntity.ssdl|res://*/ShowEntity.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=ezkw5qxd7r.database.windows.net;initial catalog=online;persist security info=True;user id=garmush;password=*******;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" /></connectionStrings></configuration>

    And finally my class and interface

    Class

    namespace Poseidon
    {
        public class ShowSer : IShow
        {
            public ShowList GetShows()
            {
                var list = new ShowList();
    
                using (var db = new onlineEntities())
                {
                    list.Shows.AddRange(db.Shows.ToList().Select(Shows.FromEntity));
                }
                return list;
            }
    
          
        }
    }

    namespace Poseidon
    {
       
        [ServiceContract]
        public interface IShow
        {
            [OperationContract]
            ShowList GetShows();
    
        }
    }

    Thanks a lot. 

    Sunday, January 12, 2014 7:44 AM

Answers

  • Hi,
    >>Metadata publishing for this service is currently disabled

    First I saw that you have used the following, you have forgot the address:

    <endpoint contract="Poseidon.IShow" binding="basicHttpBinding"></endpoint>
    

    If you have the base address, then please add the address="", if you do not have the base address, then please add the address="http://....."

    Then please try to add the mex endpoint to see if it helps:

    <endpoint
               address="mex"
               binding="mexHttpBinding"
               contract="IMetadataExchange"/>

    For more information, please try to check this:
    #Exposing metadata from WCF services:
    http://weblogs.thinktecture.com/cweyer/2006/07/exposing-metadata-from-wcf-services.html .

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, January 13, 2014 7:04 AM
    Moderator

All replies

  • Hi,
    >>Metadata publishing for this service is currently disabled

    First I saw that you have used the following, you have forgot the address:

    <endpoint contract="Poseidon.IShow" binding="basicHttpBinding"></endpoint>
    

    If you have the base address, then please add the address="", if you do not have the base address, then please add the address="http://....."

    Then please try to add the mex endpoint to see if it helps:

    <endpoint
               address="mex"
               binding="mexHttpBinding"
               contract="IMetadataExchange"/>

    For more information, please try to check this:
    #Exposing metadata from WCF services:
    http://weblogs.thinktecture.com/cweyer/2006/07/exposing-metadata-from-wcf-services.html .

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, January 13, 2014 7:04 AM
    Moderator
  • Thanks, adding base address fixed the error. 

    Garegin Tadevosyan

    Monday, January 13, 2014 8:33 AM