473,794 Members | 2,774 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 1528
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
2937
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
1381
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
9518
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
10433
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...
1
10161
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10000
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9035
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
7538
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
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3720
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2919
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.