472,129 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,129 software developers and data experts.

Queued Component issue whith MSMQ installed in workgroup mode


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
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #1
5 2751
You can't access a Private queues by an other computer. Make the queue
Public.

Uzytkownik "Girish G" <e_****@hotmail.com> napisal w wiadomosci
news:ea**************@TK2MSFTNGP15.phx.gbl...

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
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #2
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" );

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #3
Mind to post the server code as well?

Willy.

"Girish G" <e_****@hotmail.com> wrote in message
news:ea**************@TK2MSFTNGP15.phx.gbl...

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
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #4
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;
}
}
}
}
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #5
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.
Uzytkownik "Girish G" <e_****@hotmail.com> napisal w wiadomosci
news:#f**************@TK2MSFTNGP10.phx.gbl...
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" );

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by richard | last post: by
3 posts views Thread by Moti | last post: by
4 posts views Thread by MSMQ workgroup and C# | last post: by
14 posts views Thread by Webbee | last post: by
2 posts views Thread by =?Utf-8?B?Q0xFQVItUkNJQw==?= | last post: by
11 posts views Thread by BillGatesFan | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.