1

将 Visual Studio 2010 Profiler 附加到我的 wcf 服务后,我收到以下错误。

无法激活请求的服务“net.tcp://host:port/path/myservice.svc”。有关详细信息,请参阅服务器的诊断跟踪日志。

否则该服务运行良好,一旦我停止分析,我就可以再次连接并使用该服务。

我能在网上找到的最接近类似情况的地方是这里,但 Net.Tcp 侦听器适配器不会在我的服务器上停止,重新启动它也无济于事。iisreset 也不会。

我在事件日志中收到以下条目:

初始化 AppDomain 失败:/LM/W3SVC/1/ROOT/MyService

异常:System.Web.HttpException

消息:无法加载文件或程序集“MyService”或其依赖项之一。试图加载格式不正确的程序。内部异常:System.Configuration.ConfigurationErrorsException

消息:无法加载文件或程序集“MyService”或其依赖项之一。试图加载格式不正确的程序。

内部异常:System.BadImageFormatException

消息:无法加载文件或程序集“MyService”或其依赖项之一。试图加载格式不正确的程序。

这听起来像分析器在检测时创建了一个错误的 dll 吗?如果是这样,我将如何解决这个问题?

4

1 回答 1

1

There were a couple issues at work here. 1) the binaries were being instrumented as 32 bit instead of 64 bit. This seemed to be a problem with the visual studio profiler, but also could have been a symptom of issue 2) I was attempting to profile remotely instead of on the physical machine which isn't supported.

I installed the command line tools on the test server and am looking to profile that way.

于 2010-10-27T19:43:15.487 回答