Reputation: 1147
I'm trying to reference a .exe project (with a Main) to a WCF Service, But I Can't. The Following Message is prompt :
"a reference to Class.cs could not be added, A project must be build to 'dll' extension in order to be referenced."
What is the correct way of doing it? Is there any way of referencing a .exe File to a WCF Service?
If yes, when will the Service (The Main Class) be called? On Windows Start up? On IIS Start up? Other? Can we configure it?
If not, is there any way of putting a wcf service activety waiting in a port for clients? (either on startup, on iis startup, or other(please name it)?
Upvotes: 0
Views: 161
Reputation: 12904
You cannot reference an .exe to a WCF service.
In order to make the functionality available, you will need to expose a method on the WCF service contract and code the implementation of this to create an instance of the exe and handle the input and output accordingly.
Upvotes: 4