Exemplo n.º 1
0
		public ServiceHost(ILog log, IStatusMonitor statusMonitor)
		{
			Log = log;
			StatusMonitor = statusMonitor;
			_host = new WebServiceHost(typeof(Service), ServiceUri);
			// TODO: Enable HTTPS - http://stackoverflow.com/questions/14933696
			_host.AddDefaultEndpoints()[0].Binding = new WebHttpBinding();
			_host.Description.Endpoints[0].Behaviors.Add(new WebHttpBehavior { HelpEnabled = true });

			_webAppHost = new WebServiceHost(typeof(WebServer), WebAppUri);
			_webAppHost.AddDefaultEndpoints()[0].Binding = new WebHttpBinding();
			_webAppHost.Description.Endpoints[0].Behaviors.Add(new WebHttpBehavior());
		}