Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a wcf service that is giving me the following error.

Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata.


I've googled quite a bit but still can't figure out how to correctly configure my web.config.
Below is my web.config.

XML
<?xml version="1.0"?>
<configuration>

  <connectionStrings>
  </connectionStrings>
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
    <customErrors mode="Off" >
    </customErrors>
  </system.web>
  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="true"/>
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <bindings>
      <basicHttpBinding>
        <binding name="wsHttpBinding">
          <security mode="Transport">
            <transport clientCredentialType="None"/>
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <services>
      <service name="NIM_Latency_Service.NIM_Latency">
        <endpoint address="" binding="basicHttpBinding" bindingConfiguration="wsHttpBinding"
          contract="NIM_Latency_Service.LatencyServiceContract" />
        <endpoint address="https://services.oscautomation.com/NIM_Latency.svc" binding="mexHttpsBinding" contract="IMetadataExchange" />
      </service>
    </services>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="false" />
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>

</configuration>


Any Help is appreciated!
Posted
Comments
ArunRajendra 27-Jun-13 0:34am    
I guess there is a issue with the way certificate is confitured.

1 solution

did u declared ServicContract & DataContracts Exactly
 
Share this answer
 

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

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900