[REPOST] Queuing application not working

  • Thread starter Thread starter Abhishek Srivastava
  • Start date Start date
A

Abhishek Srivastava

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?

Below is the client server code which I wrote

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.
 
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.
Willy said:
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.


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?

Below is the client server code which I wrote

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.
 
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.
 
Abhishek Srivastava said:
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.
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.
 
Back
Top