找到你要的答案

Q:Intellitrace and Windows Services

Q:IntelliTrace和Windows服务

I'm trying to run IntelliTrace on a Windows Service, but encountering some issues. I've (generally) tried the steps that are detailed here: http://blogs.msdn.com/b/msaffer/archive/2011/02/23/using-intellitrace-with-services.aspx.

I've tried VS 2013 Update 3 IntelliTrace download (from Microsoft) and also the new collector thats included with VS 2015 Enterprise RC. Both respond the same.

So:

Test service, registered, running as an administrator (so it's not access rights). An Environment key has been created with the following values:

COR_ENABLE_PROFILING=1
VSLOGGERCPLAN=C:\Intellitrace14\collection_plan.myplan.trace.xml
COR_PROFILER={AAAAAA70-DFED-4CB4-A1D6-920F51E9674A}

(This is the CLSID that is registered for 2015 RC it seems)

When I start the service, it fires up but in the Event Log I get:

The profiler has requested that the CLR instance not load the profiler into this process.

I've tried with both a 32-bit and 64-bit compiled service (and the relevant IntelliTrace being registered).

I know that Windows services aren't realy a supported target for IntelliTrace, but it did used to work with 2010 etc -- has something really changed for the current versions or am I missing something?

I'm trying to run IntelliTrace on a Windows Service, but encountering some issues. I've (generally) tried the steps that are detailed here: http://blogs.msdn.com/b/msaffer/archive/2011/02/23/using-intellitrace-with-services.aspx.

我试过比2013更新3 IntelliTrace下载(微软)以及新型捕收剂是包括在VS 2015企业RC。两者反应相同。

所以:

Test service, registered, running as an administrator (so it's not access rights). An Environment key has been created with the following values:

COR_ENABLE_PROFILING=1
VSLOGGERCPLAN=C:\Intellitrace14\collection_plan.myplan.trace.xml
COR_PROFILER={AAAAAA70-DFED-4CB4-A1D6-920F51E9674A}

(这是CLSID,注册2015 RC看来)

当我启动服务时,它会弹出,但在事件日志中我得到:

The profiler has requested that the CLR instance not load the profiler into this process.

我试着用一个32位和64位编译服务(及有关IntelliTrace注册)。

我知道那不是真的支持Windows服务目标IntelliTrace,却用2010等工作,有一些东西真的改变了当前的版本还是我错过了什么?

answer1: 回答1:

Here is a blog post that explains how to collect data from a windows service in production using IntelliTrace. http://bit.ly/1bTfcIO

If you have any issues following this guide you can also contact me directly at angelos.petropoulos@microsoft.com

On a related note, here is also the announcement that IntelliTrace in Visual Studio 2015 Enterprise now also supports attaching to a running process. http://bit.ly/1bT1Psn This means you can also attach to a running windows service without restarting it.

这是一篇博客文章,解释如何从Windows服务使用IntelliTrace生产数据收集。http://bit.ly/1btfcio

如果您有任何的问题,下面这个指南也可以直接与我联系在angelos.petropoulos@microsoft.com

在一个相关的说明,这也是现在在Visual Studio 2015企业IntelliTrace还支持附加到正在运行的进程的公告。http://bit.ly/1bt1psn这意味着你也可以附加到一个正在运行的Windows服务没有启动它。

answer2: 回答2:

This post is a bit old and you may have figured it out already... but I had the same issue and, after much searching, a bit of screaming and a lot of trial and error, I finally hit on the problem. The environment setting is very sensitive to extra spaces. Once I cleaned out spaces around or next to the equal signs and from the end of each line, IntelliTrace worked for me.

这篇文章有点老,你可能已经想通了…但我有同样的问题,经过多次搜索,一点点的尖叫和大量的试验和错误,我终于击中了这个问题。环境设置对额外空间非常敏感。一旦我清理空间的周围或旁边的等号,从每一行的结尾,IntelliTrace为我工作。

c#  .net  intellitrace