コード例 #1
0
ファイル: ServiceHost.cs プロジェクト: strotz/Connector
		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());
		}