Console.Out inside IIS

M

Mike Schilling

Consider these two statements:

1. Writing to System.Console.Out in a program running inside IIS has no
effect.

This comes from observation. I have some code which writes an exception
stack trace to Console.Out (not the right way to do things, I know.) Under
IIS, this output does not appear anywhere I can find.

2. Calling Console.SetOut in an ASP.NET program would affect the entry
aspnet_wp worker process, not just the application domain that made the
call.

The obvious way to make my code work without rewriting it is to redirect
Console.Out (and Console.Err) to a log file. I'm guessing that this is a
bad idea because of statement 2, that doing so would affect all of ASP.NET,
since System is part of an application neutral assembly.

If either of these is incorrect, or I'm simply looking at things the wrong
way, please let me know.
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top