Queued Component issue whith MSMQ installed in workgroup mode

G

Girish G

I am trying to invoke a queued component and to my surprise the call
succeeds locally but fails when the component resides on a separate box.

Both the machines (client and server) in use have MSMQ installed in
workgroup mode.
I dont seem to get any exceptions or event messages. The outgoing queue
on the client shows that messages were sent but no acknowledgements were
received.
Heres the client code

IQComponent iQc = null;
try
{
iQc = (IQComponent)
Marshal.BindToMoniker("queue:FormatName=DIRECT=OS:GirishG_Srv2\\PRIVATE$
\\SampleQueuedApplication/new:SampleQueuedLibrary.SampleQueuedComponent"
);
}
catch( Exception e )
{
MessageBox.Show( "Cannot create Queued Component: " + e.Message );
return;
}
iQc.DisplayMessage ("Hello World!!");
Marshal.ReleaseComObject(iQc);

Thanks
 
G

Girish G

I dont think thats particularly true and besides I am running MSMQ in
workgroup mode.

I can directly access private queues of remote box using following code.

MessageQueue mQueue = new MessageQueue(
"FormatName:DIRECT=OS:GirishG_Srv2\\PRIVATE$\\Test" );
mQueue.Send( "Hello" );
 
G

Girish G

Ofcourse Willy, heres the server code

using System;
using System.EnterpriseServices;
using System.Windows.Forms;

namespace SampleQueuedLibrary
{
public interface IQComponent
{
void DisplayMessage(string msg);
}

[InterfaceQueuing(Interface = "IQComponent")]
public class SampleQueuedComponent: ServicedComponent, IQComponent
{
public SampleQueuedComponent()
{
}

public void DisplayMessage(string msg)
{
try
{
MessageBox.Show( null, msg, "Processing
message",MessageBoxButtons.OK,
MessageBoxIcon.Information,MessageBoxDefaultButton.Button1,
MessageBoxOptions.ServiceNotification );
}
catch( Exception e )
{
string err = e.Message;
}
}
}
}
 
L

lukasz

I just found out you are correct. Having read most MSDN's resources on MSMQ
I've never hit upon anything stating access to private queues is not only
local.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top