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.
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.