2

I'm having an issue trying to find an error with a web service using .NET 1.1. In .NET 2.0/3 I can add a trace section to my web config like:

<system.diagnostics>
    <trace autoflush="true" />
    <sources>
      <source name="System.Web.Services.Asmx">
        <listeners>
          <add name="AsmxTraceFile" type="System.Diagnostics.TextWriterTraceListener" initializeData="c:\subconnector\local.log" traceOutputOptions="LogicalOperationStack, DateTime, Timestamp, ProcessId, ThreadId" />
        </listeners>
      </source>
    </sources>
    <switches>
      <add name="System.Web.Services.Asmx" value="Verbose"  />
    </switches>
  </system.diagnostics>

And that works great, I get detailed logs of what is hitting the service. But when I tried to use that in a .NET 1.1 site, it gave an error - it does not recognize the tags. So using what I could find while googling, I trimmed it down to:

<system.diagnostics>
    <switches>
      <add name="General" value="4" />
      <add name="Data" value="1" />
      <add name="System.Web.Services.Asmx" value="4" />
    </switches>
    <trace autoflush="true" indentsize="4" >
        <listeners>
          <add name="TextListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="d:\logfiles\local.log"  />
        </listeners>
    </trace>
</system.diagnostics>

(I added the "General" and "Data" lines .. because I saw that in the MSDN page for the switches...)

But nothing is written to my log file. The file gets created, but no output. Anyone have any insight on how to get tracing?

(My problem is, a consumer of our web service is getting a "network error" - We can see a IIS log entry when they try to access the service, but there's no other indication it gets past the initial IIS hit - no other logs are written. We can hit the web service using the discovery page (hitting the .asmx page), and it works fine.)

Thanks.

John T
  • 2,687
  • 2
  • 27
  • 36
  • 1
    Is that a typo on the "System.Web.Services" line? – John Saunders Jun 16 '11 at 14:46
  • 1
    See http://www.bing.com/search?q=System.Web.Services.Asmx+.net+1.1&go=&qs=n&sk=&form=QBRE. It may teach you why not to use obsolete and unsupported software (.NET 1.1). – John Saunders Jun 16 '11 at 14:50
  • Yes, it was a type, fixed, thanks. – John T Jun 16 '11 at 15:01
  • 2
    And yes, I know .NET 1.1 is old and unsupported. Unfortunately, we still have systems using it, and for the time being have to support it. – John T Jun 16 '11 at 15:03
  • To my mind, "if it ain't broke, don't fix it" only applies to code you don't have to touch. If you have to touch it, then it's "broke". – John Saunders Jun 16 '11 at 15:57
  • Totally agree :) We are in the process of replacing the code with more up to date code (.NET 3.5), but unfortunately in this case, a quick fix needed to be made. – John T Jun 16 '11 at 17:10
  • @John: Great. BTW, why not go to .NET 4.0. Why start move from ancient to just plain old? Hardware or OS support? – John Saunders Jun 16 '11 at 19:02
  • LOL.. I'd love to move up to .NET 4.0, but our systems are barely on .NET 3... One of the big holdbacks is we still have (cringes) Classic ASP and VB6 code... – John T Jun 16 '11 at 19:37
  • @John: It's a different discussion, but moving to .NET 4.0 is not a migration. In most cases, it will amount to opening the project in VS2010, changing the project settings to .NET 4.0, and rebuilding. You'll have to change IIS settings to 4.0, but that's about all. If you're going to move to 3.5, then there's no reason not to go all the way to .NET 4.0. It's .NET 1.1 to .NET 2.0 that's the big jump, since some of the 2.0 fixes are incompatible. – John Saunders Jun 16 '11 at 19:43
  • Well aware ;) We're just in the middle of several big projects and don't want to make an environment change in the middle. Sure, it should be seamless, but this is Microsoft and .NET we're talking about here - it's never seamless ;) Once we get a chance, we will be moving up. – John T Jun 16 '11 at 19:56
  • @John: being at .NET 1.1, maybe you don't know - they got so much grief over the .NET 1.1-2.0 upgrade that they fixed their entire model going forward. You will not see any significant breaking changes going from 2.0 to 4.0. In fact, .NET 3.5 is just .NET 2.0 plus some service packs and extra assemblies. Finally, .NET 2.0 and 4.0 CLR can run at the same time. There's really no reason to stop at .NET 3.0 or 3.5. – John Saunders Jun 16 '11 at 20:00
  • Well, at this time, the reason is the time it would take to do the upgrades. We'll get to it eventually ;) And the problem is solved - the consumer of the web service had something misconfigured! Gotta love it when it's not your problem :)... now to figure out how to "close" this question... – John T Jun 20 '11 at 13:25
  • @John: I'll handle "closing" it. – John Saunders Jun 20 '11 at 14:05

0 Answers0