|
using System;
using System.ComponentModel;
using System.Configuration.Install;
using System.Diagnostics;
using System.IO;
using System.ServiceProcess;
namespace WCFOverHttps
{
[RunInstaller(true)]
public partial class WcfOverHttpsServiceInstaller : Installer
{
public WcfOverHttpsServiceInstaller()
{
InitializeComponent();
Installers.Add(GetServiceInstaller());
Installers.Add(GetServiceProcessInstaller());
}
public WcfOverHttpsServiceInstaller(IContainer container)
{
container.Add(this);
InitializeComponent();
}
private static ServiceInstaller GetServiceInstaller()
{
Process pc = Process.GetCurrentProcess();
Directory.SetCurrentDirectory
(pc.MainModule.FileName.Substring(0, pc.MainModule.FileName.LastIndexOf(@"\", StringComparison.CurrentCulture)
));
ServiceInstaller installer = new ServiceInstaller
{
ServiceName = "WCF Over Https",
Description = "WCF Over Https"
};
return installer;
}
private static ServiceProcessInstaller GetServiceProcessInstaller()
{
ServiceProcessInstaller installer = new ServiceProcessInstaller { Account = ServiceAccount.LocalSystem };
return installer;
}
}
}
|
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.