Skip to main content

Posts

Showing posts with the label WCF

Inter-Process communication (between two desktop applications) using WCF

We will break the problem in small sets as this will answer few commonly asked questions like – Self hosting a WCF, Hosting  WCF in desktop application, Inter- Process communication using WCF. We will use the application we created in last post . Please find below the project structure that we will be using.  We are using a “common” project to define the contract so that contracts can be shared between projects. Contract using System.ServiceModel; namespace Common {     [ ServiceContract ]     public interface ICommunicate     {         [ OperationContract ]         string HandShake( string message);     } } Add reference of “Common” project to the main (windows application project - BackgroundApp). Service Class using Common; namespace BackgroundApp.Service {   ...

How to delete and create windows service using SC

This post is going to be a really small and simple. In this I will just write down the use of SC utility to delete and create windows services. There are lot of resources on web but I am just posting it to have it for my reference :) as I perform these actions quiet often. How to create .NET windows service :- On local computer Go to Run -> Cmd use SC -  sc create <service name>  binpath= "<exe folder>\<exe name>" e.g. sc create MySampleService binpath= "D:\MySampleServiceProject\MySampleService.exe" point to note: There should not be a space between binPath and '='. Service name should be in double quotes ("). There must be a space between '=' and the services exe path. On Remote Computer Go to Run -> Cmd  use SC -  sc <remoteservername> create <service name>  binpath= "<exe folder>\<exe name>" How to delete.NET windows service :- sc delete <servicename> ...