Added separate providers for IIS 8 and FTP 8

This commit is contained in:
feodor_fitsner 2012-09-13 19:51:24 -07:00
parent d72e715ee6
commit d826a96f6d
12 changed files with 271 additions and 16 deletions

View file

@ -29,7 +29,7 @@ GO
-- IIS 8.0 -- IIS 8.0
IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [DisplayName] = 'Internet Information Services 8.0') IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [DisplayName] = 'Internet Information Services 8.0')
BEGIN BEGIN
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (105, 2, N'IIS80', N'Internet Information Services 8.0', N'WebsitePanel.Providers.Web.IIs70, WebsitePanel.Providers.Web.IIs70', N'IIS70', NULL) INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (105, 2, N'IIS80', N'Internet Information Services 8.0', N'WebsitePanel.Providers.Web.IIs80, WebsitePanel.Providers.Web.IIs80', N'IIS70', NULL)
END END
GO GO
@ -168,7 +168,7 @@ GO
-- MS FTP 8.0 -- MS FTP 8.0
IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [DisplayName] = 'Microsoft FTP Server 8.0') IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [DisplayName] = 'Microsoft FTP Server 8.0')
BEGIN BEGIN
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (106, 3, N'MSFTP80', N'Microsoft FTP Server 8.0', N'WebsitePanel.Providers.FTP.MsFTP, WebsitePanel.Providers.FTP.IIs70', N'MSFTP70', NULL) INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (106, 3, N'MSFTP80', N'Microsoft FTP Server 8.0', N'WebsitePanel.Providers.FTP.MsFTP80, WebsitePanel.Providers.FTP.IIs80', N'MSFTP70', NULL)
END END
GO GO

View file

@ -966,7 +966,7 @@ namespace WebsitePanel.Providers.FTP
} }
RegistryKey ftp = root.OpenSubKey("SYSTEM\\CurrentControlSet\\Services\\ftpsvc"); RegistryKey ftp = root.OpenSubKey("SYSTEM\\CurrentControlSet\\Services\\ftpsvc");
bool res = (value == 7 || value == 8) && ftp != null; bool res = (value == 7) && ftp != null;
if (ftp != null) if (ftp != null)
ftp.Close(); ftp.Close();

View file

@ -0,0 +1,35 @@
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WebsitePanel.Providers.FTP
{
public class MsFTP80 : MsFTP
{
protected new bool IsMsFTPInstalled()
{
int value = 0;
RegistryKey root = Registry.LocalMachine;
RegistryKey rk = root.OpenSubKey("SOFTWARE\\Microsoft\\InetStp");
if (rk != null)
{
value = (int)rk.GetValue("MajorVersion", null);
rk.Close();
}
RegistryKey ftp = root.OpenSubKey("SYSTEM\\CurrentControlSet\\Services\\ftpsvc");
bool res = (value == 8) && ftp != null;
if (ftp != null)
ftp.Close();
return res;
}
public override bool IsInstalled()
{
return IsMsFTPInstalled();
}
}
}

View file

@ -0,0 +1,21 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("WebsitePanel.Providers.FTP.IIs80")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyProduct("WebsitePanel.Providers.FTP.IIs80")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("587b5738-51db-4525-bcf5-60de49e89be4")]

View file

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D73CCF4C-9CFF-4D61-9030-34DCAF0C50D6}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>WebsitePanel.Providers.FTP.IIs80</RootNamespace>
<AssemblyName>WebsitePanel.Providers.FTP.IIs80</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\WebsitePanel.Server\bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\WebsitePanel.Server\bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\VersionInfo.cs">
<Link>VersionInfo.cs</Link>
</Compile>
<Compile Include="MsFTP80.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\WebsitePanel.Providers.Base\WebsitePanel.Providers.Base.csproj">
<Project>{684c932a-6c75-46ac-a327-f3689d89eb42}</Project>
<Name>WebsitePanel.Providers.Base</Name>
</ProjectReference>
<ProjectReference Include="..\WebsitePanel.Providers.FTP.IIs70\WebsitePanel.Providers.FTP.IIs70.csproj">
<Project>{a28bd694-c308-449f-8fd2-f08f3d54aba0}</Project>
<Name>WebsitePanel.Providers.FTP.IIs70</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View file

@ -3488,7 +3488,7 @@ namespace WebsitePanel.Providers.Web
rk.Close(); rk.Close();
} }
return value == 7 || value == 8; return value == 7;
} }
public override bool IsInstalled() public override bool IsInstalled()

View file

@ -19,13 +19,3 @@ using System.Runtime.InteropServices;
// The following GUID is for the ID of the typelib if this project is exposed to COM // The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("0eb18093-bb95-406a-ab78-a2e45f4cb972")] [assembly: Guid("0eb18093-bb95-406a-ab78-a2e45f4cb972")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:

View file

@ -0,0 +1,30 @@
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WebsitePanel.Providers.Web
{
public class IIs80 : IIs70, IWebServer
{
public new bool IsIISInstalled()
{
int value = 0;
RegistryKey root = Registry.LocalMachine;
RegistryKey rk = root.OpenSubKey("SOFTWARE\\Microsoft\\InetStp");
if (rk != null)
{
value = (int)rk.GetValue("MajorVersion", null);
rk.Close();
}
return value == 8;
}
public override bool IsInstalled()
{
return IsIISInstalled();
}
}
}

View file

