ASP.NET ETW provider missing on win7 computer

I am writing an ETW consumer to listen for ASP.NET events. I have sample code that works well on a Windows 2008 server, where it can see the ASP.NET provider. The problem I am facing is that on my Win7 (64) computer I do not see the ASP.NET provider, so this code shows all events as "unhandled". I made sure that the trace function is installed, and the applicationhost.config file has the corresponding values ​​in it.

When I do logman query providers, I don’t see ASP.NET AFF081FE-0247-4275-9C4E-021F3DC1DA35 on the PC, but I see this on the Win2008 server that I am testing on.

How can I do one of the two points below: Add this as a provider to my Win7 computer?

OR

Ask the code to process this message and provide a manifest in my code. When I set "AFF081FE-0247-4275-9C4E-021F3DC1DA35" as a provider, I get events, but they are from an unknown provider. Therefore, I assume that the contents of the manifest are missing.

My sample code below

    static void Test3()
    {
        var sessionName = "ASPNETMonitorSession";
        using (var session = new TraceEventSession(sessionName, null))  
        {
            Console.WriteLine("Starting Test1");
            session.StopOnDispose = true;
            Console.CancelKeyPress += delegate(object sender, ConsoleCancelEventArgs e)
            {
                session.Dispose();
            };
            using (var source = new ETWTraceEventSource(sessionName, TraceEventSourceType.Session))
            {
                Action<TraceEvent> action = delegate(TraceEvent data)
                {
                    Console.WriteLine("GOT EVENT: " + data.ToString());
                };

                var registeredParser = new RegisteredTraceEventParser(source);
                registeredParser.All += action;
                source.UnhandledEvents += delegate(TraceEvent data)
                {
                    if ((int)data.ID != 0xFFFE)         
                        Console.WriteLine("GOT UNHANDLED EVENT: " + data.Dump());
                };

                session.EnableProvider(new Guid("AFF081FE-0247-4275-9C4E-021F3DC1DA35"));
                Console.WriteLine("Starting Listening for events");
                source.Process();                                                              
            }
        }
        Console.WriteLine("Done");
        return;
    }
+4
source share
1 answer

The reason ASP.NET tracing is not available on your local computer is because it is not installed. If you look at perfview , it gives instructions on how to enable it.

FYI perfview uses TracEeventto capture traces.

Here

ASP.NET
  ASP.NET , , - . PerfView , ASP.NET . PerfView , ASP.NET "", ASP.NET . , ASP.NET, ASP.NET , .

ASP.NET

- DISM, .

DISM /online /Enable-Feature /FeatureName:IIS-HttpTracing

, - ( ), , ASP.NET ( ). DISM ( ) . , . , . , GUI. Windows. , .

- β†’ β†’ β†’ β†’ Windows β†’ β†’ β†’ β†’ - β†’ β†’ β†’ β†’ - (IIS) β†’ β†’

, .

0

Source: https://habr.com/ru/post/1584486/


All Articles