Click here to Skip to main content
15,891,136 members
Articles / Security

Creating a WCF Service with MSMQ Communication and Certificate Security

Rate me:
Please Sign up or sign in to vote.
4.89/5 (27 votes)
15 Mar 2012CPOL26 min read 157K   5.4K   53  
Implementing a Simple, Secure WCF Service with MSMQ Communication
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.web>
    <compilation debug="true" />
  </system.web>

  <system.serviceModel>
    <services>
      <service name="MSMQNoSecurityService.MSMQService">
        <host>
          <baseAddresses>
            <add baseAddress="http://mohammad-pc:8080/Design_Time_Addresses/MSMQNoSecurityService/MSMQService/"/>
          </baseAddresses>
        </host>
        <endpoint address="net.msmq://mohammad-pc/private/TestQueue"
                  binding="netMsmqBinding" bindingConfiguration="MyBinding"
                  contract="MSMQNoSecurityService.IMSMQService">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <serviceMetadata httpGetEnabled="True" />
          <serviceDebug includeExceptionDetailInFaults="False" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <bindings>
      <netMsmqBinding>
        <binding name="MyBinding"  >
          <security mode="None"/>
        </binding>
      </netMsmqBinding>
    </bindings>
  </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
Software Developer
Iran (Islamic Republic of) Iran (Islamic Republic of)
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions