Click here to Skip to main content
15,881,172 members
Articles / Web Development / IIS

Host your WCF service with multiple host environment using multiple protocol

Rate me:
Please Sign up or sign in to vote.
4.78/5 (40 votes)
15 Dec 2008CPOL8 min read 287.9K   4.1K   142  
Exploring multiple hosting environment for WCF service
<?xml version="1.0"?>
<configuration>
  <system.serviceModel>
    <services>
      <service name="FirstWcfService.Service" behaviorConfiguration="ServiceBehavior">
        <!-- Service Endpoints -->
        <endpoint address="FirstWcfService" binding="netTcpBinding" contract="FirstWcfService.IService"/>
        <!-- This Endpoint is used for genertaing the proxy for the client -->
        <endpoint address="mex" contract="IMetadataExchange" binding="mexTcpBinding" />
        <host>
          <baseAddresses>
            <add baseAddress="net.tcp://localhost:9100/"/>
          </baseAddresses>
        </host>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="ServiceBehavior">
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
</configuration>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

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


Written By
Architect Apside
France France
I'm un IT Consultant (with B. Sc. and M. Sc. Background in Civil Engineering - university of Baghdad). I'm specialized in Microsoft products (ASP.NET, C#, WCF, Ajax.NET, VB.NET, and IIS) and also I'm familiar with various platforms and technologies (XML-XSL, SOA, Java, ORACLE). Good knowledge in n-tiers design and development using Object-Oriented Programming (OOP) methodologies.

I enjoy working on my own initiative as well as being part of a team. Well organized with a determination to succeed in all areas of work to be undertaken. I communicate effectively in four languages (English, French, Arab, Chaldean) in a cross-cultural environment. Currently I am working with Apside as an Senior IT Engineer in France.

Feel free to mail me for anything at fshomou AT hotmail Dot com.

Comments and Discussions