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

G

Guest

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
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,434
Messages
2,571,691
Members
48,796
Latest member
Greg L.

Latest Threads

Top