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

  • SEARCH
  • Home
  • 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 6211499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:20:52+00:00 2026-05-24T06:20:52+00:00

I have a simple .NET 4 WCF service which I have hosted locally on

  • 0

I have a simple .NET 4 WCF service which I have hosted locally on IIS7.5. Initially I had it hosted using httpBinding which worked fine. Then I switched it to netTcpBinding, which after changing the web.config file accordingly was also working fine. However today it has decided to stop working. I cannot connect to the service using the test client at all, getting:

URI: net.tcp://localhost/case/service.svc/mex Metadata contains a reference that cannot be resolved: 'net.tcp://localhost/case/service.svc/mex'. The message could not be dispatched because the service at the endpoint address 'net.tcp://localhost/case/service.svc/mex' is unavailable for the protocol of the address.

I have checked that the non-http activation service is (still) installed; the net tcp listener service is running; net.tcp is in the list of enabled protocols for the site; I have run servicemodelreg.exe -ia; I have also re-run aspnet_regiis.exe -i; and finally I have checked the net.tcp binding is on the site.

If I run netstat I can see something is listening on the port, but I cannot connect to it.

This is driving me nuts, as this morning it was working fine (as it was last week) and now it’s just not.

EDIT: If I access the service in IE then I can see it’s throwing the following exception:

Could not find a base address that matches scheme net.tcp for the endpoint with binding NetTcpBinding. Registered base address schemes are [http].

But looking in the web.config file that doesn’t seem to be the case:

<services>
  <service behaviorConfiguration="ServiceBehavior" name="[REMOVED].[REMOVED]">
    <endpoint binding="netTcpBinding" bindingConfiguration="PortSharingBinding" contract="[REMOVED].[REMOVED]" />
    <endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange" />
  </service>
</services>

<bindings>
  <netTcpBinding>
    <binding name="PortSharingBinding" portSharingEnabled="true">
      <security mode="None"/>
    </binding>
    <binding name="mexTcpBinding" portSharingEnabled="true">
      <security mode="None" />
    </binding>
  </netTcpBinding>
</bindings>
  • 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-24T06:20:53+00:00Added an answer on May 24, 2026 at 6:20 am

    OK, finally solved it. I had enabled net.tcp protocol at the site level, but it was not enabled at the application level. I guess it must have been before, and I think I might of created a new application after changing the project name earlier and obviously forgot to set the protocol on the application – doh!

    So the final checklist for hosting a WCF net.tcp service on IIS is:

    1. Ensure the WCF Non-HTTP Activation service is installed
    2. Ensure the Net.Tcp Listener Service and Net.Tcp Port Sharing Service are both running
    3. Add net.tcp to the enabled protocols for the site and the application (to access the Advanced Settings option from IIS Manager you must have an http binding present)
    4. Run servicemodelreg.exe -ia to register WCF elements with IIS
    5. Run aspnet_regiis.exe -i to ensure .NET is setup correctly with IIS
    6. Add net.tcp binding to the site
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WCF service which I'm trying to call from a simple .NET
We have a simple ASP.Net WCF Ajax enabled web service which is called via
I am designing a simple C# WCF service using ASP.NET 4.0 and hosted on
I have created a simple WCF (.NET 3.5) service which defines 10 contracts which
We have a simple WCF (on .NET 4.0) Service which uses Windows authentication and
I have a simple ASP.NET web app which uses a WCF Client to talk
Hello I have a simple wcf service like this, with a test method which
I have a WPF application which talks to a WCF service hosted in IIS.
I have a WCF Service hosted in IIS/ASP.NET that accepts HTTP Post ( not
I have a simple ASP.NET site making a call to a WCF service. The

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.