Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Trace from a service running in web application

Reply
Thread Tools

Trace from a service running in web application

 
 
H Branyan
Guest
Posts: n/a
 
      10-23-2003
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 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


 
Reply With Quote
 
 
 
 
Natty Gur
Guest
Posts: n/a
 
      10-23-2003
Hi,

You can't use TraceContext from class that is not part of page request
process since trace can be use from Context only. you can use diagnostic
(namespace) trace class to write to variety of outputs.

Natty Gur[MVP]
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
H Branyan
Guest
Posts: n/a
 
      10-23-2003
Hi Natty - I have found some tutorials on the System.Diagnostics namespace
but I am unable to write to a log file. I posted a followup to my original
post asking for more info on my problem. Thank you for your reply.

--
[[((hillarie))]]

To reply, remove ".SPAMBLOCK" from email address



"Natty Gur" <(E-Mail Removed)> wrote in message
news:eQQ#(E-Mail Removed)...
> Hi,
>
> You can't use TraceContext from class that is not part of page request
> process since trace can be use from Context only. you can use diagnostic
> (namespace) trace class to write to variety of outputs.
>
> Natty Gur[MVP]
> Phone Numbers:
> Office: +972-(0)9-7740261
> Fax: +972-(0)9-7740261
> Mobile: +972-(0)58-888377
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
trace.axd and asp.net trace feature IIS only? Jiho Han ASP .Net 0 08-22-2006 12:44 PM
How to redirect output from Diagnostics.Trace to Page.Trace? Matthias S. ASP .Net 1 11-30-2005 09:01 AM
Trace: Can anyone suggest a good tool to catch trace messages? Rukmal Fernando ASP .Net 4 10-27-2003 09:03 PM
Trace from a service running in web application H Branyan ASP .Net 1 10-23-2003 05:06 PM



Advertisments