Hosting WCF Service with netTcpBinding on IIS7

No.of Views5876
Bookmarked0 times
Downloads 
Votes0
By  malav.rajendra   On  28 Sep 2010 11:09:18
Tag : WCF , How to
Web.Config should have following configuration settinggs to hosting WCF service on IIS7(WAS)
emailbookmarkadd commentsprint

Images in this article missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at info@codegain.com

 

Introduction

Web.Config should have following configuration settinggs to hosting WCF service on IIS7(WAS):

<bindings>
      <netTcpBinding>
        <binding name="tcpbinding" portSharingEnabled="true">
          <security mode="None"></security>
          <!--<security mode="Transport">
            <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign"/>
            <message clientCredentialType="Windows"/>
          </security>-->
        </binding>

       </netTcpBinding>
    </bindings>

Trouble Shooting on IIS7

Trouble Shooting on IIS7.*
If following exception thrown while adding service reference-
Error: Cannot obtain Metadata from net.tcp://win-2008.cspl:9002/Multibinding/Service1.svc If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address.  For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata Exchange Error    URI: net.tcp://win-2008.cspl:9002/Multibinding/Service1.svc    Metadata contains a reference that cannot be resolved: 'net.tcp://win-2008.cspl:9002/Multibinding/Service1.svc'.    Could not connect to net.tcp://win-2008.cspl:9002/Multibinding/Service1.svc. The connection attempt lasted for a time span of 00:00:02.0374439. TCP error code 10061: No connection could be made because the target machine actively refused it .

Resolutions Steps

Step1: Make sure following services is enable for net.tcp

a. Net.Tcp Listener Adapter
b. Net.Tcp Port Sharing Service

If not then enable and start both services.

Step2: IIS Manager -> Select Hosted service -> Action pane -> Advance setting ->
           See Enable Protocol, by default http protocol there, need to specify net.tcp with comma separated

Step3: Make sure your application pool is running in classic mode 

Image Loading

Step4: Right click on Default Website -> Edit bindings
            Make sure net.tcp protocol information there

 

Image Loading

Step5: Check firewall, Create Inbound and out bound rule for port which we are using.that's all.. thank you for reading.

 
Sign Up to vote for this article
 
About Author
 
malav.rajendra
Occupation-Not Provided
Company-Not Provided
Member Type-Fresh
Location-Not Provided
Joined date-01 Feb 2010
Home Page-Not Provided
Blog Page-Not Provided
 
 
Other popularSectionarticles
Comments
There is no comments for this articles.
Leave a Reply
Title:
Display Name:
Email:
(not display in page for the security purphase)
Website:
Message:
Please refresh your screen using Ctrl+F5
If you can't read this number refresh your screen
Please input the anti-spam code that you can read in the image.
^ Scroll to Top
</