473,395 Members | 2,006 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,395 software developers and data experts.

console application messages redirect

hey all,
i have a console application that uses the console to display message status
of my process. what's the best way (low impact) to get the messages as they
are now into an email?

thanks,
rodchar
Oct 22 '08 #1
1 2054
On Wed, 22 Oct 2008 07:11:02 -0700, rodchar
<ro*****@discussions.microsoft.comwrote:
hey all,
i have a console application that uses the console to display message
status
of my process. what's the best way (low impact) to get the messages as
they
are now into an email?
Redirect the output to a file and then send the file as email.

Depending on how you're trying to do this, you can accomplish it
programmatically. If you want to accomplish it from without the console
application, you can use the Process class to run your console
application, redirect the output and just write it to a memory data
structure (String, MemoryStream, whatever), and then use the Smtp class to
send the email.

If you want to accomplish it from within the console application itself,
then you might find that using Console.SetOut() to specify your own
TextWriter to write to a memory data structure as above, and then using
the Smtp class would work.

Pete
Oct 22 '08 #2

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

Similar topics

1
by: Oz | last post by:
This is long. Bear with me, as I will really go through all the convoluted stuff that shows there is a problem with streams (at least when used to redirect stdout). The basic idea is that my...
3
by: A.M | last post by:
Hi, I have a C++ console application and I need to integrate it with a C#.NET application. Could you refer me to a resource or link that shows me what kins of options do I have to integrate a...
6
by: Flip | last post by:
In j2ee/JBuilder/WebLogic when you do a System.err.println(), you can see the messages in the console that started the server. When I tried the same type of thing with VS 2k3 .NET and ASPX, I...
2
by: Schorschi | last post by:
Ok, I have my own console class that lets me allocate a console, free it, etc. in my windows vb .net application, hell it even hides the cursor, set colors, etc. But the one thing I want to do is...
4
by: ano | last post by:
I have a console application and a lot of Console.WriteLine(). Now I want to convert it to Windows Form Application. Is it possible to getting all of the console messages to Form.Textbox without...
1
by: John Wright | last post by:
I am running a console application that connects to an Access database (8 million rows) and converts it to a text file and then cleans and compacts the database. When it runs I get the following...
4
by: =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= | last post by:
Hi; When my ASP.NET app is running on IIS, where does the Console.Out.WriteLine("hi there"); output go? -- thanks - dave david_at_windward_dot_net http://www.windwardreports.com
4
by: Peter Nimmo | last post by:
Hi, I am writting a windows application that I want to be able to act as if it where a Console application in certain circumstances, such as error logging. Whilst I have nearly got it, it...
6
by: drhilbert | last post by:
Dear all, in these days, we have found a problem we can't solve even after long long googling, so we are here asking your precious help. In our program instead of using cout to print messages...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
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
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
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...
0
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
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,...

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.