473,503 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System.Messaging?

Hello everyone
I'm trying to use the namespace using System.Messaging. My Visual Studio.Net
could not recognize this namespace. Should I have to install a plug in or
what should I do to have this piece of demo works

public class MQSend
{

public static void Main(String[] args)

{

string appName = Environment.GetCommandLineArgs()[0];

if(args.Length != 2)

{

Console.WriteLine("Usage: " + appName +" <queue> <message>");

}

else

{

string mqPath = ".\\" + args[0];

if(!MessageQueue.Exists(mqPath))

{

MessageQueue.Create(mqPath);

}

MessageQueue mq = new MessageQueue(mqPath);

mq.Send(args[1]);

}

Console.WriteLine();

Console.WriteLine("Press Enter to continue...");

Console.ReadLine();

}

}
Nov 16 '05 #1
1 10816
Hi,

You have to add a reference to it:
From menu:
Project/Add reference and search System.Messaging.dll in the list

You can do a similar thing using Right click over "References" in the
project explorer

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Hai Nguyen" <ha******@neo.tamu.edu> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hello everyone
I'm trying to use the namespace using System.Messaging. My Visual Studio.Net could not recognize this namespace. Should I have to install a plug in or
what should I do to have this piece of demo works

public class MQSend
{

public static void Main(String[] args)

{

string appName = Environment.GetCommandLineArgs()[0];

if(args.Length != 2)

{

Console.WriteLine("Usage: " + appName +" <queue> <message>");

}

else

{

string mqPath = ".\\" + args[0];

if(!MessageQueue.Exists(mqPath))

{

MessageQueue.Create(mqPath);

}

MessageQueue mq = new MessageQueue(mqPath);

mq.Send(args[1]);

}

Console.WriteLine();

Console.WriteLine("Press Enter to continue...");

Console.ReadLine();

}

}

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5949
by: ptdaw | last post by:
After spending a little time reading the documentation, I attempted to add some messaging code to my VB.Net project, only to discover that I couldn't get past my Imports System.Messaging ...
0
5590
by: Fidias Gil de Montes | last post by:
In a Distributed Windows application, I receive the following message when the client calls the server: ************** Exception Text ************** System.InvalidCastException: Unable to cast...
2
7436
by: Tony Hamill | last post by:
Hi, I am trying to set up a VERY simple project to send message to MSMQ from ..Net using C#. When I run my code it throws an exception "An unhandled exception of type...
1
249
by: Hai Nguyen | last post by:
Hello everyone I'm trying to use the namespace using System.Messaging. My Visual Studio.Net could not recognize this namespace. Should I have to install a plug in or what should I do to have this...
0
3323
by: Frederico Guimar?es via DotNetMonster.com | last post by:
Hi, I'm trying to use the Microsoft.Web.Services2.Messaging. ISoapFormatter but I receive this error: System.Xml.XmlException: The root element is missing. at System.Xml.XmlTextReader.Read()...
1
2109
by: John A Grandy | last post by:
in .NET 2.0 where is the type Message located ? in .NET 1.1 it was System.Messaging.Message
0
1386
by: Saurabh | last post by:
I am doing Hands on Lab 33(WSE 2 chat program, last exercise) . When I run the 2 .exe's on same machine, the chat program works fine. But when I run the same exe on 2 different machines(within...
2
3236
by: Kups | last post by:
Hi! I have a service and client that use WSE 2.0 and soap.tcp. Both are behind firewalls. Client connects to a public machine's tcp port which is redirected to service. If I send a request ...
2
1990
by: jparulan | last post by:
Hi All, I am developing web service that does not use IIS, I was successful on deploying a normal web service with System.Data and System.Web namespaces. BUT when I added the...
0
7192
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7064
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7315
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6974
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7445
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5559
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3158
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3147
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1492
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.