473,473 Members | 1,837 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

WebPageTraceListener

I've followed the directions in
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_aspnetcon/html/18b560f6-120b-462d-8e9f-0baf34c4919d.htm

but am not able to get trace output from the business object to the trace
displayed in the web page . It shows up in the vs2005 output window but I'd
like it interspersed with the trace from the page load as this article claims
to do .

Any Ideas ? Any more information needed ?
thanks
-chaz

Aug 4 '06 #1
3 2029
Have you tried simply passing in an instance of the Page class into your
business object (possibly as a ctor overload) and simply calling
Page.Trace.Write?
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"chaz" wrote:
I've followed the directions in
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_aspnetcon/html/18b560f6-120b-462d-8e9f-0baf34c4919d.htm

but am not able to get trace output from the business object to the trace
displayed in the web page . It shows up in the vs2005 output window but I'd
like it interspersed with the trace from the page load as this article claims
to do .

Any Ideas ? Any more information needed ?
thanks
-chaz


Aug 4 '06 #2
Thanks for the sample . We were able to determine that the
System.Diagnostics.Trace.Write() that wasn't showing up was actually part of
a code path that exists during session_start .

simply ,
application_beginRequest was followed by Session_start (as no session
existed yet) which had a module that called System.Diagnostics.Trace.Write()
..
This diagnostic never made it to the page output presumably because the page
hadn't been created yet .

So this indicates that the earliest one can write to the trace and expect it
output to the webpage is during or after pre-init.

"Walter Wang [MSFT]" wrote:
Hi,

I've created a simple web application following the walkthrough steps as
you mentioned in the MSDN Library. And it works correctly on my system.
Please see if it works on your system.

Please note you may need to use Outlook Express to download my attachment.

Hope this helps. Please feel free to post here if anything is unclear.
Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights
Aug 9 '06 #3
Hi,

Thanks for your update.

The reason that you didn't see System.Diagnostics.Trace.Write() output is
because the TraceContext.IsEnabled property is false in Session_Start. I
believe your Page's Trace is turned on but web.config wasn't. Therefore,
before Page is initialized, the IsEnabled property is reading from
web.config and by default it's false. So writing trace information at this
time will not be displayed.

Hope this helps. Please feel free to post here if anything is unclear.

Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Aug 10 '06 #4

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

Similar topics

1
by: Mukund Patel | last post by:
Hi Friends, I am working on asp.net in .net studio 2005 (Whidbey). I want to write trace in file in my web application. How to implement Diagnostics Trace features in Whidbey. I have written...
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...
0
by: rehto | last post by:
We have an ASP.NET 2.0 (C#) app and we want to enable tracing (see the code snippets below). The first time a user navigates to the app., the tracing works fine (the ASP.NET tracing appears on...
3
by: chaz | last post by:
I would like my trace entries to have a timestamp so I figured I could set the properties on the trace listener to accomplish this but THAT that doesn't see to work . dim txtListener as...
0
by: Rick | last post by:
I'm trying to implement application tracing for a single session but am not having much luck. I'd like to isolate TraceContext application level messages for a single session and have them logged...
0
by: Erik Cruz | last post by:
Hi. I am trying to execute the steps of the walkthrough "Integrating ASP.NET Tracing with System.Diagnostics Tracing". But when I change my Web.config to use the listeners, I receive errors for...
0
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,...
0
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,...
1
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...
0
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...
1
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...
0
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...
0
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 ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
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...

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.