Tracing from webservice



Hello,

I'm having trouble using the System.Diagnostics.Trace class in a
webservice running .NET 2.0 - calls to Trace.WriteLine is filtered out
by the compiler, which can be seen by the debugger skipping the line.
According to documentation this is due to the TRACE compiler option not
being defined. But, also according to the documentation, TRACE is
defined in both the Debug and the Release configuration in Visual
Studio, but this clearly isn't true for webserviceprojects, as putting
a "#define TRACE" in the top of the CS file results in the desired
behavior.

I don't want to put a "#define TRACE" in every single CS file - this
should be centrally controlled. But I can't seem to find a place in the
webserviceproject to define compileroptions. Does anyone know how to do
this?

Best regards
Hendrik

.



Relevant Pages

  • RE: How to intercept the XML requests sent by the proxy?
    ... Regarding on the intercepting the SOAP message sent by webservice proxy ... I think you can just some some certain trace ... This posting is provided "AS IS" with no warranties, and confers no rights. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: StackWalk64 doesnt work without pdb files?!?
    ... > I run my compiled prograwm and it prints her stack trace. ... > when i remove the pdb file - the trace is partially printed ... VC++ 2003 linker cannot put debug information into the executable. ... Even if you use /Z7 compiler option, ...
    (microsoft.public.vsnet.debugging)
  • Re: upload 50M file to web service got 500 internal server error
    ... How would you recommend getting a 100 meg data file to a webservice ... > Try looking at the response in the trace. ... > back if you install a trace web service extension (avaliable from ... > Right now maxRequestLength property of Web App and Webservcie are all set to ...
    (microsoft.public.dotnet.framework.webservices)
  • RE: Debugging Questions
    ... Trace Class ... Tracing helps you isolate problems ... Note To enable debugging in C#, add the /d:TRACE flag to the compiler ... configuration file to set a switch, see the Switch class and TraceSwitch ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Sending business objects over a webservice
    ... After adding reference the web service, ... However, for the compiler, it has ... > Looks like the usual namespace gripe. ... >> it's order to an online server using a webservice. ...
    (microsoft.public.dotnet.framework.webservices)