连接 VS 2010 探查器时无法访问 WCF 服务

发布于 2024-09-28 09:05:04 字数 970 浏览 2 评论 0 原文

将 Visual Studio 2010 探查器附加到我的 WCF 服务后,我收到以下错误。

请求的服务, 'net.tcp://主机:端口/路径/myservice.svc' 无法激活。请参阅 服务器的诊断跟踪日志 更多信息。

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

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

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

初始化失败 应用程序域:/LM/W3SVC/1/ROOT/MyService

异常:System.Web.HttpException

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

消息:无法加载文件或 程序集“MyService”或其中之一 它的依赖项。进行了尝试 加载一个不正确的程序 格式。

内部异常: System.BadImageFormatException

消息:无法加载文件或 程序集“MyService”或其中之一 它的依赖项。进行了尝试 加载一个不正确的程序 格式。

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

I'm receiving the following error after I attach the visual studio 2010 profiler to my wcf service.

The requested service,
'net.tcp://host:port/path/myservice.svc'
could not be activated. See the
server's diagnostic trace logs for
more information.

The service works great otherwise, and as soon as I stop profiling, I can connect and use the service again.

The closest I could find to a similar situation online was here, but the Net.Tcp Listener Adapter does not stop on my server, and restarting it does not help either. Neither does an iisreset.

I'm receiving the following entry in the event log:

Failed to initialize the
AppDomain:/LM/W3SVC/1/ROOT/MyService

Exception: System.Web.HttpException

Message: Could not load file or
assembly 'MyService' or one of its
dependencies. An attempt was made to
load a program with an incorrect
format. InnerException:
System.Configuration.ConfigurationErrorsException

Message: Could not load file or
assembly 'MyService' or one of
its dependencies. An attempt was made
to load a program with an incorrect
format.

InnerException:
System.BadImageFormatException

Message: Could not load file or
assembly 'MyService' or one of
its dependencies. An attempt was made
to load a program with an incorrect
format.

Does this sound like the profiler is creating a bad dll when instrumenting? If so, how would I get around that?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

演出会有结束 2024-10-05 09:05:04

这里的工作有几个问题。
1) 二进制文件被检测为 32 位而不是 64 位。这似乎是 Visual Studio Profiler 的问题,但也可能是问题 2) 的症状,我试图远程而不是在不受支持的物理机上进行配置。

我在测试服务器上安装了命令行工具,并希望以这种方式进行分析。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文