0

I have followed all the steps on showing the metadata using the config file but I still received

Metadata publishing for this service is currently disabled

Below is my config file.

    <?xml version="1.0" encoding="utf-8"?>
  <configuration>
    <system.serviceModel>
      <bindings>
        <basicHttpBinding>
            <binding name="BasicHttpBinding_IService1" closeTimeout="00:01:00"
                openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
                useDefaultWebProxy="true">
                <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                    maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                <security mode="None">
                    <transport clientCredentialType="None" proxyCredentialType="None"
                        realm="" />
                    <message clientCredentialType="UserName" algorithmSuite="Default" />
                </security>
            </binding>

        </basicHttpBinding>
    </bindings>
    <services>
      <service name="RedPillJob_Raw.Service1" behaviorConfiguration="MyServiceTypeBehaviors">
        <endpoint address="http://xxx.xxx.xxx.xxx/DanRaw/Service1.svc"
            binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService1"
            contract="IService1" name="BasicHttpBinding_IService1" />
        <endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
      </service>
    </services>
        <behaviors>
            <serviceBehaviors>
                <behavior name="MyServiceTypeBehaviors" >
                    <serviceMetadata httpGetEnabled="true" />
                </behavior>
            </serviceBehaviors>
        </behaviors>
    </system.serviceModel>
</configuration>

I am so lost now, I hope somebody can help me.

chappjc
  • 30,359
  • 6
  • 75
  • 132
dantz
  • 37
  • 1
  • 9
  • Maybe it's just a typo in your sample code, but the second to the last line you're missing the "<" sign in front of /System.ServiceModel> – Brian Aug 28 '14 at 09:41

1 Answers1

1

The only thing I'd suggest is trying setting your endpoint address to the actual URL your client devices would connect to, for instance:

http:/ /CatDogMouse:6666/DanRaw/Service1

I don't see any examples of MEX with a .SVC address.

Brian
  • 3,653
  • 1
  • 22
  • 33
  • When I look at your config, I don't really see any problems beyond my first suggestion. Does the web service actually run? If there's an internal error, that might stop the meta data from being published when you hit the site. – Brian Aug 28 '14 at 12:10
  • Thanks Brian for helping me out. – dantz Aug 29 '14 at 07:17
  • Doesn't look like I was much help, but I'm glad you found the problem. – Brian Aug 29 '14 at 07:21