Console.Out defaults to the stdout host process thread. On Windows, only executables marked as having the Console type have a stdout stream directed to the console window - for all other executable types (GUI and Service processes), then stdout does not go anywhere.
ASP.NET runs in w3wp.exe , which is a service process without a GUI. As @akton points out, it goes into a zero stream, so everything written will be lost.
If you want to track operations for debugging (more precisely, debugging after opening), use Debug.WriteLine or use a logging library such as log4net .
source share