Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: WCF
I have a Service Application which has the following web.config file:
 
<?xml version="1.0"?>
<configuration>
 
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>
  <system.serviceModel>
   
    <standardEndpoints>
      </standardEndpoints>
    <bindings>
     </bindings>
    <services>
      <service behaviorConfiguration="metadatabehaviour" name="WCF_Service.HistorianService">
        <endpoint address="" binding="basicHttpBinding" bindingConfiguration=""
          contract="WCF_Service.IHistorianCollectorService" />
        <endpoint address="net.tcp://localhost:8081/mex" binding="mexTcpBinding"
          contract="IMetadataExchange" />
        <endpoint address="net.tcp://localhost:8081" binding="netTcpBinding"
          contract="WCF_Service.IHistorianCollectorService" />
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="metadatabehaviour">
          <serviceMetadata httpGetEnabled="false" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    
    <serviceHostingEnvironment multipleSiteBindingsEnabled="false" />
  </system.serviceModel>
 <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>
  
</configuration>
 
And I am getting the following error: Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata.I can successfully run the service if I am just implementing the "basicHttpBinding" but as soon as I introduce a "netTcp" binding, I start getting this error. I have changed the 'mex' binding to 'mexTcpBinding' but still the error persists. I have tried toggling the relevant properties. Any idea how I can correct this error?
Posted 24-Sep-12 21:50pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 341
1 Marcin Kozub 225
2 Sergey Alexandrovich Kryukov 220
3 Praneet Nadkar 197
4 Shweta N Mishra 161
0 OriginalGriff 8,149
1 Sergey Alexandrovich Kryukov 7,287
2 DamithSL 5,614
3 Manas Bhardwaj 4,986
4 Maciej Los 4,910


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 25 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100