Hello everyone,
I've been toying around a bit with WCF services and I'm giving myself a learning project to work on. Basically what I want to do is write a new custom control that is encapsulates some WCF-based functionality. I'd like to be able to add this control to my web project and enable an AJAX-based call to a WCF service. My custom control will be reponsible for rendering the appropriate javascript code to initiate the call to a WCF service, which is simply responsible for reading some values from the Cache object, and updating the page with the results that were just returned from the WCF service.
From what I've read, all WCF services need to be created in a page with a .svc extension. However, I don't want to have to include a .svc file with my control. I'd like the .DLL file for the control to INCLUDE the service, if that's possible.
I'm not sure if I'm taking the right approach here or not, so basically there are two questions:
1) Is it possible to encapsulate a .svc file inside of the assembly I'll be creating the control in, so that where my control is deployed, the necessary service is deployed with it? If it is, how? And how what code would I need to add in order to provide my ScriptManager control with a reference to the service?
2) If not, does anyone have recommendations for an alternate approach? I might be over-complicating it here. I chose a WCF service because one, I wanted to experiment with it and two, I know it can be called from client-side code quite easily.
Thanks,
Scott
Scott M Schluer
---
MCPD: ASP.NET Developer 3.5
