Re: newbie question about web.config, tracing

From: Alvin Bruney [MVP] (vapor)
Date: 03/10/04


Date: Tue, 9 Mar 2004 21:13:54 -0600

The reason for the repost is that threads from devdex.com dont include the
original and i have no way to know what the original question was.

You do not need to use conditional macros. These don't find much use in
.net. Just turn tracing on. It's default is false. The turning on or off is
handled from the <trace> node of the webconfig file. This is better than
macros because you may turn the trace utility on or off without touching the
code. When tracing is turned off, the trace call returns immediately. This
is a slight performance hit but pales in comparison to the added ability it
brings in terms of debugging

-- 
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Jiho Han" <jiho.han@infinityinfo.com> wrote in message
news:e%23z%23i%23dBEHA.2440@TK2MSFTNGP12.phx.gbl...
> No I did not resolve the issue.  I would still like assistance but why the
> need for a repost?
>
> Thanks
>
> "Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
> news:eLt2opdBEHA.2380@TK2MSFTNGP10.phx.gbl...
> > Your post went unanswered. Have you resolved this issue? If you still
need
> > help, please post the original question with your request.
> >
> > -- 
> > Regards,
> > Alvin Bruney [ASP.NET MVP]
> > Got tidbits? Get it here...
> > http://tinyurl.com/3he3b
> > "Jiho Han" <jiho.han@infinityinfo.com> wrote in message
> > news:eeQJalfAEHA.212@TK2MSFTNGP12.phx.gbl...
> > > I have a solution built with conditional #if(DEBUG) ... #endif, so
that
> > > statements like Context.Trace.Write("this is a trace statement."); are
> > only
> > > compiled into a debug build and not into a release one.  So that works
> > like
> > > a charm.  I built a debug and a release solution.  In my dev
> environment,
> > > things behave the way I want them to, debug build writes out to the
> trace
> > so
> > > I can view them via Trace.axd and the release doesn't.
> > >
> > > The issue arises when I deploy the debug build to the testing
> environment.
> > > The debug build no longer writes output to the trace.  Tracing itself
is
> > > working because I see other Context.Trace.Write statements that are
not
> > > enclosed by #if(DEBUG)... #endif.
> > > The ones that were enclosed, ones I'm interested in are not.  I figure
> > there
> > > must be some kind of setting in web.config or machine.config
somewhere,
> > but
> > > I can't seem to find it.
> > >
> > > Can someone help?
> > > Thanks.
> > >
> > >
> >
> >
>
>


Relevant Pages

  • Re: newbie question about web.config, tracing
    ... The reason for the repost is that threads from devdex.com dont include the ... original and i have no way to know what the original question was. ... handled from the <trace> node of the webconfig file. ... I built a debug and a release solution. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: 70-316 unsure of the question
    ... Tracing is enabled by default for both Debug and Release builds. ... Trace is enabled by default. ... Change the .config file in the local machine and add an entry for the ...
    (microsoft.public.cert.exam.mcad)
  • Re: Anyone know how to add a "Debug window" in own app
    ... debug messages in a release build using Trace.WriteLine or Console.WriteLine ... > Because TRACE is defined in Release builds by VS.NET. ... > the people who use your code won't alter the config file? ... > config file will enable the default trace listener.) ...
    (microsoft.public.dotnet.framework)
  • Re: dynamic web page viewer based on url in query sting?
    ... Bob Mixon ... Microsoft SharePoint Portal Server MVP ... I have added trace and debug code to the Web Part so we can see what ... Both the debug and release versions are now available on my Web ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: dynamic web page viewer based on url in query sting?
    ... I have added trace and debug code to the Web Part so we can see what is going on. ... Initially download and install the debug version, it outputs more debug and trace information than the release version does. ... it can be a fully qualified URL or a relative URL; as long as it will properly return a browser page in the Pge Viewer Web Part. ... Microsoft SharePoint Portal Server MVP ...
    (microsoft.public.sharepoint.portalserver.development)