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

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,125
Latest member
VinayKumar Nevatia_
Top