@ -0,0 +1,21 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("WebsitePanel.Providers.Web.IIs80")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyProduct("WebsitePanel.Providers.Web.IIs80")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("b0305c67-ead3-4d69-a0d8-548f6d0f705b")]

View file

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{6E348968-461D-45A1-B235-4F552947B9F1}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>WebsitePanel.Providers.Web</RootNamespace>
<AssemblyName>WebsitePanel.Providers.Web.IIs80</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\WebsitePanel.Server\bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\WebsitePanel.Server\bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\VersionInfo.cs">
<Link>VersionInfo.cs</Link>
</Compile>
<Compile Include="IIs80.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\WebsitePanel.Providers.Base\WebsitePanel.Providers.Base.csproj">
<Project>{684c932a-6c75-46ac-a327-f3689d89eb42}</Project>
<Name>WebsitePanel.Providers.Base</Name>
</ProjectReference>
<ProjectReference Include="..\WebsitePanel.Providers.Web.IIs60\WebsitePanel.Providers.Web.IIs60.csproj">
<Project>{9be0317d-e42e-4ff6-9a87-8c801f046ea1}</Project>
<Name>WebsitePanel.Providers.Web.IIs60</Name>
</ProjectReference>
<ProjectReference Include="..\WebsitePanel.Providers.Web.IIS70\WebsitePanel.Providers.Web.IIs70.csproj">
<Project>{1b9dce85-c664-49fc-b6e1-86c63cab88d1}</Project>
<Name>WebsitePanel.Providers.Web.IIs70</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View file

@ -1,5 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2010 # Visual Studio 2012
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Caching Application Block", "Caching Application Block", "{C8E6F2E4-A5B8-486A-A56E-92D864524682}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Caching Application Block", "Caching Application Block", "{C8E6F2E4-A5B8-486A-A56E-92D864524682}"
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject
Bin\Microsoft.Practices.EnterpriseLibrary.Common.dll = Bin\Microsoft.Practices.EnterpriseLibrary.Common.dll Bin\Microsoft.Practices.EnterpriseLibrary.Common.dll = Bin\Microsoft.Practices.EnterpriseLibrary.Common.dll
@ -107,6 +107,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.Mail
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.OS.Windows2012", "WebsitePanel.Providers.OS.Windows2012\WebsitePanel.Providers.OS.Windows2012.csproj", "{27130BBB-76FA-411E-8B4D-51CD4DC821AF}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.OS.Windows2012", "WebsitePanel.Providers.OS.Windows2012\WebsitePanel.Providers.OS.Windows2012.csproj", "{27130BBB-76FA-411E-8B4D-51CD4DC821AF}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.Web.IIs80", "WebsitePanel.Providers.Web.IIs80\WebsitePanel.Providers.Web.IIs80.csproj", "{6E348968-461D-45A1-B235-4F552947B9F1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.FTP.IIs80", "WebsitePanel.Providers.FTP.IIs80\WebsitePanel.Providers.FTP.IIs80.csproj", "{D73CCF4C-9CFF-4D61-9030-34DCAF0C50D6}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -587,6 +591,26 @@ Global
{27130BBB-76FA-411E-8B4D-51CD4DC821AF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {27130BBB-76FA-411E-8B4D-51CD4DC821AF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{27130BBB-76FA-411E-8B4D-51CD4DC821AF}.Release|Mixed Platforms.Build.0 = Release|Any CPU {27130BBB-76FA-411E-8B4D-51CD4DC821AF}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{27130BBB-76FA-411E-8B4D-51CD4DC821AF}.Release|x86.ActiveCfg = Release|Any CPU {27130BBB-76FA-411E-8B4D-51CD4DC821AF}.Release|x86.ActiveCfg = Release|Any CPU
{6E348968-461D-45A1-B235-4F552947B9F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6E348968-461D-45A1-B235-4F552947B9F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6E348968-461D-45A1-B235-4F552947B9F1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{6E348968-461D-45A1-B235-4F552947B9F1}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{6E348968-461D-45A1-B235-4F552947B9F1}.Debug|x86.ActiveCfg = Debug|Any CPU
{6E348968-461D-45A1-B235-4F552947B9F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6E348968-461D-45A1-B235-4F552947B9F1}.Release|Any CPU.Build.0 = Release|Any CPU
{6E348968-461D-45A1-B235-4F552947B9F1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{6E348968-461D-45A1-B235-4F552947B9F1}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{6E348968-461D-45A1-B235-4F552947B9F1}.Release|x86.ActiveCfg = Release|Any CPU
{D73CCF4C-9CFF-4D61-9030-34DCAF0C50D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D73CCF4C-9CFF-4D61-9030-34DCAF0C50D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D73CCF4C-9CFF-4D61-9030-34DCAF0C50D6}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{D73CCF4C-9CFF-4D61-9030-34DCAF0C50D6}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{D73CCF4C-9CFF-4D61-9030-34DCAF0C50D6}.Debug|x86.ActiveCfg = Debug|Any CPU
{D73CCF4C-9CFF-4D61-9030-34DCAF0C50D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D73CCF4C-9CFF-4D61-9030-34DCAF0C50D6}.Release|Any CPU.Build.0 = Release|Any CPU
{D73CCF4C-9CFF-4D61-9030-34DCAF0C50D6}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{D73CCF4C-9CFF-4D61-9030-34DCAF0C50D6}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{D73CCF4C-9CFF-4D61-9030-34DCAF0C50D6}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE