How can I redirect Console.Writeline to Response.Output?

How can I redirect Console.Writeline to Response.Output?

Post by QUFPTSBUaW » Thu, 22 Mar 2007 23:08:05



--
Tim Meagher
 
 
 

How can I redirect Console.Writeline to Response.Output?

Post by UGV0ZXIgQn » Fri, 23 Mar 2007 03:49:35

You can't. First off, there is no "Console" to write to in an ASP.NET app,
that exists only on the server. I mean, you could certainly experiment with
redirecting the output stream of the console class, but man it would be some
ugly code.
Is there any special reason why you need to try to do this?
Peter

--
Site: http://www.yqcomputer.com/
UnBlog: http://www.yqcomputer.com/
Short urls & more: http://www.yqcomputer.com/

 
 
 

How can I redirect Console.Writeline to Response.Output?

Post by QUFPTSBUaW » Fri, 23 Mar 2007 04:14:23

I'm trying to share some logging classes between console applications and web
apps in which if the logger fails than it dumps the log message to the
console.

--
Tim Meagher