0

I would like to trace HTTP communication in my c# assembly (.Net 4.5). As the .Net code is wrapped with COM interop and finally used in COM container applications I have no app.config file of the main app to configure tracing the usual way.

What I have found so far was always at some point tied to app.config (e.g. rewrite that file and load with ConfigurationMagager or Trace.refresh())

There is an SO answer about enabling tracing at runtime without an app.config file using reflection. Is this the only route or is there a simpler way to switch on tracing, say, for the DEBUG version of such an assembly?

Community
  • 1
  • 1
  • You always can use a sniffer like wireshark or fiddler. – jdweng Jan 12 '17 at 16:59
  • There certainly *is* an app.config file, it must be stored in the same directory as the client EXE and have a matching name. That the client programmer did not use .NET is not relevant. – Hans Passant Jan 12 '17 at 18:02
  • @HansPassant: you are absolutely right. I was locked into my stream of thought that I did not even check. Thanks a lot! – interdings Jan 13 '17 at 08:28
  • @jdweng: Besides Hans' advice I will use fiddler to log additional information. – interdings Jan 13 '17 at 08:28

0 Answers0