Connecting Tech Pros Worldwide Forums | Help | Site Map

Queued Component issue whith MSMQ installed in workgroup mode

Girish G
Guest
 
Posts: n/a
#1: Nov 16 '05

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!

lukasz
Guest
 
Posts: n/a
#2: Nov 16 '05

re: Queued Component issue whith MSMQ installed in workgroup mode


You can't access a Private queues by an other computer. Make the queue
Public.

Uzytkownik "Girish G" <e_dg_e@hotmail.com> napisal w wiadomosci
news:eaG6KENnEHA.2612@TK2MSFTNGP15.phx.gbl...[color=blue]
>
> 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![/color]


Girish G
Guest
 
Posts: n/a
#3: Nov 16 '05

re: Queued Component issue whith MSMQ installed in workgroup mode


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!
Willy Denoyette [MVP]
Guest
 
Posts: n/a
#4: Nov 16 '05

re: Queued Component issue whith MSMQ installed in workgroup mode


Mind to post the server code as well?

Willy.

"Girish G" <e_dg_e@hotmail.com> wrote in message
news:eaG6KENnEHA.2612@TK2MSFTNGP15.phx.gbl...[color=blue]
>
> 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![/color]


Girish G
Guest
 
Posts: n/a
#5: Nov 16 '05

re: Queued Component issue whith MSMQ installed in workgroup mode


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!
lukasz
Guest
 
Posts: n/a
#6: Nov 16 '05

re: Queued Component issue whith MSMQ installed in workgroup mode


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_dg_e@hotmail.com> napisal w wiadomosci
news:#fch8dOnEHA.3988@TK2MSFTNGP10.phx.gbl...[color=blue]
> 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![/color]


Closed Thread


Similar C# / C Sharp bytes