问题描述
_traceEventSession = new TraceEventSession(SessionName,TraceEventSessionoptions.Create);
_traceEventSession.EnableProvider(
ClrTraceEventParser.ProviderGuid,Microsoft.Diagnostics.Tracing.TraceEventLevel.Verbose,(ulong)(ClrTraceEventParser.Keywords.Threading | ClrTraceEventParser.Keywords.Contention));
调用 EnableProvider
时出错
在本地环境中一切正常,我不使用 KernelProvider,所以我真的不明白为什么会发生这种情况。此外,我在 .NET 公共语言运行时提供程序部分添加了 IIS_IUSRS 的所有权限,但它根本没有帮助。