[英]I want to add a WCF service to an already existing project but under Add Items I don't find WCF service in VS2010?
[英]wcf : Service + Client in same solution, how to debug? I don't want to run 2 versions of VS 2010 at the same time
I have created an application which has a client (WPF) and the Server (WCF), the service is IIS hosted, currently I am having to have 2 versions of vs 2010. One loads the wcf service in IIS and the other in my windows應用。
問題是它需要太多資源。
如果 wcf 服務是“NOT”托管在 IIS 中,那么我可以根據此http://msdn.microsoft.com/765-en同時啟動兩個項目。
但是我的其他選擇是什么?
我需要找到能夠編譯/運行 2 個項目並在調試時能夠 STEP INTO 的最佳方法,而無需使用太多資源或同時打開多個 vs 2010。
如果它們在同一個解決方案中,您應該能夠從同一個 Visual Studio 實例進行調試。 當您從 Visual Studio 運行應用程序時,打開調試菜單並選擇附加到進程,您需要將調試器附加到 ASP.NET 工作進程 (aspnet_wp.exe),它應該會自動附加到您的客戶端。
調試 WCF 服務的最簡單方法是:
http://localhost:12345/MyService.svc
運行您的應用程序。
當應用程序調用 WCF 方法時,它應該在斷點處停止。
在 VS 中打開服務和客戶端代碼。 打開調試菜單。 附加到進程。 按住 Ctrl 鍵和select 使用鼠標單擊來調試盡可能多的進程。
在您的情況下,您可以 select ASP NET 工作進程,具體取決於 IIS 和客戶端進程的版本。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.