• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

System.net tracing

A
#1
Hi,

I have been using system.net tracing with powershell v2 without issue on my
Vista desktop without issue.

However, when I try it on w2k3 server sp2 and powershell v1 I get no file
created and nothing in dbgview. I have tried several servers with different
builds. Does anyone know if there are issues using system.net tracing with
powershell v1 on w2k3 sp2?

I am using the powershell.exe.config file below

Thanks.

<configuration>
<system.diagnostics>
<sources>
<source name="System.Net" tracemode="includehex"
maxdatasize="1024">
<listeners>
<add name="System.Net"/>
</listeners>
</source>
<source name="System.Net.Sockets">
<listeners>
<add name="System.Net"/>
</listeners>
</source>
<source name="System.Net.Cache">
<listeners>
<add name="System.Net"/>
</listeners>
</source>
</sources>
<switches>
<add name="System.Net" value="Verbose"/>
<add name="System.Net.Sockets" value="Verbose"/>
<add name="System.Net.Cache" value="Verbose"/>
</switches>
<sharedListeners>
<add name="System.Net"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="network.log"
/>
</sharedListeners>
<trace autoflush="true"/>
</system.diagnostics>
</configuration>
 

My Computer

R

RichS [MVP]

#2
Check that you have the same versions of .NET on Vista and Win 2003
--
Richard Siddaway
All scripts are supplied "as is" and with no warranty
PowerShell MVP
Blog: http://richardsiddaway.spaces.live.com/
PowerShell User Group: http://www.get-psuguk.org.uk


"Adam" wrote:

> Hi,
>
> I have been using system.net tracing with powershell v2 without issue on my
> Vista desktop without issue.
>
> However, when I try it on w2k3 server sp2 and powershell v1 I get no file
> created and nothing in dbgview. I have tried several servers with different
> builds. Does anyone know if there are issues using system.net tracing with
> powershell v1 on w2k3 sp2?
>
> I am using the powershell.exe.config file below
>
> Thanks.
>
> <configuration>
> <system.diagnostics>
> <sources>
> <source name="System.Net" tracemode="includehex"
> maxdatasize="1024">
> <listeners>
> <add name="System.Net"/>
> </listeners>
> </source>
> <source name="System.Net.Sockets">
> <listeners>
> <add name="System.Net"/>
> </listeners>
> </source>
> <source name="System.Net.Cache">
> <listeners>
> <add name="System.Net"/>
> </listeners>
> </source>
> </sources>
> <switches>
> <add name="System.Net" value="Verbose"/>
> <add name="System.Net.Sockets" value="Verbose"/>
> <add name="System.Net.Cache" value="Verbose"/>
> </switches>
> <sharedListeners>
> <add name="System.Net"
> type="System.Diagnostics.TextWriterTraceListener"
> initializeData="network.log"
> />
> </sharedListeners>
> <trace autoflush="true"/>
> </system.diagnostics>
> </configuration>
>
 

My Computer

A
#3
Hi Richard,

both versions have .Net 2 and I did run filemon and saw it accessing the
version 2 .net dll's. This functionality was supposedly introduced in .net
framework v2 and so I would have thought it should work both v1 and v2 of
powershell as they are both built on top of v2. I thought there might have
been something I was missing on the server side but I haven't found
anything. I think I will park this one until I have more time to build some
test environments.

Cheers,

Adam.

"RichS [MVP]" <RichSMVP@xxxxxx> wrote in message
news:F6B5F729-182D-4F88-B27E-0FAF7A351116@xxxxxx

> Check that you have the same versions of .NET on Vista and Win 2003
> --
> Richard Siddaway
> All scripts are supplied "as is" and with no warranty
> PowerShell MVP
> Blog: http://richardsiddaway.spaces.live.com/
> PowerShell User Group: http://www.get-psuguk.org.uk
>
>
> "Adam" wrote:
>

>> Hi,
>>
>> I have been using system.net tracing with powershell v2 without issue on
>> my
>> Vista desktop without issue.
>>
>> However, when I try it on w2k3 server sp2 and powershell v1 I get no file
>> created and nothing in dbgview. I have tried several servers with
>> different
>> builds. Does anyone know if there are issues using system.net tracing
>> with
>> powershell v1 on w2k3 sp2?
>>
>> I am using the powershell.exe.config file below
>>
>> Thanks.
>>
>> <configuration>
>> <system.diagnostics>
>> <sources>
>> <source name="System.Net" tracemode="includehex"
>> maxdatasize="1024">
>> <listeners>
>> <add name="System.Net"/>
>> </listeners>
>> </source>
>> <source name="System.Net.Sockets">
>> <listeners>
>> <add name="System.Net"/>
>> </listeners>
>> </source>
>> <source name="System.Net.Cache">
>> <listeners>
>> <add name="System.Net"/>
>> </listeners>
>> </source>
>> </sources>
>> <switches>
>> <add name="System.Net" value="Verbose"/>
>> <add name="System.Net.Sockets" value="Verbose"/>
>> <add name="System.Net.Cache" value="Verbose"/>
>> </switches>
>> <sharedListeners>
>> <add name="System.Net"
>> type="System.Diagnostics.TextWriterTraceListener"
>> initializeData="network.log"
>> />
>> </sharedListeners>
>> <trace autoflush="true"/>
>> </system.diagnostics>
>> </configuration>
>>
 

My Computer

Users Who Are Viewing This Thread (Users: 1, Guests: 0)