开发者

Intercommunication between two .Net Applications using WCF service

I have a WPF application. On the same machine I have a console application.From this console application i want to see if user has successfully logged in and a particular page is open in WPF application. If this is the case then i want to show a popup in WPF application.

To implement this I Thought of using WCF services. I have got 2 options. Create a seperate WCF service and run it as soon as WPF application runs and 开发者_JAVA技巧then ask the client application to communicate.

Second option is to host the WCF service inside the WPF application and run it when WPF application starts.

I am not able to decide on which way to choose. If anyone of u has implemented this kind of setup before,please share your ideas.


Because you want to see if a page is open in the WPF application, I'd suggest hosting the WCF service in the WPF application (i.e., using the ServicHost class). Then have the console application consume the service to determine the page status as per your requirement.

Also, use the NetNamedPipeBinding (http://msdn.microsoft.com/en-us/library/system.servicemodel.netnamedpipebinding.aspx).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