|
using System;
using System.ServiceModel;
using System.ServiceProcess;
using WCFOverHttps.WCFHost;
namespace WCFOverHttps
{
public partial class WcfOverHttpsService : ServiceBase
{
private ServiceHost m_host;
public WcfOverHttpsService()
{
InitializeComponent();
}
protected override void OnStart(string[] args)
{
StartWcfService();
}
protected override void OnStop()
{
try
{
if (m_host != null)
{
m_host.Close();
m_host = null;
}
}
catch(Exception ex)
{
//handle exception
}
}
private void StartWcfService()
{
m_host = new ServiceHost(typeof(WcfService));
m_host.Open();
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.