473,378 Members | 1,218 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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 10781
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
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
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
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
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
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
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
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
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
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
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.