How to add WebServiceHost (POST/GET) support in EPIServer plugin?


I have a C# class project which is my EpiServer plugin. I added a reference to my plugin from the standard Alloy web service project in order to debug.

I wonder how I can set up a WebServiceHost in my plugin, so that I from my plugin's JavaScript code can post and get data based on user's interaction. The reason I need this is that I have some javascript UI interaction with the user, and when user hits a button I need to create a token which I only cna do in C#.

Do I have to add a new web service project and bundle that with my plugin (if this is possible), or does my plugin have access to set up an endpoint through Epi framework?

There is also the possibility to get points for answers:

Aug 04, 2015 17:05

Have you looked into using ASP.NET Web API for your endpoints? It's much easier to get up an running than anything WCF in my experience:

Feb 15, 2016 21:28
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.