Hi;
When my ASP.NET app is running on IIS, where does the
Console.Out.WriteLine("hi there"); output go?
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm> Hi;
> When my ASP.NET app is running on IIS, where does the
> Console.Out.WriteLine("hi there"); output go?
>
I don't think it goes anywhere. It definitely doesn't go to the client, as
this
runs on the server. But that server process doesn't have any console to writ
e
to,
so this output is ignored.
If you want to write logging, try log4net http://logging.apache.org/log4net/
Hans Kesting
Hello Dave,
As for the Console, each win32 process has a standard console output, input
and err, you can write data to output. In console application, the console
output is directly displayed. For winform or asp.net application, it is not
displayed, there does have means to redirect console in .NET:
#Redirect I/O to a TextBoxWriter in .NET
http://www.codeguru.com/csharp/csha...cle.php/c11777/
However, for ASP.NET application, I think you may consider other means
according to your actual scenario. Are you wantting to write out some debug
or trace data? If so the System.Diagnostics namespace contains classes that
help perform debug and trace or logging.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
========================================
==========
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscript...ault.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscript...t/default.aspx.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.
I was wondering if IIS had a feature like the java app servers where they
write the console and error output to a file on the server. It's a useful
feature at times. Based on the replies I am guessing it does not have this.
(We do use log4net.)
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
"Steven Cheng[MSFT]" wrote:
> Hello Dave,
> As for the Console, each win32 process has a standard console output, inpu
t
> and err, you can write data to output. In console application, the console
> output is directly displayed. For winform or asp.net application, it is no
t
> displayed, there does have means to redirect console in .NET:
> #Redirect I/O to a TextBoxWriter in .NET
> l]
> ications.
>
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> [url]http://msdn.microsoft.com/subscriptions/support/default.aspx." target="_blank">http://www.codeguru.com/csharp/csha...t/default.aspx.
> ========================================
==========
>
> This posting is provided "AS IS" with no warranties, and confers no rights
.
>
Thanks for your reply Dave,
Actually, in .net framework application, those Diagnostics interfaces such
as Debug, Trace object are the expected object for output some tracing
info, you can redirect the output to your prefered output storage such as
database, disk file.... Java console is simply a particular console which
bind to the standard process output.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment