Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WCF Service Reading an MSMQ

26 views
Skip to first unread message

Ken Cowley

unread,
Nov 29, 2011, 4:12:38 AM11/29/11
to
Am writing a small WCF service which will be hosted via a windows
service and reads input from an MSMQ. Have never done this before an
can't seem to find a suitable example of how to do this. I have
created the app.config file as shown below, but do I need to implement
a polling mechanisum to read the queue or as I have bound it to the
endpoint will this be done automatically (sorry if this is a stupid
question but as I said never done this before with MSMQ).

Thanks

Ken

----

<system.serviceModel>
<services>
<service
name="Prodigium.Portal.AssetCacheManager.CacheManagerRefresh">
<host>
<baseAddresses>
<add baseAddress="http://localhost:9002/AssetCacheManager/
CacheManagerRefresh"/>
</baseAddresses>
</host>
<endpoint address="net.msmq://localhost/private/RefreshCache"
binding="netMsmqBinding"

contract="Prodigium.Portal.AssetCacheManager.ICacheManagerRefresh"
bindingConfiguration="CacheManagerBinding">
</endpoint>
</service>
</services>
<bindings>
<netMsmqBinding>
<binding name="CacheManagerBinding" >
<security mode="Transport">
<transport msmqAuthenticationMode="WindowsDomain"
msmqProtectionLevel="Sign"/>
<message clientCredentialType="Windows" />
</security>
</binding>
</netMsmqBinding>
<wsHttpBinding>
<binding name="LargeMessageBinding"
maxReceivedMessageSize="2000000">
<readerQuotas maxArrayLength="30000" />
<security mode="None">
<message clientCredentialType="None" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceDebug includeExceptionDetailInFaults="False"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>

Ken Cowley

unread,
Nov 30, 2011, 6:33:11 AM11/30/11
to
Ops wrong binding type should have been

<endpoint address="msmq.formatname:DIRECT=OS:.\private$
\RefreshCache"
binding="msmqIntegrationBinding"
bindingConfiguration="CacheManagerBinding"

contract="Prodigium.Portal.AssetCacheManager.ICacheManagerRefresh">
</endpoint>
</service>
</services>
<bindings>
<msmqIntegrationBinding>
<binding name="CacheManagerBinding" >
<security mode="Transport">
<transport msmqAuthenticationMode="WindowsDomain"
msmqProtectionLevel="Sign"/>
</security>
</binding>
</msmqIntegrationBinding>
0 new messages