Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7189359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:17:08+00:00 2026-05-28T19:17:08+00:00

I have a simple test purpose WCF service. I’m trying to host it under

  • 0

I have a simple test purpose WCF service. I’m trying to host it under IIS 7.5 ( Windows 7 ) but no luck so far. I’m getting error

Cannot obtain Metadata from net.tcp://localhost/TestApp2/MyService

I have a web site TestApp2 under Default Web Site, I enabled tcp on Default Web Site and TestApp2. Here is my web.config file, while I realize that this error simply states that I didn’t have endpoint for metadata exchange, I can’t see what’s the problem because I included endpoint for metadata exchange.

<system.serviceModel>
<services>
  <service behaviorConfiguration="ServiceBehavior" name="MyService">

    <endpoint address="net.tcp://localhost/TestApp2/MyService"
              binding="netTcpBinding"
              bindingConfiguration="PortSharingBinding"
              contract="II7WcfService.IService1" />

    <endpoint address="MEX"
              binding="mexTcpBinding"
              contract="IMetadataExchange" />

    <host>
      <baseAddresses>
        <add baseAddress="net.tcp://localhost/TestApp2/MyService" />
      </baseAddresses>
    </host>

  </service>
</services>
<bindings>
  <netTcpBinding>
    <binding name="PortSharingBinding" portSharingEnabled="true">
      <security mode="None"/>
    </binding>
  </netTcpBinding>
</bindings>
<behaviors>
  <serviceBehaviors>
    <behavior name="ServiceBehavior">
      <serviceMetadata httpGetEnabled="False" />
      <serviceDebug includeExceptionDetailInFaults="false" />
    </behavior>
  </serviceBehaviors>
</behaviors>

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T19:17:09+00:00Added an answer on May 28, 2026 at 7:17 pm

    My guess is your service isn’t actually called MyService but rather it is in a namespace. This means your declared endpoints are not getting picked up, and the default ones (which doesn’t include IMetadataExchange) are being used instead.

    Add the name of your namespace to the attribute in the config and it should work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written the following simple test in trying to learn Castle Windsor's Fluent
I have a simple test bash script which looks like that: #!/bin/bash cmd=rsync -rv
I have a simple test application (C# console application) that does an HTTP GET
I have this simple test project just to test the IncludeExceptionDetailInFaults behavior. public class
I have a simple little test app written in Flex 3 (MXML and some
I have created a simple test form with FormBorderStyle = FixedToolWindow by default and
I have a simple unit test case (extensive question here ) on a configuration
I have made a simple test application for the issue, two winforms each containing
I have a very simple test page for PHP session. <?php session_start(); if (isset($_SESSIONS['views']))
I have a very simple test program, running on Solaris 5.8: #include <stdio.h> #include

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.