"Trey Carroll"
2009-05-14 03:25:52 UTC
Hello all,
I have a problem that is giving me fits. I have created an
application that uses MSMQ and a private queue. An ASP.NET
application sends xml to the queue and a windows services takes them
out and processes them. This all works beautifully on my XP
development box. Last Friday I started working on deploying this app
to its new home on a production Widows Sever 2003 sp1 box. I don't
think I have ever been so frustrated in my entire career. The send
statements throw no exceptions, but nothing ever shows up in the
queue.
I used a private queue in order to keep things simple. The 2003 box
is part of an Active Directory domain but I don't think this plays
into it since we're not using a public queue.
Here is the command line app that I coded up to test just the send:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Messaging;
using System.IO;
class Debug
{
public const string QUEUE_PATH = @".\private$
\AtHocSDKRequestQueue";
public const bool LOGGING_MODE_ENABLED = true;
public const bool DEBUGGING_MODE_ENABLED = true;
public const string QUEUE_TRANSACTION_LOG = @"c:\codemaroon\logs
\dbgQueueTransLog.txt";
public const string QUEUE_ERR_LOG_FILE = @"c:\codemaroon\logs
\dbgQueueErrLog.txt";
public static void Main()
{
//get the messageQueue inst. var. ready for use
MessageQueue messageQueue;
if (MessageQueue.Exists(QUEUE_PATH))
messageQueue = new MessageQueue(QUEUE_PATH);
else
messageQueue = MessageQueue.Create(QUEUE_PATH, true);
MessageQueueTransaction mqTrans = new MessageQueueTransaction
();
string strXml = "<tamu><test><comment value='Marlin is the
coolest'/></test></tamu>";
mqTrans.Begin();
try
{
messageQueue.Send(new Message(strXml, new
XmlMessageFormatter()));
mqTrans.Commit();
if (LOGGING_MODE_ENABLED)
{
TextWriter tw = File.AppendText
(QUEUE_TRANSACTION_LOG);
tw.WriteLine();
tw.Close();
}
}
catch (Exception ex)
{
if (DEBUGGING_MODE_ENABLED)
{
TextWriter tw = File.AppendText(QUEUE_ERR_LOG_FILE);
tw.WriteLine(ex.Message + ex.StackTrace +
ex.StackTrace + ex.ToString());
tw.Close();
}
mqTrans.Abort();
}
finally
{
messageQueue.Close();
}
}
}
After this executes the queue is empty and so is the log.
Any help that you can offer would be appreciated at a level that
transcends words. All I can think is that there is some freakish
setting having to do with the setup of the box that is causing these
problems. (It is a virtual server set up through virtuozzzo.)
After 3 solid days of reading, googling and tinkering I am at a
complete loss.
I have a problem that is giving me fits. I have created an
application that uses MSMQ and a private queue. An ASP.NET
application sends xml to the queue and a windows services takes them
out and processes them. This all works beautifully on my XP
development box. Last Friday I started working on deploying this app
to its new home on a production Widows Sever 2003 sp1 box. I don't
think I have ever been so frustrated in my entire career. The send
statements throw no exceptions, but nothing ever shows up in the
queue.
I used a private queue in order to keep things simple. The 2003 box
is part of an Active Directory domain but I don't think this plays
into it since we're not using a public queue.
Here is the command line app that I coded up to test just the send:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Messaging;
using System.IO;
class Debug
{
public const string QUEUE_PATH = @".\private$
\AtHocSDKRequestQueue";
public const bool LOGGING_MODE_ENABLED = true;
public const bool DEBUGGING_MODE_ENABLED = true;
public const string QUEUE_TRANSACTION_LOG = @"c:\codemaroon\logs
\dbgQueueTransLog.txt";
public const string QUEUE_ERR_LOG_FILE = @"c:\codemaroon\logs
\dbgQueueErrLog.txt";
public static void Main()
{
//get the messageQueue inst. var. ready for use
MessageQueue messageQueue;
if (MessageQueue.Exists(QUEUE_PATH))
messageQueue = new MessageQueue(QUEUE_PATH);
else
messageQueue = MessageQueue.Create(QUEUE_PATH, true);
MessageQueueTransaction mqTrans = new MessageQueueTransaction
();
string strXml = "<tamu><test><comment value='Marlin is the
coolest'/></test></tamu>";
mqTrans.Begin();
try
{
messageQueue.Send(new Message(strXml, new
XmlMessageFormatter()));
mqTrans.Commit();
if (LOGGING_MODE_ENABLED)
{
TextWriter tw = File.AppendText
(QUEUE_TRANSACTION_LOG);
tw.WriteLine();
tw.Close();
}
}
catch (Exception ex)
{
if (DEBUGGING_MODE_ENABLED)
{
TextWriter tw = File.AppendText(QUEUE_ERR_LOG_FILE);
tw.WriteLine(ex.Message + ex.StackTrace +
ex.StackTrace + ex.ToString());
tw.Close();
}
mqTrans.Abort();
}
finally
{
messageQueue.Close();
}
}
}
After this executes the queue is empty and so is the log.
Any help that you can offer would be appreciated at a level that
transcends words. All I can think is that there is some freakish
setting having to do with the setup of the box that is causing these
problems. (It is a virtual server set up through virtuozzzo.)
After 3 solid days of reading, googling and tinkering I am at a
complete loss.