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.
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.