-1

I'm writing a windows desktop service that is supposed to download content from a file server on a weekly basis, but it requires users login information to function.

I need the service to be able to "talk back" to the simple tray application I've developed to inform it when things have happened. Things like

Is the users login info good?

Did the content start downloading?

Did the content finish downloading?

I've seen posts on WCF, but, at a glance, WCF feels to me like it's just designed to go around web services. This is going to be a desktop service, not a web service, so unless I'm mistaken in my interpretation, I do not think that WCF is going to work for me? What's my alternative? (or, if I'm mistaken about WCF, can someone point me to a simple tutorial?)

Will
  • 3,413
  • 7
  • 50
  • 107

2 Answers2

1

You need to use either a Socket or a NamedPipe. Typically NamedPipe is preferred because it won't trigger some restrictive firewalls that monitor loopback interface as well.

Example of Named Pipes

Community
  • 1
  • 1
tunafish24
  • 2,288
  • 6
  • 28
  • 47
  • I did decide to go with named pipes. I found something so idiot proof even I shouldn't be able to screw it up http://tech.pro/tutorial/633/interprocess-communication-using-named-pipes-in-csharp. – Will Jun 27 '15 at 05:15
0

Write a WCF service and configure a key in the web config(which specifies the user name and password" of the WCF service. Pass the same key from the windows service and authenticate it, once authentication is success, Download the files

eg: http://www.codeproject.com/Articles/166763/WCF-Streaming-Upload-Download-Files-Over-HTTP