Groups | Blog | Home
all groups > c# > january 2004 >

c# : [REPOST] Queuing application not working


Abhishek Srivastava
1/4/2004 10:27:50 PM
Hello All,

I am trying to implement the MQ application from quick start samples.
I am getting the following error upon running either the client or the
server.

Unhandled Exception: System.Messaging.MessageQueueException: A workgroup
install
ation computer does not support the operation.
at System.Messaging.MessageQueue.Create(String path, Boolean
transactional)
at System.Messaging.MessageQueue.Create(String path)
at MQRecvSrv.Main(String[] args)

But I am not on a workgroup. I am part of a domain. I also use my domain
id to login to my computer.
Can someone tell me what is the reason for this error and how can this
be solved?

[quoted text, click to view]

MQ Send
------------
using System;
using System.Messaging;

public class Person
{
public string name;
public string surname;
}

public class ServSend
{
public static void Main(string[] args)
{
if(!MessageQueue.Exists(".\\MyQueue"))
{
MessageQueue.Create(".\\MyQueue");
Console.WriteLine("Queue created");
}

MessageQueue mq = new MessageQueue(".\\MyQueue");
Person p = new Person();
p.name = "abhishek";
p.surname = "srivastava";
mq.Send(p);
}
}

MQ Receive.
--------------
using System;
using System.Messaging;
using System.IO;
using System.Runtime.Serialization;

public class MQRecvSrv
{
public static void Main(string[] args)
{
if (!MessageQueue.Exists(".\\MyQueue"))
{
MessageQueue.Create(".\\MyQueue");
Console.WriteLine("Queue created");
}
MessageQueue mq = new MessageQueue(".\\MyQueue");
((XmlMessageFormatter)mq.Formatter).TargetTypeNames = new
string[]{"Person"};
Person p = (Person) mq.Receive(new TimeSpan(0, 0, 3)).Body;
Console.WriteLine(" \n Name {0} Surname {1} \n", p.name, p.surname);
Console.WriteLine();
Console.WriteLine("Press enter to continue...");
Console.ReadLine();
}
}

Thanks for your help in advance.

I had posted this problem before but didn't get a response. So I am
posting it again.

regards,
Abhishek.
Abhishek Srivastava
1/5/2004 6:05:24 AM
You are right. While installing IIS it had asked me a question on MSMQ
and domain controller. However I skipped that step. Can you give me the
steps on how to do it now.

Thank you for your help.

regards,
Abhishek.
[quoted text, click to view]
Willy Denoyette [MVP]
1/5/2004 10:33:33 AM
Did you select "Active directory integration" when installing MSMQ?
If not, MSMQ was set-up to operate in workgroup mode, this has nothing to do
with domain membership.

Willy.

[quoted text, click to view]

Scott Allen
1/5/2004 11:58:17 AM
The easiest solution is probably to uninstall MSMQ and install again.

--
Scott
http://www.OdeToCode.com

On Mon, 05 Jan 2004 06:05:24 +0530, Abhishek Srivastava
[quoted text, click to view]
Willy Denoyette [MVP]
1/5/2004 8:32:15 PM

[quoted text, click to view]
Click "help and support " on the start menu and search for MSMQ.
And before using MSMQ I would suggest you read some documentation on the
subject in MSDN.

Willy.


AddThis Social Bookmark Button