Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy are my queued WCF messages silently disappearing?
    text
    copied!<p>I have a transactional MSMQ queue setup on server THOR. I am able to post messages to that queue from a workstation with the following code:</p> <pre><code>var queue = new MessageQueue("FormatName:Direct=OS:thor\\private\\myqueue"); using (var tx = new MessageQueueTransaction()) { tx.Begin(); queue.Send("test", tx); tx.Commit(); } </code></pre> <p>However, when I attempt to connect using WCF my messages never appear in the queue. Here is the configuration I'm using:</p> <pre><code>&lt;system.serviceModel&gt; &lt;bindings&gt; &lt;netMsmqBinding&gt; &lt;binding name="ClientNewsFeedServiceBinding" durable="true" exactlyOnce="true"&gt; &lt;security mode="None" /&gt; &lt;/binding&gt; &lt;/netMsmqBinding&gt; &lt;/bindings&gt; &lt;client&gt; &lt;!-- NewsFeed Service --&gt; &lt;endpoint name="INewsFeedService" address="net.msmq://thor/private/myqueue" binding="netMsmqBinding" bindingConfiguration="ClientNewsFeedServiceBinding" contract="Service.Contract.INewsFeedService" /&gt; &lt;/client&gt; &lt;/system.serviceModel&gt; </code></pre> <p>And the code:</p> <pre><code>using (var tx = new TransactionScope()) { var cf = new ChannelFactory&lt;INewsFeedService&gt;("INewsFeedService"); var service = cf.CreateChannel(); service.TestMessage("test"); ((IChannel)service).Close(); tx.Complete(); } </code></pre> <p>I get no exceptions of any kind, but there is no message posted on the queue on THOR. Any ideas? I don't even know how to debug this since it just silently fails.</p> <p><strong>UPDATE</strong></p> <p>If I change my MSMQ URI to 'net.msmq://localhost/private/myqueue' then it will post to a local transactional queue I have setup. The setup of the queue itself is identical (as in, I performed the same steps to create both the localhost and THOR queues).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload