G
Guest
Hello All,
I am getting errors on the MessageQueue.Create statement of:
public static class CommonTools
{
// Since this is a private queue we follow the naming convention
// MachineName\Private$\QPath
// "." represents the local machine name
public const string QPath = @".\Private$\msmqdemo";
public static MessageQueue mesSendQ = null;
public static MessageQueue mesReceiveQ = null;
public static string CreateQueue()
{
try
{
mesSendQ = MessageQueue.Create(QPath); << Error occurs here
return "CreateQueue Successful";
}
catch(Exception ex)
{
return ex.Message;
}
}
This is the stacktrace that I get:
at
I tested this same code on the desktop and it worked fine. Is there a
problem with my queue path syntax for cf 2.0?
Thanks in advance for your help
I am getting errors on the MessageQueue.Create statement of:
public static class CommonTools
{
// Since this is a private queue we follow the naming convention
// MachineName\Private$\QPath
// "." represents the local machine name
public const string QPath = @".\Private$\msmqdemo";
public static MessageQueue mesSendQ = null;
public static MessageQueue mesReceiveQ = null;
public static string CreateQueue()
{
try
{
mesSendQ = MessageQueue.Create(QPath); << Error occurs here
return "CreateQueue Successful";
}
catch(Exception ex)
{
return ex.Message;
}
}
This is the stacktrace that I get:
at
System.Messaging.Interop.SafeNativeMethods.MQPathNameToFormatName()\r\nat
System.Messaging.MessageQueue.ResolveFormatNameFromQueuePath()\r\nat
System.Messaging.MessageQueue.get_FormatName()\r\nat
System.Messaging.MessageQueue.SendInternal()\r\nat
System.Messaging.MessageQueue.Send()\r\nat
DemoMSMQ.Forms.testForm.buttonSend_Click()\r\nat
System.Windows.Forms.Control.OnClick()\r\nat
System.Windows.Forms.Button.OnClick()\r\nat
System.Windows.Forms.ButtonBase.WnProc()\r\nat
System.Windows.Forms.Control._InternalWnProc()\r\nat
Microsoft.AGL.Forms.EVL.EnterMainLoop()\r\nat
System.Windows.Forms.Application.Run()\r\nat
DemoMSMQ.Forms.Program.Main()\r\n
I tested this same code on the desktop and it worked fine. Is there a
problem with my queue path syntax for cf 2.0?
Thanks in advance for your help