I'm trying to write a re-usable .NET Assembly that implements WCF.
My current problem is how to take the assembly (appropriately decorated with ServiceContract, DataContract, and WebGet attributes) and reference it in my existing ASP.NET WebForms application and expose it using REST.
Ideally I like different endpoints for JQuery compatible Bare XML, JSON and SOAP WebServices, but right now I'd be happy with getting Bare XML to work. Right now all I get is 404 Resource cannot be found).
Another issue is that the API has many methods. As such, it is going to be painful to have to create a svc file that wraps the assembly.
Here is my system.serviceModel in my web.config
So, once I get this to work, I could then theoretically write a .NET Console app that hosts this assembly over netTcp.
The only 3 ways that I have found to implement this are I've come up with 3 possible ways to do this
- Create a new svc file that wraps calls around my `WcfService1.WcfService` and implements `WcfService1.ITest` and putting appropriate Factory attribute in the markup. This is not desirable at all.
- The other approach is to create a `WebServiceHost` class somewhere (do I use Global.asax?), although I do not know how to do this, or if this is a valid solution at all.
- Use ASP.NET MVC to implement a solution, although I think the same problems as the svc approach will come in to play.
Thanks in advance for any help.