473,782 Members | 2,443 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Trace from a service running in web application

In the Application_OnS tart event in global.asax, my code calls an
AlertService which creates a System.Timers.T imer() object. So this service
doesn't actually run in conjunction with a specific aspx page, apparently.
When the timer's Elapsed event handler fires, it calls some other classes I
have written. These classes output some Trace statements that you can view
if an aspx page calls them, but I can't seem to figure out where the Trace
statements go when my service calls the classes.

Is there any way I can find the trace for this service?
--
[[((hillarie))]]

To reply, remove ".SPAMBLOCK " from email address
Nov 17 '05 #1
1 1527
Doing some research, I've come across the System.Diagnost ics tools. I have
set up my application to write to a textfile, c:\listener.log , but while the
file was automatically created, I am not able to write to the file.

code...

web.config:

<system.diagnos tics>
<switches>
<add name="tracewebf orms" value="1" />
<add name="tracebusi nesslogic" value="1" />
</switches>
<trace autoflush="true " >
<listeners>
<add name="ImplicitL istener"
type="System.Di agnostics.TextW riterTraceListe ner, System,
Version=1.0.330 0.0, Culture=neutral , PublicKeyToken= b77a5c561934e08 9"
initializeData= "c:\TraceListen er.log"/>
<remove name="Default" />
</listeners>
</trace>
</system.diagnost ics>

<compilation defaultLanguage ="c#" debug="true">
<compilers>
<compiler
language="C#;Cs harp"
extension=".cs"
type="Microsoft .CSharp.CSharpC odeProvider, System, Version=1.0.330 0.0,
Culture=neutral , PublicKeyToken= b77a5c561934e08 9"
compilerOptions ="/d:TRACE" />
</compilers>
</compilation>

Page_load event of webform:

System.Diagnost ics.Trace.Write LineIf(Global.w ebformsSwitch.E nabled,"Trace
From WebForms");
What could prevent the WriteLineIf from actually writing to the file?

--
[[((hillarie))]]

To reply, remove ".SPAMBLOCK " from email address

"H Branyan" <hb************ ****@merc.merce r.edu> wrote in message
news:bn******** ****@ID-92475.news.uni-berlin.de...
In the Application_OnS tart event in global.asax, my code calls an
AlertService which creates a System.Timers.T imer() object. So this service doesn't actually run in conjunction with a specific aspx page, apparently.
When the timer's Elapsed event handler fires, it calls some other classes I have written. These classes output some Trace statements that you can view if an aspx page calls them, but I can't seem to figure out where the Trace
statements go when my service calls the classes.

Is there any way I can find the trace for this service?

Nov 17 '05 #2

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

Similar topics

1
3826
by: Sean Walker | last post by:
I have installed the Microsoft Enterprise Instrumentation framework and have installed the samples. I have events successfully being logged to the Application Event Log using the Simple Instrumentation Sample Application. I cannot however get the TraceEventSink to log them, even though the Windows Trace Session Manager service is running. Nothing shows up in the Trace Log. My environment is as follows:
2
307
by: H Branyan | last post by:
In the Application_OnStart event in global.asax, my code calls an AlertService which creates a System.Timers.Timer() object. So this service doesn't actually run in conjunction with a specific aspx page, apparently. When the timer's Elapsed event handler fires, it calls some other classes I have written. These classes output some Trace statements that you can view if an aspx page calls them, but I can't seem to figure out where the Trace...
5
2936
by: who be dat? | last post by:
Hello all. I'm writing an application that is writing trace information that can be viewed in trace.axd. I would like to rename this and use a different name specific to my application. I know the name of this is set in machine.config. I was hoping it would be possible to change this in web.config. I got it to work, kind of. Good news is I can change the name in my web.config file. Bad news is that trace.axd still works meaning I can...
9
4443
by: Joe Rattz | last post by:
I can't seem to get to trace.axd. I have turned tracing on in web.config. Here is how I currently have i configured: <trace enabled="true" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="false" />
1
4372
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 this??): System.Diagnostics.Trace.WriteLine(System.DateTime.Now.ToLongTimeString()+ "--" + dirException.ToString()); System.Diagnostics.Trace.Flush(); ((System.Diagnostics.TraceListener) System.Diagnostics.Trace.Listeners).Close();
0
994
by: orencs | last post by:
Hi I am using IIS6 on Windows Server 2003. I am trying to write to the trace log via Web Service but fails. System.Diagnostics.Trace.WriteLine("some message"); I am using DebugView to see the traces. The Web Service is the hello world example with the statement above. I have changed the username= attribute in the machine.config file to
8
2150
by: Bryan | last post by:
Does anyone have an example of an application that can connect to a running process and capture Trace.WriteLine calls like in SQL Server Profiler? I know that we can inherit from a TraceListener class to write to files, databases, etc..., but I would really like to attach to running .NET processes and get the results without any logging and instead capture the real-time results when troubleshooting.
1
1380
by: Tris | last post by:
I've got a web service running, and i'm trying to build tracing into it that is outputted to a file. Unfortunately, i can't find a way of enabling TRACE token, and it just seems to skip over all System.Diagnostics.Trace lines in the debugger. I don't want to use the ASP page trace dump, as it will break my SOAP interface. This code is called on my application start event:
3
1900
by: Eternal | last post by:
Hello there, I am working on an service that uses Trace.writeline(....) to log its activities. My question is, is there any way to clear this log while the application is still running. My service runs for a long time (days, if any bad code doesnt crash it) and as the time goes by the log is growin huge in size. So what I am trying to do is check for the log files' size and clear it or delete it (when it exceeds a size limit) while the...
0
9641
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10313
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10146
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8968
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4044
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3643
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.