简体   繁体   English

如何调试由Windows服务托管的WCF

[英]How to debug a WCF hosted by a windows service

I have a WCF service and it is hosted in a Windows Service (Not IIS) I created. 我有一个WCF服务,它托管在我创建的Windows服务(非IIS)中。

I have created a client console app and it installed on a different PC. 我创建了一个客户端控制台应用程序,它安装在另一台PC上。

I have tested it all and the WCF method is invoked OK by the client. 我已经测试了所有,并且客户端调用了WCF方法。

Normally, i host my WCF under IIS and I would normally attach to the w3wp.exe process and debug it. 通常,我在IIS下托管我的WCF,我通常会附加到w3wp.exe进程并进行调试。

What process do I attach when it is hosted by my web service? 当我的网络服务托管时,我会附加什么过程?

I have tried attaching to the service exe but the breakpoint did not get hit. 我已经尝试附加到服务exe但是断点没有被击中。

So, my question is how do I debug my WCF under a Windows Service? 所以,我的问题是如何在Windows服务下调试我的WCF?

Thanks 谢谢

You should just attach to service that you created on remote PC. 您应该只附加在远程PC上创建的服务。 To check all services that is installed on remote PC go: 要检查远程PC上安装的所有服务,请执行以下操作:

Contoll panel -> Administrating -> Services Contoll面板 - >管理 - >服务

Just find your service there and you can connect to it. 只需在那里找到您的服务,您就可以连接到它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM