473,322 Members | 1,778 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,322 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 10755
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: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.