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 9094871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T23:27:24+00:00 2026-06-16T23:27:24+00:00

first i create a WCF service application where svc file is created. then i

  • 0

first i create a WCF service application where svc file is created. then i write my small service related code. when i hit F5 then wcf test client appear fine and when i select svc file and select view in browser option then everything works fine. initially i have only one endpoint in config file…that is wsDualHttpBinding then everything working fine.

the moment i add another endpoint called netTcpBinding then problem start. after adding netTcpBinding endpoint in config file and when i try to browse svc file again in browser then i got error message called The protocol ‘net.tcp’ is not supported and when i hit F5 then wcf test client show error message called ** Cannot obtain Metadata from http://localhost:30996/ChatService.svc**

i just do not understand why it happens when i add netTcpBinding. onething i like to say that i have not hosted my service anywhere. i just create WCF service application and add all the entries in web.config file and just press F5. is this the reason i am getting error because i have not hosted my services anywhere?

so here is my config details as follows

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

    <system.web>
        <compilation debug="true" targetFramework="4.0" />
    </system.web>

  <system.serviceModel>
    <services>
      <service name="BBAChatService.ChatService" behaviorConfiguration="BBAChatService.ChatServiceBehavior" >
        <host>
          <baseAddresses>
            <add baseAddress ="http://localhost:30996/ChatService.svc/"/>
            <add baseAddress ="net.tcp://localhost:30997/ChatService/"/>
          </baseAddresses>
        </host>

        <endpoint name="dual_bind"
                  address="dual"
                  binding="wsDualHttpBinding" 
                  bindingConfiguration="WSDualHttpBinding_IChatService" 
                  contract="BBAChatService.IChatService">
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>

        <endpoint name="tcp_bind"
              address="net.tcp://localhost:30997/ChatService"
              binding="netTcpBinding"
              bindingConfiguration="tcpBinding"
              contract="BBAChatService.IChatService">
        </endpoint>

        <endpoint address="net.tcp://localhost:30997/ChatService/mex"
                          binding="mexTcpBinding"
                          contract="IMetadataExchange"/>


      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="BBAChatService.ChatServiceBehavior">
          <!-- 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>
      <netTcpBinding>
        <binding name="tcpBinding"
                         maxBufferSize="67108864"
                         maxReceivedMessageSize="67108864"
                         maxBufferPoolSize="67108864"
                         transferMode="Buffered"
                         closeTimeout="00:00:10"
                         openTimeout="00:00:10"
                         receiveTimeout="00:20:00"
                         sendTimeout="00:01:00"
              portSharingEnabled="true"
                         maxConnections="100">
          <security mode="None">
          </security>
          <readerQuotas maxArrayLength="67108864"
                                  maxBytesPerRead="67108864"
                                  maxStringContentLength="67108864"/>
          <reliableSession enabled="true" inactivityTimeout="00:20:00"/>
        </binding>
      </netTcpBinding>
      <wsDualHttpBinding>
        <binding name="WSDualHttpBinding_IChatService"
                 closeTimeout="00:01:00"
                 openTimeout="00:01:00"
                 receiveTimeout="00:10:00"
                 sendTimeout="00:01:00"
                 bypassProxyOnLocal="false"
                 transactionFlow="false"
                 hostNameComparisonMode="StrongWildcard"
                 maxBufferPoolSize="524288"
                 maxReceivedMessageSize="65536"
                 messageEncoding="Text"
                 textEncoding="utf-8"
                 useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" 
                        maxStringContentLength="8192" 
                        maxArrayLength="16384" 
                        maxBytesPerRead="4096" 
                        maxNameTableCharCount="16384"/>
          <reliableSession 
            ordered="true" 
            inactivityTimeout="00:10:00"/>
          <security mode="Message">
            <message clientCredentialType="Windows" 
                     negotiateServiceCredential="true" 
                     algorithmSuite="Default"/>
          </security>
        </binding>
      </wsDualHttpBinding>
    </bindings>
  </system.serviceModel>
</configuration>

just tell me what is missing….what i need to change in my config file.

here is the screen shot of my project solution explorer.

enter image description here

  • 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-06-16T23:27:25+00:00Added an answer on June 16, 2026 at 11:27 pm

    The built-in web server which is used by VS when you hit F5 supports only HTTP activation so you won’t be able to host a net.tcp endpoint in it. You can either:

    • Host it in IIS (with Non-HTTP activation enabled)
    • Write a simple host application for your service
    • Use WcfSvcHost.exe which can be found in %VS INSTALLATION DIR%\Common7\IDE

    Once you’ve hosted the service properly you’ll have to create a metadata exchange endpoint for it (binding type is mexTcpBinding) and set httpGetEnabled to false in the behavior configuration for your net.tcp endpoint.

    EDIT :
    For WcfSvcHost.exe detailed usage description please refer to this msdn article. As for the httpGetEnabled i meant to set it to false on the serviceMetadata in behavior of the net.tcp service endpoint.

    <serviceBehaviors>
        <behavior name="BehaviorName">
          <serviceMetadata httpGetEnabled="false" />
        </behavior>
    <serviceBehaviors>
    

    Then just apply this behavior to your net.tcp endpoint. I assumed you’ll want to expose the metadata over TCP (not HTTP) for this endpoint and in such case you’ll need to include a mexTcpBinding endpoint.

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

Sidebar

Related Questions

I'm attempting to create my first WCF service. I've created the service and now
Im trying to create my first WCF restful service. In VS2010 I open weddingservice.svc
I created my first WCF service and tested it on my computer, and it
I am trying to write my first WCF project. I have created a project
I created a WCF Service, Hosted it in IIS and created a web application
I created my first WCF RESTful service with just one GetData, and it works
I'm developing a small remote task manager application [server/client] on LAN using WCF service
How to create dynamically tag inside table. At first create link then inside link
I am using EF Code First to create a database on local .\SQLEXPRESS. Among
Using Visual Studio 2010, I developed a WCF service hosted on a web application

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.