windows service
-
Is the WCF service hosted by your Windows service? Or is a different executable? If the second, obviously the WCF service sees an empty queue, because it references a different object from the one used by the Windows service.
-
Then, as I said, the queue you use in the WCF service is different from the one populated in the Windows service. The WCF service must be hosted by the Windows service and reference the same instance of the queue. See here for hosting WCF services in custom applications.
-
Then, as I said, the queue you use in the WCF service is different from the one populated in the Windows service. The WCF service must be hosted by the Windows service and reference the same instance of the queue. See here for hosting WCF services in custom applications.
I see what you mean. To make me understand better I would like to ask: 1- can my issue be solved if silverlight page accesses the method which is inside the windows service project? I think the answer is No and even if it did I still face the same issue because it will be lokking at a different instance to the one with the queue in it. I guess the only way to get around this is as you said to host the wcf inside the windows service project which has the queue in it being build. Am I right please? Thanks
-
I see what you mean. To make me understand better I would like to ask: 1- can my issue be solved if silverlight page accesses the method which is inside the windows service project? I think the answer is No and even if it did I still face the same issue because it will be lokking at a different instance to the one with the queue in it. I guess the only way to get around this is as you said to host the wcf inside the windows service project which has the queue in it being build. Am I right please? Thanks
-
Now you have a Windows service (that is actually a console application) that manages your queue, and a console application that exposes a WCF service. What you have to do is to put the two things together: include the code of the new console app into the code of your Window Service and make sure that both reference the same queue instance. Then, when you start the Windows service, it will also expose the WCF service that you can call from Silverlight.
-
Now you have a Windows service (that is actually a console application) that manages your queue, and a console application that exposes a WCF service. What you have to do is to put the two things together: include the code of the new console app into the code of your Window Service and make sure that both reference the same queue instance. Then, when you start the Windows service, it will also expose the WCF service that you can call from Silverlight.
-
Hi, I don't think I have "and a console application that exposes a WCF service" I only have a windows service.
You said "I have now developed a simple console app based on the example". So I thought that you had put the WCF service on a separate Console Application. If you have already put the WCF service into the Windows service, you should be able to browse it from IE on the url you specified when coding it (the example I gave you uses http://localhost:8080/hello). You have only to add a service reference to your WCF service in the Silverlight application so that it can communicate with the Windows service.
-
You said "I have now developed a simple console app based on the example". So I thought that you had put the WCF service on a separate Console Application. If you have already put the WCF service into the Windows service, you should be able to browse it from IE on the url you specified when coding it (the example I gave you uses http://localhost:8080/hello). You have only to add a service reference to your WCF service in the Silverlight application so that it can communicate with the Windows service.