I have a WCF service hosted in windows service.
Currently when the windows service starts i have to “touch” the WCF service with a client to run some long running code in WCF service.
Is it somehow possible to auto start the long running code in WCF service without calling the service with a client?
IIS 7.5 is not an option.
Yes, use
OnStartmethod for this. It will be triggered once the Windows service gets a START command from OS.Put your “touch” code (logic) there.