mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2026-01-03 15:24:11 +00:00
DnsService: windows service project implemented.
This commit is contained in:
@@ -33,7 +33,7 @@ namespace DnsService
|
|||||||
|
|
||||||
protected override void OnStart(string[] args)
|
protected override void OnStart(string[] args)
|
||||||
{
|
{
|
||||||
_service = new DnsWebService(args[0]);
|
_service = new DnsWebService();
|
||||||
_service.Start();
|
_service.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -32,6 +32,9 @@
|
|||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<ApplicationIcon>logo2.ico</ApplicationIcon>
|
||||||
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Configuration.Install" />
|
<Reference Include="System.Configuration.Install" />
|
||||||
@@ -51,11 +54,11 @@
|
|||||||
<Compile Include="ProjectInstaller.Designer.cs">
|
<Compile Include="ProjectInstaller.Designer.cs">
|
||||||
<DependentUpon>ProjectInstaller.cs</DependentUpon>
|
<DependentUpon>ProjectInstaller.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Service1.cs">
|
<Compile Include="DnsService.cs">
|
||||||
<SubType>Component</SubType>
|
<SubType>Component</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Service1.Designer.cs">
|
<Compile Include="DnsService.Designer.cs">
|
||||||
<DependentUpon>Service1.cs</DependentUpon>
|
<DependentUpon>DnsService.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Program.cs" />
|
<Compile Include="Program.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
@@ -67,8 +70,8 @@
|
|||||||
<EmbeddedResource Include="ProjectInstaller.resx">
|
<EmbeddedResource Include="ProjectInstaller.resx">
|
||||||
<DependentUpon>ProjectInstaller.cs</DependentUpon>
|
<DependentUpon>ProjectInstaller.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Service1.resx">
|
<EmbeddedResource Include="DnsService.resx">
|
||||||
<DependentUpon>Service1.cs</DependentUpon>
|
<DependentUpon>DnsService.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -77,5 +80,8 @@
|
|||||||
<Name>DnsServerCore</Name>
|
<Name>DnsServerCore</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="logo2.ico" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
||||||
@@ -1,9 +1,4 @@
|
|||||||
using System;
|
using System.ServiceProcess;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.ServiceProcess;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace DnsService
|
namespace DnsService
|
||||||
{
|
{
|
||||||
|
|||||||
2
DnsService/ProjectInstaller.Designer.cs
generated
2
DnsService/ProjectInstaller.Designer.cs
generated
@@ -33,7 +33,7 @@
|
|||||||
//
|
//
|
||||||
// serviceProcessInstaller1
|
// serviceProcessInstaller1
|
||||||
//
|
//
|
||||||
this.serviceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.NetworkService;
|
this.serviceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.LocalSystem;
|
||||||
this.serviceProcessInstaller1.Password = null;
|
this.serviceProcessInstaller1.Password = null;
|
||||||
this.serviceProcessInstaller1.Username = null;
|
this.serviceProcessInstaller1.Username = null;
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,15 +1,10 @@
|
|||||||
using System;
|
using System.ComponentModel;
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Configuration.Install;
|
using System.Configuration.Install;
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace DnsService
|
namespace DnsService
|
||||||
{
|
{
|
||||||
[RunInstaller(true)]
|
[RunInstaller(true)]
|
||||||
public partial class ProjectInstaller : System.Configuration.Install.Installer
|
public partial class ProjectInstaller : Installer
|
||||||
{
|
{
|
||||||
public ProjectInstaller()
|
public ProjectInstaller()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -118,7 +118,7 @@
|
|||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<metadata name="serviceProcessInstaller1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="serviceProcessInstaller1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>17, 17</value>
|
<value>17, 56</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="serviceInstaller1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="serviceInstaller1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>196, 17</value>
|
<value>196, 17</value>
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
|
|||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
// set of attributes. Change these attribute values to modify the information
|
// set of attributes. Change these attribute values to modify the information
|
||||||
// associated with an assembly.
|
// associated with an assembly.
|
||||||
[assembly: AssemblyTitle("DnsService")]
|
[assembly: AssemblyTitle("Technitium DNS Server")]
|
||||||
[assembly: AssemblyDescription("")]
|
[assembly: AssemblyDescription("Technitium DNS Server")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("")]
|
[assembly: AssemblyCompany("Technitium")]
|
||||||
[assembly: AssemblyProduct("DnsService")]
|
[assembly: AssemblyProduct("Technitium DNS Server")]
|
||||||
[assembly: AssemblyCopyright("Copyright © 2017")]
|
[assembly: AssemblyCopyright("Copyright © 2017")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|||||||
BIN
DnsService/logo2.ico
Normal file
BIN
DnsService/logo2.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.3 KiB |
Reference in New Issue
Block a user