Last post Aug 10, 2010 05:55 AM by jason9364
Jul 27, 2009 08:29 PM|srnichols|LINK
Is it possible to self-host the starter kit in a windows service? I have an existing windows service I would like to add some of the starter kits functionality too but I have been unable to get it to work in a self-hosting scenario with an app.config file.
Has anyone does this?
Jul 28, 2009 07:27 AM|billsm|LINK
I am assuming that you want to use this for commercial development The reason you are having trouble is this
Unfortunately The rest starter kit is available in a non-commercial environment
which means legally you are in trouble if you use this.....
see this post
I will be posting on the next frame how to distribute this for your future reference
I enjoyed these videos from pluralsite....Look for the next release of
rest starter kit (legal issues) and they will tell you what the story is
Visual studio 2010 is coming and I am sure the rest starter kit
will be released then....
Jul 28, 2009 08:07 AM|billsm|LINK
here are some screencasts.....
Jul 30, 2009 01:50 PM|srnichols|LINK
Actually, I am not using this for commercial development. I have an open source project which I am going to be posting on CodePlex. My code base today already has a WCF layer, which works fine. The services get spun up via a self-hosting windows service
on an application server rather than hosting in IIS on a web server. The application is a tool designed for enterprises, to be run inside an intranet scenario.
I stumbled access the WCF Starter Kit and really liked what I saw regarding the RESTful support (something missing from my app). However, I have been thus far unsuccessful in getting the “WebServiceHost2” to spin up in a Windows service or console app self-hosting
scenario which reads from teh app.config, not sure what I am doing wrong or if the Starter Kit was designed to only work in an web hosting environment.
Yep, the Pluralsite videos are great, I just wish there was one that addresses my particular scenario.
Aug 07, 2009 08:18 PM|preetsangha|LINK
It took a while to get this to work but I manged to get self hosting to work. Unfortunately the code was done months ago and I haven't got access to it. However I seem to recall that I need to specify a more than one parameter to the host or it wouldn't
start - IIRC it was contract and endpoint uri. I'll do my best to try and find the code.
Ok found it. I used the following after trying
many different techniques.
var host = new WebServiceHost2(new DerivedFromCollectionServiceBase<T> (), new Uri(<--- string with ep address --->)));
Aug 10, 2010 05:55 AM|jason9364|LINK
I found it worked with
var host = new WebServiceHost2(typeof(whatever), false)
Without the false (dummy) it didn't run up any interfaces.