473,385 Members | 1,449 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

System.Diagnostics.Trace.WriteLine Problem in C#

I'm wondering why this line:

System.Diagnostics.Trace.WriteLine("Some Text");

Does not work in C# in an ASP.NET application? While this one does:

System.Diagnostics.Trace.Listeners[0].Write("Some Text");

I don't want to worry about writing to each listener. Should the first line
work??

Thanks,
David

======================================
David McCarter [Microsoft MVP]
www.dotNetTips.com
David McCarter''''s .NET Coding Standards available at:
http://www.cafepress.com/geekmusicart.1654787045
Jul 1 '08 #1
0 3679

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Raj Dhrolia | last post by:
Hi, In one of my method, I want to know the class/function that called/invoked this method. i.e. i have a function named Method1() in class1. I want "ClassX.MethodX()" in Method1(), when...
4
by: A.M | last post by:
Hi, If I use System.Diagnostics.Debug.WriteLine in a asp.net application, where does the output go? Is there any trace monitor application thar shows me the trace output? Thanks, Allan
4
by: Jiho Han | last post by:
I have the following defined in web.config under <configuration> node: <system.diagnostics> <switches> <add name="MainSwitch" value="4"/> </switches>
1
by: Patrick | last post by:
When Tracing in ASP.NET, the IIS process (on IIs5.1) is locking on the Trace file, and I can't read the trace file without restarting the IIS: Even the following does NOT work (how could I fix...
0
by: Frederic ESNOUF \(MVP-ISA\) | last post by:
Hi, I use System.Diagnostics.Trace.WriteLine command in my applications to debug the code (VB). When the application is compiled, I use debugview from sysinternals to trap these debug...
1
by: Oleg Ogurok | last post by:
Hi there, My ASP.NET 2.0 app uses an external assembly that calls methods like Trace.Write() and Trace.TraceError() of namespace System.Diagnostics. I need to enable tracing in my web app so...
7
by: gilad | last post by:
Hi, I would like to add some code to system.data so I can trace calls to SqlConnection class. I used ildasm.exe, got the il code, added some of mine and used the ilasm.exe to get a new assembly. ...
12
by: Zytan | last post by:
I use System.Diagnostics.StackTrace to get the stack trace of the current function, to print out the function's name to the log, and sometimes it shows that a function that doesn't even write to...
1
by: samueltilden | last post by:
I am writing one particular web app in ASP.NET 2.0 in debug mode. Even when I step through the code, the IDE skips over every occurrence of System.Diagnostics.Trace.WriteLine(), but honors...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.