T
Tony Hamill
Hi,
can somebody provide me with the correct syntax for creating a message queue in C#.
I have
private void button1_Click(object sender, System.EventArgs e) {
// C#
try{
string QueueName = @"DIRECT=OS:81.98.63.102\PRIVATE$\testq";
MessageQueue myQueue = new MessageQueue();
myQueue.Path=QueueName;
if ( myQueue.Transactional ) {
myQueue.Send("My Message Data.", new MessageQueueTransaction());
}
}
catch (Exception f) {
label1.Text=f.Message;
}
}
but get "Invalid Queue name"
if I put FormatName in front of the DIRECT it fails with "The specified frmat name does not support the requested operation. For example a direct queue format name cannot be deleted". I am finding it very difficult to get reliable information on this.
Any help greatly appreciated.
can somebody provide me with the correct syntax for creating a message queue in C#.
I have
private void button1_Click(object sender, System.EventArgs e) {
// C#
try{
string QueueName = @"DIRECT=OS:81.98.63.102\PRIVATE$\testq";
MessageQueue myQueue = new MessageQueue();
myQueue.Path=QueueName;
if ( myQueue.Transactional ) {
myQueue.Send("My Message Data.", new MessageQueueTransaction());
}
}
catch (Exception f) {
label1.Text=f.Message;
}
}
but get "Invalid Queue name"
if I put FormatName in front of the DIRECT it fails with "The specified frmat name does not support the requested operation. For example a direct queue format name cannot be deleted". I am finding it very difficult to get reliable information on this.
Any help greatly appreciated.