This commit is contained in:
vfedosevich 2015-04-30 04:32:48 -07:00
commit d3222e3b9f
399 changed files with 79256 additions and 4350 deletions

View file

@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform> <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>3.7</ProductVersion> <ProductVersion>3.9</ProductVersion>
<ProjectGuid>{ead7c528-ea3d-40e8-9688-9f1d8dc8d758}</ProjectGuid> <ProjectGuid>{ead7c528-ea3d-40e8-9688-9f1d8dc8d758}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
<OutputName>Websitepanel-SchedulerService</OutputName> <OutputName>Websitepanel-SchedulerService</OutputName>
@ -49,4 +49,4 @@
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
--> -->
</Project> </Project>

View file

@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform> <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>3.7</ProductVersion> <ProductVersion>3.9</ProductVersion>
<ProjectGuid>f963a4af-cc72-4512-b636-829345c35318</ProjectGuid> <ProjectGuid>f963a4af-cc72-4512-b636-829345c35318</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
<OutputName>WebsitePanelInstaller</OutputName> <OutputName>WebsitePanelInstaller</OutputName>
@ -91,4 +91,4 @@
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
--> -->
</Project> </Project>

View file

@ -1,6 +1,8 @@
"%WIX%\bin\heat.exe" dir ..\..\WebsitePanel\Build\Release\EnterpriseServer -o Setup.WIXInstaller\EnterpriseServerFiles.wxs -gg -sreg -srd -var wix.BUILDESPATH -cg EnterpriseServerFiles -dr INSTALLENTERPRISESERVERFOLDER "%WIX%\bin\heat.exe" dir ..\..\WebsitePanel\Build\debug\EnterpriseServer -o Setup.WIXInstaller\EnterpriseServerFiles.wxs -gg -sreg -srd -var wix.BUILDESPATH -cg EnterpriseServerFiles -dr INSTALLENTERPRISESERVERFOLDER
"%WIX%\bin\heat.exe" dir ..\..\WebsitePanel\Build\Release\Server -o Setup.WIXInstaller\ServerFiles.wxs -gg -sreg -srd -var wix.BUILDSPATH -cg ServerFiles -dr INSTALLSERVERFOLDER "%WIX%\bin\heat.exe" dir ..\..\WebsitePanel\Build\debug\Server -o Setup.WIXInstaller\ServerFiles.wxs -gg -sreg -srd -var wix.BUILDSPATH -cg ServerFiles -dr INSTALLSERVERFOLDER
"%WIX%\bin\heat.exe" dir ..\..\WebsitePanel\Build\Release\Portal -o Setup.WIXInstaller\PortalFiles.wxs -gg -sreg -srd -var wix.BUILDPPATH -cg PortalFiles -dr INSTALLPORTALFOLDER "%WIX%\bin\heat.exe" dir ..\..\WebsitePanel\Build\debug\Portal -o Setup.WIXInstaller\PortalFiles.wxs -gg -sreg -srd -var wix.BUILDPPATH -cg PortalFiles -dr INSTALLPORTALFOLDER
"%WIX%\bin\heat.exe" dir ..\..\WebsitePanel\Build\debug\WebDavPortal -o Setup.WIXInstaller\WebDavPortalFiles.wxs -gg -sreg -srd -var wix.BUILDWDPPATH -cg WebDavPortalFiles -dr INSTALLWEBDAVPORTALFOLDER

View file

@ -1,5 +1,14 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Include> <Include>
<?define PROJECTPATH = "..\..\..\WebsitePanel"?> <?define PROJECTPATH = "..\..\..\WebsitePanel"?>
<?define VERSION="2.1"?> <?define NAME="WebsitePanel"?>
<?define ServerTitle="Server"?>
<?define ServerDescription="WebsitePanel Server is a set of services running on the remote server to be controlled. Server application should be reachable from Enterprise Server one."?>
<?define EServerTitle="Enterprise Server"?>
<?define EServerDescription="Enterprise Server is the heart of WebsitePanel system. It includes all business logic of the application. Enterprise Server should have access to Server and be accessible from Portal applications."?>
<?define PortalTitle="Portal"?>
<?define PortalDescription="WebsitePanel Portal is a control panel itself with user interface which allows managing user accounts, hosting spaces, web sites, FTP accounts, files, etc."?>
<?define VERSION="$(var.Version)"?>
<?define sql_release_version = "$(var.Version)"?> <!--N'${release.version}'-->
<?define sql_build_date = "$(var.BuildDate)"?> <!-- '${release.date}T00:00:00' - ISO 8601 Format (YYYY-MM-DDTHH:MM:SS) -->
</Include> </Include>

View file

@ -0,0 +1,148 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
<copyright file="VerifyReadyDlg.wxs" company="Outercurve Foundation">
Copyright (c) 2004, Outercurve Foundation.
This software is released under Microsoft Reciprocal License (MS-RL).
The license and further copyright text can be found in the file
LICENSE.TXT at the root directory of the distribution.
</copyright>
-->
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<UI>
<Dialog Id="CustomVerifyReadyDlg" Width="370" Height="270" Title="!(loc.VerifyReadyDlg_Title)" TrackDiskSpace="yes">
<Control Id="Install" Type="PushButton" ElevationShield="yes" X="212" Y="243" Width="80" Height="17" Default="yes" Hidden="yes" Disabled="yes" Text="!(loc.VerifyReadyDlgInstall)">
<Condition Action="show">NOT Installed AND ALLUSERS</Condition>
<Condition Action="enable">NOT Installed</Condition>
<Condition Action="default">NOT Installed</Condition>
<Publish Event="EndDialog" Value="Return"><![CDATA[OutOfDiskSpace <> 1]]></Publish>
<Publish Event="SpawnDialog" Value="OutOfRbDiskDlg">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)</Publish>
<Publish Event="EndDialog" Value="Return">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="EnableRollback" Value="False">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="SpawnDialog" Value="OutOfDiskDlg">(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")</Publish>
</Control>
<Control Id="InstallNoShield" Type="PushButton" ElevationShield="no" X="212" Y="243" Width="80" Height="17" Default="yes" Hidden="yes" Disabled="yes" Text="!(loc.VerifyReadyDlgInstall)">
<Condition Action="show">NOT Installed AND NOT ALLUSERS</Condition>
<Condition Action="enable">NOT Installed</Condition>
<Condition Action="default">NOT Installed</Condition>
<Publish Event="EndDialog" Value="Return"><![CDATA[OutOfDiskSpace <> 1]]></Publish>
<Publish Event="SpawnDialog" Value="OutOfRbDiskDlg">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)</Publish>
<Publish Event="EndDialog" Value="Return">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="EnableRollback" Value="False">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="SpawnDialog" Value="OutOfDiskDlg">(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")</Publish>
</Control>
<Control Id="Change" Type="PushButton" ElevationShield="yes" X="212" Y="243" Width="80" Height="17" Default="yes" Hidden="yes" Disabled="yes" Text="!(loc.VerifyReadyDlgChange)">
<Condition Action="show">WixUI_InstallMode = "Change" AND ALLUSERS AND (ADDLOCAL OR REMOVE)</Condition>
<Condition Action="enable">WixUI_InstallMode = "Change"</Condition>
<Condition Action="default">WixUI_InstallMode = "Change"</Condition>
<Publish Event="EndDialog" Value="Return"><![CDATA[OutOfDiskSpace <> 1]]></Publish>
<Publish Event="SpawnDialog" Value="OutOfRbDiskDlg">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)</Publish>
<Publish Event="EndDialog" Value="Return">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="EnableRollback" Value="False">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="SpawnDialog" Value="OutOfDiskDlg">(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")</Publish>
</Control>
<Control Id="ChangeNoShield" Type="PushButton" ElevationShield="no" X="212" Y="243" Width="80" Height="17" Default="yes" Hidden="yes" Disabled="yes" Text="!(loc.VerifyReadyDlgChange)">
<Condition Action="show">WixUI_InstallMode = "Change" AND (NOT ALLUSERS OR (NOT ADDLOCAL AND NOT REMOVE))</Condition>
<Condition Action="enable">WixUI_InstallMode = "Change"</Condition>
<Condition Action="default">WixUI_InstallMode = "Change"</Condition>
<Publish Event="EndDialog" Value="Return"><![CDATA[OutOfDiskSpace <> 1]]></Publish>
<Publish Event="SpawnDialog" Value="OutOfRbDiskDlg">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)</Publish>
<Publish Event="EndDialog" Value="Return">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="EnableRollback" Value="False">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="SpawnDialog" Value="OutOfDiskDlg">(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")</Publish>
</Control>
<Control Id="Repair" Type="PushButton" X="212" Y="243" Width="80" Height="17" Default="yes" Hidden="yes" Disabled="yes" Text="!(loc.VerifyReadyDlgRepair)">
<Condition Action="show">WixUI_InstallMode = "Repair"</Condition>
<Condition Action="enable">WixUI_InstallMode = "Repair"</Condition>
<Condition Action="default">WixUI_InstallMode = "Repair"</Condition>
<Publish Event="ReinstallMode" Value="ecmus"><![CDATA[OutOfDiskSpace <> 1]]></Publish>
<Publish Event="Reinstall" Value="All"><![CDATA[OutOfDiskSpace <> 1]]></Publish>
<Publish Event="EndDialog" Value="Return"><![CDATA[OutOfDiskSpace <> 1]]></Publish>
<Publish Event="SpawnDialog" Value="OutOfRbDiskDlg">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)</Publish>
<Publish Event="EndDialog" Value="Return">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="EnableRollback" Value="False">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="SpawnDialog" Value="OutOfDiskDlg">(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")</Publish>
</Control>
<Control Id="Remove" Type="PushButton" ElevationShield="yes" X="212" Y="243" Width="80" Height="17" Hidden="yes" Disabled="yes" Text="!(loc.VerifyReadyDlgRemove)">
<Condition Action="show">WixUI_InstallMode = "Remove" AND ALLUSERS</Condition>
<Condition Action="enable">WixUI_InstallMode = "Remove"</Condition>
<Publish Event="Remove" Value="All"><![CDATA[OutOfDiskSpace <> 1]]></Publish>
<Publish Event="EndDialog" Value="Return"><![CDATA[OutOfDiskSpace <> 1]]></Publish>
<Publish Event="SpawnDialog" Value="OutOfRbDiskDlg">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)</Publish>
<Publish Event="EndDialog" Value="Return">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="EnableRollback" Value="False">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="SpawnDialog" Value="OutOfDiskDlg">(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")</Publish>
</Control>
<Control Id="RemoveNoShield" Type="PushButton" ElevationShield="no" X="212" Y="243" Width="80" Height="17" Hidden="yes" Disabled="yes" Text="!(loc.VerifyReadyDlgRemove)">
<Condition Action="show">WixUI_InstallMode = "Remove" AND NOT ALLUSERS</Condition>
<Condition Action="enable">WixUI_InstallMode = "Remove"</Condition>
<Publish Event="Remove" Value="All"><![CDATA[OutOfDiskSpace <> 1]]></Publish>
<Publish Event="EndDialog" Value="Return"><![CDATA[OutOfDiskSpace <> 1]]></Publish>
<Publish Event="SpawnDialog" Value="OutOfRbDiskDlg">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)</Publish>
<Publish Event="EndDialog" Value="Return">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="EnableRollback" Value="False">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="SpawnDialog" Value="OutOfDiskDlg">(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")</Publish>
</Control>
<Control Id="Update" Type="PushButton" ElevationShield="yes" X="212" Y="243" Width="80" Height="17" Hidden="yes" Disabled="yes" Text="!(loc.VerifyReadyDlgUpdate)">
<Condition Action="show">WixUI_InstallMode = "Update" AND ALLUSERS</Condition>
<Condition Action="enable">WixUI_InstallMode = "Update"</Condition>
<Publish Event="EndDialog" Value="Return"><![CDATA[OutOfDiskSpace <> 1]]></Publish>
<Publish Event="SpawnDialog" Value="OutOfRbDiskDlg">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)</Publish>
<Publish Event="EndDialog" Value="Return">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="EnableRollback" Value="False">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="SpawnDialog" Value="OutOfDiskDlg">(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")</Publish>
</Control>
<Control Id="UpdateNoShield" Type="PushButton" ElevationShield="no" X="212" Y="243" Width="80" Height="17" Hidden="yes" Disabled="yes" Text="!(loc.VerifyReadyDlgUpdate)">
<Condition Action="show">WixUI_InstallMode = "Update" AND NOT ALLUSERS</Condition>
<Condition Action="enable">WixUI_InstallMode = "Update"</Condition>
<Publish Event="EndDialog" Value="Return"><![CDATA[OutOfDiskSpace <> 1]]></Publish>
<Publish Event="SpawnDialog" Value="OutOfRbDiskDlg">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)</Publish>
<Publish Event="EndDialog" Value="Return">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="EnableRollback" Value="False">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
<Publish Event="SpawnDialog" Value="OutOfDiskDlg">(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")</Publish>
</Control>
<Control Id="InstallTitle" Type="Text" X="15" Y="15" Width="300" Height="15" Transparent="yes" NoPrefix="yes" Hidden="yes" Text="!(loc.VerifyReadyDlgInstallTitle)">
<Condition Action="show">NOT Installed</Condition>
</Control>
<Control Id="InstallText" Type="Text" X="25" Y="70" Width="320" Height="160" Hidden="yes" Text="!(loc.VerifyReadyDlgInstallText)&#13;&#10;&#13;&#10;[CUSTOM_INSTALL_TEXT]" Transparent="yes">
<Condition Action="show">NOT Installed</Condition>
</Control>
<Control Id="ChangeTitle" Type="Text" X="15" Y="15" Width="300" Height="15" Transparent="yes" NoPrefix="yes" Hidden="yes" Text="!(loc.VerifyReadyDlgChangeTitle)">
<Condition Action="show">WixUI_InstallMode = "Change"</Condition>
</Control>
<Control Id="ChangeText" Type="Text" X="25" Y="70" Width="320" Height="80" Hidden="yes" Text="!(loc.VerifyReadyDlgChangeText)">
<Condition Action="show">WixUI_InstallMode = "Change"</Condition>
</Control>
<Control Id="RepairTitle" Type="Text" X="15" Y="15" Width="300" Height="15" Transparent="yes" NoPrefix="yes" Hidden="yes" Text="!(loc.VerifyReadyDlgRepairTitle)">
<Condition Action="show">WixUI_InstallMode = "Repair"</Condition>
</Control>
<Control Id="RepairText" Type="Text" X="25" Y="70" Width="320" Height="80" Hidden="yes" NoPrefix="yes" Text="!(loc.VerifyReadyDlgRepairText)">
<Condition Action="show">WixUI_InstallMode = "Repair"</Condition>
</Control>
<Control Id="RemoveTitle" Type="Text" X="15" Y="15" Width="300" Height="15" Transparent="yes" NoPrefix="yes" Hidden="yes" Text="!(loc.VerifyReadyDlgRemoveTitle)">
<Condition Action="show">WixUI_InstallMode = "Remove"</Condition>
</Control>
<Control Id="RemoveText" Type="Text" X="25" Y="70" Width="320" Height="80" Hidden="yes" NoPrefix="yes" Text="!(loc.VerifyReadyDlgRemoveText)">
<Condition Action="show">WixUI_InstallMode = "Remove"</Condition>
</Control>
<Control Id="UpdateTitle" Type="Text" X="15" Y="15" Width="300" Height="15" Transparent="yes" NoPrefix="yes" Hidden="yes" Text="!(loc.VerifyReadyDlgUpdateTitle)">
<Condition Action="show">WixUI_InstallMode = "Update"</Condition>
</Control>
<Control Id="UpdateText" Type="Text" X="25" Y="70" Width="320" Height="80" Hidden="yes" NoPrefix="yes" Text="!(loc.VerifyReadyDlgUpdateText)">
<Condition Action="show">WixUI_InstallMode = "Update"</Condition>
</Control>
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
<Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
</Control>
<Control Id="Back" Type="PushButton" X="156" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)">
<Condition Action="default">WixUI_InstallMode = "Remove"</Condition>
</Control>
<Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.VerifyReadyDlgBannerBitmap)" />
<Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
</Dialog>
</UI>
</Fragment>
</Wix>

File diff suppressed because it is too large Load diff

View file

@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform> <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>3.7</ProductVersion> <ProductVersion>3.9</ProductVersion>
<ProjectGuid>{978f0a18-7c81-4561-8f6d-5a165484ad0a}</ProjectGuid> <ProjectGuid>{978f0a18-7c81-4561-8f6d-5a165484ad0a}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
<OutputName>Websitepanel</OutputName> <OutputName>Websitepanel</OutputName>
@ -14,35 +14,50 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<OutputPath>bin\</OutputPath> <OutputPath>bin\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath> <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug;BUILD=debug</DefineConstants> <DefineConstants>Debug;BUILD=debug;Version=$(Version);BuildDate=$(ReleaseDate)</DefineConstants>
<SuppressValidation>False</SuppressValidation> <SuppressValidation>False</SuppressValidation>
<SuppressIces> <SuppressIces>
</SuppressIces> </SuppressIces>
<CompilerAdditionalOptions> <CompilerAdditionalOptions>
</CompilerAdditionalOptions> </CompilerAdditionalOptions>
<LinkerAdditionalOptions> <LinkerAdditionalOptions>
</LinkerAdditionalOptions> </LinkerAdditionalOptions>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath> <OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath> <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>BUILD=release</DefineConstants> <DefineConstants>BUILD=release;Version=$(Version);BuildDate=$(ReleaseDate)</DefineConstants>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Include="EnterpriseServerFiles.wxs" /> <Compile Include="CustomVerifyReadyDlg.wxs" />
<Compile Include="PortalFiles.wxs" />
<Compile Include="Product.wxs" /> <Compile Include="Product.wxs" />
<Compile Include="SchedulerServiceFiles.wxs" /> <Compile Include="SchedulerServiceFiles.wxs" />
<Compile Include="ServerFiles.wxs" /> <Compile Include="..\..\..\WebsitePanel\Build\$(Configuration)\WiXInstaller\ComponentsFiles\ServerFiles.wxs" />
<Compile Include="..\..\..\WebsitePanel\Build\$(Configuration)\WiXInstaller\ComponentsFiles\EnterpriseServerFiles.wxs" />
<Compile Include="..\..\..\WebsitePanel\Build\$(Configuration)\WiXInstaller\ComponentsFiles\PortalFiles.wxs" />
<Compile Include="..\..\..\WebsitePanel\Build\$(Configuration)\WiXInstaller\ComponentsFiles\WebDavPortalFiles.wxs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="Config.wxi" /> <Content Include="Config.wxi" />
<Content Include="WebsitePanel.config" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<WixExtension Include="WixUIExtension"> <WixExtension Include="WixUIExtension">
<HintPath>..\..\..\tools\WIX\WixUIExtension.dll</HintPath> <HintPath>..\..\..\tools\WIX\WixUIExtension.dll</HintPath>
<Name>WixUIExtension</Name> <Name>WixUIExtension</Name>
</WixExtension> </WixExtension>
<WixExtension Include="WixIIsExtension">
<HintPath>..\..\..\tools\WIX\WixIIsExtension.dll</HintPath>
<Name>WixIIsExtension</Name>
</WixExtension>
<WixExtension Include="WixSqlExtension">
<HintPath>..\..\..\tools\WIX\WixSqlExtension.dll</HintPath>
<Name>WixSqlExtension</Name>
</WixExtension>
<WixExtension Include="WixUtilExtension">
<HintPath>..\..\..\tools\WIX\WixUtilExtension.dll</HintPath>
<Name>WixUtilExtension</Name>
</WixExtension>
</ItemGroup> </ItemGroup>
<Import Project="$(WixTargetsPath)" /> <Import Project="$(WixTargetsPath)" />
<!-- <!--
@ -53,4 +68,4 @@
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
--> -->
</Project> </Project>

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="installer" type="WebsitePanel.Installer.Configuration.InstallerSection, WebsitePanel.Installer.Core"/>
</configSections>
<installer>
<!-- Installed components -->
<components/>
<!-- Studio settings -->
<settings>
<add key="Log.FileName" value="WebsitePanel.Installer.log" />
<add key="Web.Service" value="" />
<add key="Web.AutoCheck" value="False" />
<add key="Web.Proxy.UseProxy" value="false" />
<add key="Web.Proxy.Address" value="" />
<add key="Web.Proxy.UserName" value="" />
<add key="Web.Proxy.Password" value="" />
</settings>
</installer>
</configuration>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:4.0.30319.18051 // Runtime Version:4.0.30319.34209
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.

View file

@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013 # Visual Studio 2013
VisualStudioVersion = 12.0.30723.0 VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{129305D5-A9E6-4DCE-BFF6-41809E13EEEE}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{129305D5-A9E6-4DCE-BFF6-41809E13EEEE}"
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject
@ -33,6 +33,13 @@ Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Setup.SchedulerService", "S
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.SchedulerServiceInstaller", "WebsitePanel.SchedulerServiceInstaller\WebsitePanel.SchedulerServiceInstaller.csproj", "{24A4C231-73A9-4F03-ABAD-9A8FE5324495}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.SchedulerServiceInstaller", "WebsitePanel.SchedulerServiceInstaller\WebsitePanel.SchedulerServiceInstaller.csproj", "{24A4C231-73A9-4F03-ABAD-9A8FE5324495}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.WIXInstaller", "WebsitePanel.WIXInstaller\WebsitePanel.WIXInstaller.csproj", "{3343FFD8-7CCE-451B-95AE-3D97244313A2}"
EndProject
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Setup.WIXInstaller", "Setup.WIXInstaller\Setup.WIXInstaller.wixproj", "{978F0A18-7C81-4561-8F6D-5A165484AD0A}"
ProjectSection(ProjectDependencies) = postProject
{3343FFD8-7CCE-451B-95AE-3D97244313A2} = {3343FFD8-7CCE-451B-95AE-3D97244313A2}
EndProjectSection
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -125,6 +132,26 @@ Global
{24A4C231-73A9-4F03-ABAD-9A8FE5324495}.Release|Mixed Platforms.Build.0 = Release|x86 {24A4C231-73A9-4F03-ABAD-9A8FE5324495}.Release|Mixed Platforms.Build.0 = Release|x86
{24A4C231-73A9-4F03-ABAD-9A8FE5324495}.Release|x86.ActiveCfg = Release|x86 {24A4C231-73A9-4F03-ABAD-9A8FE5324495}.Release|x86.ActiveCfg = Release|x86
{24A4C231-73A9-4F03-ABAD-9A8FE5324495}.Release|x86.Build.0 = Release|x86 {24A4C231-73A9-4F03-ABAD-9A8FE5324495}.Release|x86.Build.0 = Release|x86
{3343FFD8-7CCE-451B-95AE-3D97244313A2}.Debug|Any CPU.ActiveCfg = Debug|x86
{3343FFD8-7CCE-451B-95AE-3D97244313A2}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{3343FFD8-7CCE-451B-95AE-3D97244313A2}.Debug|Mixed Platforms.Build.0 = Debug|x86
{3343FFD8-7CCE-451B-95AE-3D97244313A2}.Debug|x86.ActiveCfg = Debug|x86
{3343FFD8-7CCE-451B-95AE-3D97244313A2}.Debug|x86.Build.0 = Debug|x86
{3343FFD8-7CCE-451B-95AE-3D97244313A2}.Release|Any CPU.ActiveCfg = Release|x86
{3343FFD8-7CCE-451B-95AE-3D97244313A2}.Release|Mixed Platforms.ActiveCfg = Release|x86
{3343FFD8-7CCE-451B-95AE-3D97244313A2}.Release|Mixed Platforms.Build.0 = Release|x86
{3343FFD8-7CCE-451B-95AE-3D97244313A2}.Release|x86.ActiveCfg = Release|x86
{3343FFD8-7CCE-451B-95AE-3D97244313A2}.Release|x86.Build.0 = Release|x86
{978F0A18-7C81-4561-8F6D-5A165484AD0A}.Debug|Any CPU.ActiveCfg = Debug|x86
{978F0A18-7C81-4561-8F6D-5A165484AD0A}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{978F0A18-7C81-4561-8F6D-5A165484AD0A}.Debug|Mixed Platforms.Build.0 = Debug|x86
{978F0A18-7C81-4561-8F6D-5A165484AD0A}.Debug|x86.ActiveCfg = Debug|x86
{978F0A18-7C81-4561-8F6D-5A165484AD0A}.Debug|x86.Build.0 = Debug|x86
{978F0A18-7C81-4561-8F6D-5A165484AD0A}.Release|Any CPU.ActiveCfg = Release|x86
{978F0A18-7C81-4561-8F6D-5A165484AD0A}.Release|Mixed Platforms.ActiveCfg = Release|x86
{978F0A18-7C81-4561-8F6D-5A165484AD0A}.Release|Mixed Platforms.Build.0 = Release|x86
{978F0A18-7C81-4561-8F6D-5A165484AD0A}.Release|x86.ActiveCfg = Release|x86
{978F0A18-7C81-4561-8F6D-5A165484AD0A}.Release|x86.Build.0 = Release|x86
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View file

@ -67,37 +67,21 @@ namespace WebsitePanel.Setup.Actions
{ {
OnInstallProgressChanged(LogStartInstallMessage, 0); OnInstallProgressChanged(LogStartInstallMessage, 0);
Log.WriteStart(LogStartInstallMessage); Log.WriteStart(LogStartInstallMessage);
var file = Path.Combine(vars.InstallationFolder, vars.ConfigurationFile);
var file = Path.Combine(vars.InstallationFolder, vars.ConfigurationFile); vars.CryptoKey = Utils.GetRandomString(20);
vars.CryptoKey = Utils.GetRandomString(20); var Xml = new XmlDocument();
Xml.Load(file);
// load file var CryptoNode = Xml.SelectSingleNode("configuration/appSettings/add[@key='WebsitePanel.CryptoKey']") as XmlElement;
string content = string.Empty; if (CryptoNode != null)
using (StreamReader reader = new StreamReader(file)) CryptoNode.SetAttribute("value", vars.CryptoKey);
{ Xml.Save(file);
content = reader.ReadToEnd();
}
// expand variables
content = Utils.ReplaceScriptVariable(content, "installer.cryptokey", vars.CryptoKey);
//
Log.WriteInfo(String.Format("The following cryptographic key has been generated: '{0}'", vars.CryptoKey));
// save file
using (StreamWriter writer = new StreamWriter(file))
{
writer.Write(content);
}
//update log
Log.WriteEnd(LogEndInstallMessage); Log.WriteEnd(LogEndInstallMessage);
} }
catch (Exception ex) catch (Exception ex)
{ {
if (Utils.IsThreadAbortException(ex)) if (Utils.IsThreadAbortException(ex))
return; return;
//
Log.WriteError("Update web.config error", ex); Log.WriteError("Update web.config error", ex);
//
throw; throw;
} }
} }
@ -116,6 +100,10 @@ namespace WebsitePanel.Setup.Actions
Begin(LogStartInstallMessage); Begin(LogStartInstallMessage);
Log.WriteStart(LogStartInstallMessage); Log.WriteStart(LogStartInstallMessage);
var ServiceName = Global.Parameters.SchedulerServiceName;
var ServiceFile = Path.Combine(vars.InstallationFolder, "bin", Global.Parameters.SchedulerServiceFileName);
Log.WriteInfo(String.Format("Scheduler Service Name: \"{0}\"", Global.Parameters.SchedulerServiceName)); Log.WriteInfo(String.Format("Scheduler Service Name: \"{0}\"", Global.Parameters.SchedulerServiceName));
if (ServiceController.GetServices().Any(s => s.DisplayName.Equals(Global.Parameters.SchedulerServiceName, StringComparison.CurrentCultureIgnoreCase))) if (ServiceController.GetServices().Any(s => s.DisplayName.Equals(Global.Parameters.SchedulerServiceName, StringComparison.CurrentCultureIgnoreCase)))
@ -125,8 +113,13 @@ namespace WebsitePanel.Setup.Actions
return; return;
} }
ManagedInstallerClass.InstallHelper(new[] { "/i", Path.Combine(vars.InstallationFolder, "bin", Global.Parameters.SchedulerServiceFileName) }); ManagedInstallerClass.InstallHelper(new[] { "/i /LogFile=\"\" ", ServiceFile });
Utils.StartService(Global.Parameters.SchedulerServiceName); Utils.StartService(Global.Parameters.SchedulerServiceName);
AppConfig.EnsureComponentConfig(vars.ComponentId);
AppConfig.SetComponentSettingStringValue(vars.ComponentId, "ServiceName", ServiceName);
AppConfig.SetComponentSettingStringValue(vars.ComponentId, "ServiceFile", ServiceFile);
AppConfig.SaveConfiguration();
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -166,7 +159,7 @@ namespace WebsitePanel.Setup.Actions
{ {
if (ServiceController.GetServices().Any(s => s.ServiceName.Equals(Global.Parameters.SchedulerServiceName, StringComparison.CurrentCultureIgnoreCase))) if (ServiceController.GetServices().Any(s => s.ServiceName.Equals(Global.Parameters.SchedulerServiceName, StringComparison.CurrentCultureIgnoreCase)))
{ {
ManagedInstallerClass.InstallHelper(new[] { "/u", Path.Combine(vars.InstallationFolder, "bin", Global.Parameters.SchedulerServiceFileName) }); ManagedInstallerClass.InstallHelper(new[] { "/u /LogFile=\"\" ", Path.Combine(vars.InstallationFolder, "bin", Global.Parameters.SchedulerServiceFileName) });
} }
} }
} }
@ -397,25 +390,14 @@ namespace WebsitePanel.Setup.Actions
void IInstallAction.Run(SetupVariables vars) void IInstallAction.Run(SetupVariables vars)
{ {
Log.WriteStart("Updating web.config file (connection string)"); Log.WriteStart("Updating web.config file (connection string)");
//
var file = Path.Combine(vars.InstallationFolder, vars.ConfigurationFile); var file = Path.Combine(vars.InstallationFolder, vars.ConfigurationFile);
//
var content = String.Empty;
// load file
using (StreamReader reader = new StreamReader(file))
{
content = reader.ReadToEnd();
}
// Build connection string
vars.ConnectionString = String.Format(vars.ConnectionString, vars.DatabaseServer, vars.Database, vars.Database, vars.DatabaseUserPassword); vars.ConnectionString = String.Format(vars.ConnectionString, vars.DatabaseServer, vars.Database, vars.Database, vars.DatabaseUserPassword);
// Expand variables var Xml = new XmlDocument();
content = Utils.ReplaceScriptVariable(content, "installer.connectionstring", vars.ConnectionString); Xml.Load(file);
// Save file var ConnNode = Xml.SelectSingleNode("configuration/connectionStrings/add[@name='EnterpriseServer']") as XmlElement;
using (StreamWriter writer = new StreamWriter(file)) if(ConnNode != null)
{ ConnNode.SetAttribute("connectionString", vars.ConnectionString);
writer.Write(content); Xml.Save(file);
}
//
Log.WriteEnd(String.Format("Updated {0} file", vars.ConfigurationFile)); Log.WriteEnd(String.Format("Updated {0} file", vars.ConfigurationFile));
} }
} }
@ -509,10 +491,11 @@ namespace WebsitePanel.Setup.Actions
{ {
void IInstallAction.Run(SetupVariables vars) void IInstallAction.Run(SetupVariables vars)
{ {
Log.WriteStart("SaveEntServerConfigSettingsAction");
AppConfig.EnsureComponentConfig(vars.ComponentId); AppConfig.EnsureComponentConfig(vars.ComponentId);
// //
AppConfig.SetComponentSettingStringValue(vars.ComponentId, "Database", vars.Database); AppConfig.SetComponentSettingStringValue(vars.ComponentId, "Database", vars.Database);
AppConfig.SetComponentSettingBooleanValue(vars.ComponentId, "NewDatabase", true); AppConfig.SetComponentSettingBooleanValue(vars.ComponentId, "NewDatabase", vars.CreateDatabase);
// //
AppConfig.SetComponentSettingStringValue(vars.ComponentId, "DatabaseUser", vars.Database); AppConfig.SetComponentSettingStringValue(vars.ComponentId, "DatabaseUser", vars.Database);
AppConfig.SetComponentSettingBooleanValue(vars.ComponentId, "NewDatabaseUser", vars.NewDatabaseUser); AppConfig.SetComponentSettingBooleanValue(vars.ComponentId, "NewDatabaseUser", vars.NewDatabaseUser);
@ -523,6 +506,7 @@ namespace WebsitePanel.Setup.Actions
AppConfig.SetComponentSettingStringValue(vars.ComponentId, Global.Parameters.CryptoKey, vars.CryptoKey); AppConfig.SetComponentSettingStringValue(vars.ComponentId, Global.Parameters.CryptoKey, vars.CryptoKey);
// //
AppConfig.SaveConfiguration(); AppConfig.SaveConfiguration();
Log.WriteEnd("SaveEntServerConfigSettingsAction");
} }
} }

View file

@ -38,25 +38,27 @@ namespace WebsitePanel.Setup
public sealed class AppConfig public sealed class AppConfig
{ {
public const string AppConfigFileNameWithoutExtension = "WebsitePanel.Installer.exe"; public const string AppConfigFileNameWithoutExtension = "WebsitePanel.Installer.exe";
static AppConfig()
{
ConfigurationPath = DefaultConfigurationPath;
}
private AppConfig() private AppConfig()
{ {
} }
private static Configuration appConfig = null; private static Configuration appConfig = null;
private static XmlDocument xmlConfig = null; private static XmlDocument xmlConfig = null;
public static string ConfigurationPath { get; set; }
public static void LoadConfiguration() public static string DefaultConfigurationPath { get { return Path.Combine(AppDomain.CurrentDomain.BaseDirectory, AppConfigFileNameWithoutExtension); } }
public static void LoadConfiguration(ExeConfigurationFileMap FnMap = null, ConfigurationUserLevel CuLevel = ConfigurationUserLevel.None)
{ {
// if (FnMap == null)
var exePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, AppConfigFileNameWithoutExtension); appConfig = ConfigurationManager.OpenExeConfiguration(ConfigurationPath);
// else
appConfig = ConfigurationManager.OpenExeConfiguration(exePath); appConfig = ConfigurationManager.OpenMappedExeConfiguration(FnMap, CuLevel);
//
ConfigurationSection section = appConfig.Sections["installer"]; ConfigurationSection section = appConfig.Sections["installer"];
if (section == null) if (section == null)
throw new ConfigurationErrorsException("instalelr section not found"); throw new ConfigurationErrorsException("installer section not found in " + appConfig.FilePath);
string strXml = section.SectionInformation.GetRawXml(); string strXml = section.SectionInformation.GetRawXml();
xmlConfig = new XmlDocument(); xmlConfig = new XmlDocument();
xmlConfig.LoadXml(strXml); xmlConfig.LoadXml(strXml);

View file

@ -48,9 +48,9 @@ namespace WebsitePanel.Setup
/// <param name="bar">Progress bar.</param> /// <param name="bar">Progress bar.</param>
/// <param name="source">Source folder.</param> /// <param name="source">Source folder.</param>
/// <param name="destination">Destination folder.</param> /// <param name="destination">Destination folder.</param>
public CopyProcess(ProgressBar bar, string source, string destination) public CopyProcess(object bar, string source, string destination)
{ {
this.progressBar = bar; this.progressBar = bar as ProgressBar;
this.sourceFolder = new DirectoryInfo(source); this.sourceFolder = new DirectoryInfo(source);
this.destFolder = new DirectoryInfo(destination); this.destFolder = new DirectoryInfo(destination);
} }
@ -63,9 +63,13 @@ namespace WebsitePanel.Setup
// unzip // unzip
long totalSize = FileUtils.CalculateFolderSize(sourceFolder.FullName); long totalSize = FileUtils.CalculateFolderSize(sourceFolder.FullName);
long copied = 0; long copied = 0;
progressBar.Minimum = 0;
progressBar.Maximum = 100; if (progressBar != null)
progressBar.Value = 0; {
progressBar.Minimum = 0;
progressBar.Maximum = 100;
progressBar.Value = 0;
}
int i = 0; int i = 0;
List<DirectoryInfo> folders = new List<DirectoryInfo>(); List<DirectoryInfo> folders = new List<DirectoryInfo>();
@ -122,7 +126,10 @@ namespace WebsitePanel.Setup
copied += files[i].Length; copied += files[i].Length;
if (totalSize != 0) if (totalSize != 0)
{ {
progressBar.Value = Convert.ToInt32(copied * 100 / totalSize); if (progressBar != null)
{
progressBar.Value = Convert.ToInt32(copied * 100 / totalSize);
}
} }
} }
} }

View file

@ -170,5 +170,7 @@ namespace WebsitePanel.Setup
} }
catch { } catch { }
} }
public static TraceListenerCollection Listeners { get { return Trace.Listeners; } }
} }
} }

View file

@ -286,7 +286,8 @@ namespace WebsitePanel.Setup
Windows7, Windows7,
WindowsServer2008R2, WindowsServer2008R2,
Windows8, Windows8,
WindowsServer2012 WindowsServer2012,
WindowsServer2012R2
} }
public static string GetName(WindowsVersion version) public static string GetName(WindowsVersion version)
@ -428,6 +429,9 @@ namespace WebsitePanel.Setup
else else
ret = WindowsVersion.WindowsServer2012; ret = WindowsVersion.WindowsServer2012;
break; break;
case 3:
ret = WindowsVersion.WindowsServer2012R2;
break;
} }
break; break;
} }

View file

@ -338,8 +338,8 @@ namespace WebsitePanel.Setup
/// <param name="domain"></param> /// <param name="domain"></param>
/// <returns></returns> /// <returns></returns>
internal static string GetSid(string userAccount, string domain) internal static string GetSid(string userAccount, string domain)
{ {
if(domain == null) if(string.IsNullOrWhiteSpace(domain))
domain = Environment.MachineName; domain = Environment.MachineName;
// try to get user account // try to get user account

View file

@ -481,11 +481,11 @@ namespace WebsitePanel.Setup
public static void StopService(string serviceName) public static void StopService(string serviceName)
{ {
ServiceController sc = new ServiceController(serviceName); ServiceController sc = new ServiceController(serviceName);
// Start the service if the current status is stopped. // Stop the service if the current status is not stopped.
if (sc.Status != ServiceControllerStatus.Stopped && if (sc.Status != ServiceControllerStatus.Stopped &&
sc.Status != ServiceControllerStatus.StopPending) sc.Status != ServiceControllerStatus.StopPending)
{ {
// Start the service, and wait until its status is "Running". // Stop the service, and wait until its status is "Running".
sc.Stop(); sc.Stop();
sc.WaitForStatus(ServiceControllerStatus.Stopped); sc.WaitForStatus(ServiceControllerStatus.Stopped);
} }

View file

@ -150,7 +150,7 @@ namespace WebsitePanel.Setup
FileUtils.CreateDirectory(path); FileUtils.CreateDirectory(path);
SecurityUtils.GrantNtfsPermissions(path, userDomain, userAccount, NtfsPermission.Modify, true, true); SecurityUtils.GrantNtfsPermissions(path, userDomain, userAccount, NtfsPermission.Modify, true, true);
SecurityUtils.GrantNtfsPermissionsBySid(path, SystemSID.NETWORK_SERVICE, NtfsPermission.Modify, true, true); SecurityUtils.GrantNtfsPermissionsBySid(path, SystemSID.NETWORK_SERVICE, NtfsPermission.Modify, true, true);
} }
/// <summary> /// <summary>

View file

@ -46,9 +46,9 @@ namespace WebsitePanel.Setup.Common
int totalFiles = 0; int totalFiles = 0;
int files = 0; int files = 0;
public ZipIndicator(ProgressBar progressBar, string sourcePath, string zipFile) public ZipIndicator(object progressBar, string sourcePath, string zipFile)
{ {
this.progressBar = progressBar; this.progressBar = progressBar as ProgressBar;
this.sourcePath = sourcePath; this.sourcePath = sourcePath;
this.zipFile = zipFile; this.zipFile = zipFile;
} }
@ -71,8 +71,11 @@ namespace WebsitePanel.Setup.Common
{ {
string fileName = e.CurrentEntry.FileName; string fileName = e.CurrentEntry.FileName;
files++; files++;
this.progressBar.Value = Convert.ToInt32(files * 100 / totalFiles); if (this.progressBar != null)
this.progressBar.Update(); {
this.progressBar.Value = Convert.ToInt32(files * 100 / totalFiles);
this.progressBar.Update();
}
} }
} }
} }

File diff suppressed because it is too large Load diff

View file

@ -143,6 +143,7 @@
<Compile Include="Common\ZipIndicator.cs" /> <Compile Include="Common\ZipIndicator.cs" />
<Compile Include="EnterpriseServer10.cs" /> <Compile Include="EnterpriseServer10.cs" />
<Compile Include="EnterpriseServer20.cs" /> <Compile Include="EnterpriseServer20.cs" />
<Compile Include="Internal\Adapter.cs" />
<Compile Include="Portal10.cs" /> <Compile Include="Portal10.cs" />
<Compile Include="Portal20.cs" /> <Compile Include="Portal20.cs" />
<Compile Include="Server10.cs" /> <Compile Include="Server10.cs" />

View file

@ -127,13 +127,13 @@ namespace WebsitePanel.Setup
switch (check.CheckType) switch (check.CheckType)
{ {
case CheckTypes.OperationSystem: case CheckTypes.OperationSystem:
status = CheckOS(out details); status = CheckOS(check.SetupVariables, out details);
break; break;
case CheckTypes.IISVersion: case CheckTypes.IISVersion:
status = CheckIISVersion(out details); status = CheckIISVersion(check.SetupVariables, out details);
break; break;
case CheckTypes.ASPNET: case CheckTypes.ASPNET:
status = CheckASPNET(out details); status = CheckASPNET(check.SetupVariables, out details);
break; break;
case CheckTypes.WPServer: case CheckTypes.WPServer:
status = CheckWPServer(check.SetupVariables, out details); status = CheckWPServer(check.SetupVariables, out details);
@ -221,7 +221,7 @@ namespace WebsitePanel.Setup
} }
private CheckStatuses CheckOS(out string details) internal static CheckStatuses CheckOS(SetupVariables setupVariables, out string details)
{ {
details = string.Empty; details = string.Empty;
try try
@ -237,6 +237,7 @@ namespace WebsitePanel.Setup
version == OS.WindowsVersion.WindowsServer2008 || version == OS.WindowsVersion.WindowsServer2008 ||
version == OS.WindowsVersion.WindowsServer2008R2 || version == OS.WindowsVersion.WindowsServer2008R2 ||
version == OS.WindowsVersion.WindowsServer2012 || version == OS.WindowsVersion.WindowsServer2012 ||
version == OS.WindowsVersion.WindowsServer2012R2 ||
version == OS.WindowsVersion.WindowsVista || version == OS.WindowsVersion.WindowsVista ||
version == OS.WindowsVersion.Windows7 || version == OS.WindowsVersion.Windows7 ||
version == OS.WindowsVersion.Windows8 )) version == OS.WindowsVersion.Windows8 ))
@ -260,20 +261,20 @@ namespace WebsitePanel.Setup
return CheckStatuses.Error; return CheckStatuses.Error;
} }
} }
private CheckStatuses CheckIISVersion(out string details) internal static CheckStatuses CheckIISVersion(SetupVariables setupVariables, out string details)
{ {
details = string.Empty; details = string.Empty;
try try
{ {
details = string.Format("IIS {0}", SetupVariables.IISVersion.ToString(2)); details = string.Format("IIS {0}", setupVariables.IISVersion.ToString(2));
if (SetupVariables.IISVersion.Major == 6 && if (setupVariables.IISVersion.Major == 6 &&
Utils.IsWin64() && Utils.IIS32Enabled()) Utils.IsWin64() && Utils.IIS32Enabled())
{ {
details += " (32-bit mode)"; details += " (32-bit mode)";
} }
Log.WriteInfo(string.Format("IIS check: {0}", details)); Log.WriteInfo(string.Format("IIS check: {0}", details));
if (SetupVariables.IISVersion.Major < 6) if (setupVariables.IISVersion.Major < 6)
{ {
details = "IIS 6.0 or greater required."; details = "IIS 6.0 or greater required.";
Log.WriteError(string.Format("IIS check: {0}", details), null); Log.WriteError(string.Format("IIS check: {0}", details), null);
@ -291,26 +292,26 @@ namespace WebsitePanel.Setup
} }
} }
private CheckStatuses CheckASPNET(out string details) internal static CheckStatuses CheckASPNET(SetupVariables setupVariables, out string details)
{ {
details = "ASP.NET 4.0 is installed."; details = "ASP.NET 4.0 is installed.";
CheckStatuses ret = CheckStatuses.Success; CheckStatuses ret = CheckStatuses.Success;
try try
{ {
// IIS 6 // IIS 6
if (SetupVariables.IISVersion.Major == 6) if (setupVariables.IISVersion.Major == 6)
{ {
// //
if (Utils.CheckAspNet40Registered(SetupVariables) == false) if (Utils.CheckAspNet40Registered(setupVariables) == false)
{ {
// Register ASP.NET 4.0 // Register ASP.NET 4.0
Utils.RegisterAspNet40(SetupVariables); Utils.RegisterAspNet40(setupVariables);
// //
ret = CheckStatuses.Warning; ret = CheckStatuses.Warning;
details = AspNet40HasBeenInstalledMessage; details = AspNet40HasBeenInstalledMessage;
} }
// Enable ASP.NET 4.0 Web Server Extension if it is prohibited // Enable ASP.NET 4.0 Web Server Extension if it is prohibited
if (Utils.GetAspNetWebExtensionStatus_Iis6(SetupVariables) == WebExtensionStatus.Prohibited) if (Utils.GetAspNetWebExtensionStatus_Iis6(setupVariables) == WebExtensionStatus.Prohibited)
{ {
Utils.EnableAspNetWebExtension_Iis6(); Utils.EnableAspNetWebExtension_Iis6();
} }
@ -331,10 +332,10 @@ namespace WebsitePanel.Setup
return CheckStatuses.Error; return CheckStatuses.Error;
} }
// Register ASP.NET 4.0 // Register ASP.NET 4.0
if (Utils.CheckAspNet40Registered(SetupVariables) == false) if (Utils.CheckAspNet40Registered(setupVariables) == false)
{ {
// Register ASP.NET 4.0 // Register ASP.NET 4.0
Utils.RegisterAspNet40(SetupVariables); Utils.RegisterAspNet40(setupVariables);
// //
ret = CheckStatuses.Warning; ret = CheckStatuses.Warning;
details = AspNet40HasBeenInstalledMessage; details = AspNet40HasBeenInstalledMessage;
@ -359,17 +360,17 @@ namespace WebsitePanel.Setup
} }
} }
private CheckStatuses CheckIIS32Mode(out string details) internal static CheckStatuses CheckIIS32Mode(SetupVariables setupVariables, out string details)
{ {
details = string.Empty; details = string.Empty;
CheckStatuses ret = CheckIISVersion(out details); CheckStatuses ret = CheckIISVersion(setupVariables, out details);
if (ret == CheckStatuses.Error) if (ret == CheckStatuses.Error)
return ret; return ret;
try try
{ {
//IIS 6 //IIS 6
if (SetupVariables.IISVersion.Major == 6) if (setupVariables.IISVersion.Major == 6)
{ {
//x64 //x64
if (Utils.IsWin64()) if (Utils.IsWin64())

View file

@ -0,0 +1,35 @@
using System;
using System.Diagnostics;
using System.Text;
namespace WebsitePanel.WIXInstaller.Common
{
class InMemoryStringLogListener : TraceListener
{
private const string Format = "[{0}] Message: {1}";
static private StringBuilder m_Ctx;
string m_id;
static InMemoryStringLogListener()
{
m_Ctx = new StringBuilder();
}
public InMemoryStringLogListener(string InstanceID)
: base(InstanceID)
{
m_id = InstanceID;
}
public override void Write(string Value)
{
WriteLog(Value);
}
public override void WriteLine(string Value)
{
WriteLog(Value + Environment.NewLine);
}
[Conditional("DEBUG")]
private void WriteLog(string Value)
{
m_Ctx.Append(string.Format(Format, m_id, Value));
}
}
}

View file

@ -0,0 +1,19 @@
using System;
namespace WebsitePanel.WIXInstaller.Common
{
internal struct Prop
{
public const int REQ_IIS_MINIMUM = 6;
public const string REQ_LOG = "PI_PREREQ_LOG";
public const string REQ_OS = "PI_PREREQ_OS";
public const string REQ_IIS = "PI_PREREQ_IIS";
public const string REQ_IIS_MAJOR = "PI_PREREQ_IIS_MAJOR";
public const string REQ_IIS_MINOR = "PI_PREREQ_IIS_MINOR";
public const string REQ_ASPNET = "PI_PREREQ_ASPNET";
public const string REQ_SERVER = "PI_PREREQ_WP_SERVER";
public const string REQ_ESERVER = "PI_PREREQ_WP_ESERVER";
public const string REQ_PORTAL = "PI_PREREQ_WP_PORTAL";
public const string REQ_WDPORTAL = "PI_PREREQ_WP_WDPORTAL";
}
}

View file

@ -0,0 +1,36 @@
using Microsoft.Deployment.WindowsInstaller;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WebsitePanel.Setup;
namespace WebsitePanel.WIXInstaller.Common
{
internal static class Tool
{
public static SetupVariables GetSetupVars(Session Ctx)
{
return new SetupVariables
{
SetupAction = SetupActions.Install,
IISVersion = Global.IISVersion
};
}
public static void FillServerVariables(SetupVariables Vars)
{
}
public static void FillEServerVariables(SetupVariables Vars)
{
}
public static void FillPortalVariables(SetupVariables Vars)
{
}
}
}

View file

@ -0,0 +1,79 @@
using System;
using Microsoft.Deployment.WindowsInstaller;
namespace WebsitePanel.WIXInstaller.Common.Util
{
internal interface IListCtrl
{
ulong Count { get; }
string Id { get; }
void AddItem(Record Item);
}
internal abstract class ListCtrlBase : IListCtrl
{
private Session m_Ctx;
private string m_CtrlType;
private string m_CtrlId;
private View m_View;
private ulong m_Count;
public ListCtrlBase(Session session, string CtrlType, string CtrlId)
{
m_Ctx = session;
m_CtrlType = CtrlType;
m_CtrlId = CtrlId;
m_View = null;
m_Count = 0;
Initialize();
}
~ListCtrlBase()
{
if (m_View != null)
m_View.Close();
}
public virtual ulong Count { get { return m_Count; } }
public virtual string Id { get { return m_CtrlId; } }
public virtual void AddItem(Record Item)
{
m_View.Execute(Item);
++m_Count;
}
private void Initialize()
{
m_Ctx.Database.Execute(string.Format("DELETE FROM `{0}` WHERE `Property`='{1}'", m_CtrlType, m_CtrlId));
m_View = m_Ctx.Database.OpenView(m_Ctx.Database.Tables[m_CtrlType].SqlInsertString + " TEMPORARY");
}
}
class ListViewCtrl : ListCtrlBase
{
public ListViewCtrl(Session session, string WiXListID) : base(session, "ListView", WiXListID)
{
}
public void AddItem(bool Checked, string Value)
{
AddItem(new Record(new object[] { Id, Count, Value, Value, Checked ? "passmark" : "failmark" }));
}
}
class ComboBoxCtrl : ListCtrlBase
{
public ComboBoxCtrl(Session session, string WiXComboID): base(session, "ComboBox", WiXComboID)
{
}
public void AddItem(string Value)
{
AddItem(new Record(new object[] { Id, Count, Value, Value }));
}
}
}

View file

@ -0,0 +1,26 @@
using System;
using System.Diagnostics;
using Microsoft.Deployment.WindowsInstaller;
namespace WebsitePanel.WIXInstaller.Common
{
public class WiXLogListener : TraceListener
{
private Session m_Ctx;
public WiXLogListener(Session Ctx)
: base("WiXLogListener")
{
m_Ctx = Ctx;
}
public override void Write(string Value)
{
m_Ctx.Log(Value);
}
public override void WriteLine(string Value)
{
m_Ctx.Log(Value + Environment.NewLine);
}
}
}

View file

@ -0,0 +1,11 @@
using System;
namespace WebsitePanel.WIXInstaller.Common
{
internal struct YesNo
{
public static string Yes { get { return "1"; } }
public static string No { get { return "0"; } }
}
}

View file

@ -25,51 +25,244 @@
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Configuration.Install; using System.Configuration.Install;
using System.Data; using System.Data;
using System.Data.Sql;
using System.Data.SqlClient; using System.Data.SqlClient;
using System.Diagnostics;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Net.NetworkInformation;
using System.Net.Sockets;
using System.ServiceProcess; using System.ServiceProcess;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Threading;
using System.Windows.Forms;
using System.Windows.Forms.VisualStyles;
using System.Xml; using System.Xml;
using Microsoft.Deployment.WindowsInstaller; using Microsoft.Deployment.WindowsInstaller;
using WebsitePanel.Setup; using WebsitePanel.Setup;
using WebsitePanel.Setup.Internal;
using WebsitePanel.WIXInstaller.Common;
using WebsitePanel.WIXInstaller.Common.Util;
namespace WebsitePanel.WIXInstaller namespace WebsitePanel.WIXInstaller
{ {
public class CustomActions public class CustomActions
{ {
public static List<string> SysDb = new List<string> { "tempdb", "master", "model", "msdb" };
public const string CustomDataDelimiter = "-=del=-"; public const string CustomDataDelimiter = "-=del=-";
#region CustomActions
// Install.
[CustomAction] [CustomAction]
public static ActionResult CheckConnection(Session session) public static ActionResult OnServerInstall(Session session)
{ {
string testConnectionString = session["AUTHENTICATIONTYPE"].Equals("Windows Authentication") ? GetConnectionString(session["SERVERNAME"], "master") : GetConnectionString(session["SERVERNAME"], "master", session["LOGIN"], session["PASSWORD"]); PopUpDebugger();
return ProcessInstall(session, WiXInstallType.InstallServer);
if (CheckConnection(testConnectionString)) }
[CustomAction]
public static ActionResult OnEServerInstall(Session session)
{
PopUpDebugger();
return ProcessInstall(session, WiXInstallType.InstallEnterpriseServer);
}
[CustomAction]
public static ActionResult OnPortalInstall(Session session)
{
PopUpDebugger();
return ProcessInstall(session, WiXInstallType.InstallPortal);
}
// Remove.
[CustomAction]
public static ActionResult OnServerRemove(Session session)
{
PopUpDebugger();
return ProcessInstall(session, WiXInstallType.RemoveServer);
}
[CustomAction]
public static ActionResult OnEServerRemove(Session session)
{
PopUpDebugger();
return ProcessInstall(session, WiXInstallType.RemoveEnterpriseServer);
}
[CustomAction]
public static ActionResult OnPortalRemove(Session session)
{
PopUpDebugger();
return ProcessInstall(session, WiXInstallType.RemovePortal);
}
// Other.
[CustomAction]
public static ActionResult SetEServerUrlUI(Session session)
{
var Ctx = session;
Ctx["PI_ESERVER_URL"] = string.Format("http://{0}:{1}/", Ctx["PI_ESERVER_IP"], Ctx["PI_ESERVER_PORT"]);
return ActionResult.Success;
}
[CustomAction]
public static ActionResult RecapListUI(Session session)
{
const string F_WSP = "WebsitePanel";
const string F_Server = "ServerFeature";
const string F_EServer = "EnterpriseServerFeature";
const string F_Portal = "PortalFeature";
const string F_Scheduler = "SchedulerServiceFeature";
const string F_WDPosrtal = "WDPortalFeature";
var S_Install = new List<string> { "Copy WebsitePanel Server files", "Add WebsitePanel Server website" };
var ES_Install = new List<string> { "Copy WebsitePanel Enterprise Server files", "Install WebsitePanel database and updates", "Add WebsitePanel Enterprise Server website" };
var P_Install = new List<string> { "Copy WebsitePanel Portal files", "Add WebsitePanel Enterprise Portal website" };
var SCH_Install = new List<string> { "Copy WebsitePanel Scheduler Service files", "Install Scheduler Service Windows Service" };
var WDP_Install = new List<string> { "Copy WebsitePanel WebDav Portal files" };
var S_Uninstall = new List<string> { "Delete WebsitePanel Server files", "Remove WebsitePanel Server website" };
var ES_Uninstall = new List<string> { "Delete WebsitePanel Enterprise Server files", "Keep WebsitePanel database and updates", "Remove WebsitePanel Enterprise Server website" };
var P_Uninstall = new List<string> { "Delete WebsitePanel Portal files", "Remove WebsitePanel Enterprise Portal website" };
var SCH_Uninstall = new List<string> { "Delete WebsitePanel Scheduler Service files", "Remove Scheduler Service Windows Service" };
var WDP_Uninstall = new List<string> { "Delete WebsitePanel WebDav Portal files" };
var RecapList = new List<string>();
var EmptyList = new List<string>();
var Ctx = session;
RecapListReset(Ctx);
foreach (var Feature in Ctx.Features)
{ {
session["CORRECTCONNECTION"] = "1"; switch (Feature.Name)
session["CONNECTIONSTRING"] = session["AUTHENTICATIONTYPE"].Equals("Windows Authentication") ? GetConnectionString(session["SERVERNAME"], session["DATABASENAME"]) : GetConnectionString(session["SERVERNAME"], session["DATABASENAME"], session["LOGIN"], session["PASSWORD"]); {
case F_WSP:
break;
case F_Server:
RecapList.AddRange(Feature.RequestState == InstallState.Local ? S_Install : /*S_Uninstall*/ EmptyList);
break;
case F_EServer:
RecapList.AddRange(Feature.RequestState == InstallState.Local ? ES_Install : /*ES_Uninstall*/ EmptyList);
break;
case F_Portal:
RecapList.AddRange(Feature.RequestState == InstallState.Local ? P_Install : /*P_Uninstall*/ EmptyList);
break;
case F_Scheduler:
RecapList.AddRange(Feature.RequestState == InstallState.Local ? SCH_Install : /*SCH_Uninstall*/ EmptyList);
break;
case F_WDPosrtal:
RecapList.AddRange(Feature.RequestState == InstallState.Local ? WDP_Install : /*WDP_Uninstall*/ EmptyList);
break;
default:
break;
}
} }
RecapListAdd(Ctx, RecapList.ToArray());
return ActionResult.Success;
}
[CustomAction]
public static ActionResult DatabaseConnectionValidateUI(Session session)
{
var Ctx = session;
bool Valid = true;
string Msg;
ValidationReset(Ctx);
Valid = ValidateDbNameUI(Ctx, out Msg);
ValidationMsg(Ctx, Msg);
ValidationStatus(Ctx, Valid);
return ActionResult.Success;
}
[CustomAction]
public static ActionResult ServerAdminValidateUI(Session session)
{
var Ctx = session;
bool Valid = true;
string Msg;
ValidationReset(Ctx);
Valid = ValidatePasswordUI(Ctx, "SERVERADMIN", out Msg);
ValidationMsg(Ctx, Msg);
ValidationStatus(Ctx, Valid);
return ActionResult.Success;
}
[CustomAction]
public static ActionResult ServerValidateADUI(Session session)
{
var Ctx = session;
bool Valid = true;
string Msg;
ValidationReset(Ctx);
Valid = ValidateADUI(Ctx, "PI_SERVER", out Msg);
ValidationMsg(Ctx, Msg);
ValidationStatus(Ctx, Valid);
return ActionResult.Success;
}
[CustomAction]
public static ActionResult EServerValidateADUI(Session session)
{
var Ctx = session;
bool Valid = true;
string Msg;
ValidationReset(Ctx);
Valid = ValidateADUI(Ctx, "PI_ESERVER", out Msg);
ValidationMsg(Ctx, Msg);
ValidationStatus(Ctx, Valid);
return ActionResult.Success;
}
[CustomAction]
public static ActionResult PortalValidateADUI(Session session)
{
var Ctx = session;
bool Valid = true;
string Msg;
ValidationReset(Ctx);
Valid = ValidateADUI(Ctx, "PI_PORTAL", out Msg);
ValidationMsg(Ctx, Msg);
ValidationStatus(Ctx, Valid);
return ActionResult.Success;
}
[CustomAction]
public static ActionResult ServerAccessValidateUI(Session session)
{
var Ctx = session;
bool Valid = true;
string Msg;
ValidationReset(Ctx);
Valid = ValidatePasswordUI(Ctx, "SERVER_ACCESS", out Msg);
ValidationMsg(Ctx, Msg);
ValidationStatus(Ctx, Valid);
return ActionResult.Success;
}
[CustomAction]
public static ActionResult SqlServerListUI(Session session)
{
var Ctx = session;
var SrvList = new ComboBoxCtrl(Ctx, "DB_SERVER");
foreach (var Srv in GetSqlInstances())
SrvList.AddItem(Srv);
return ActionResult.Success;
}
[CustomAction]
public static ActionResult DbListUI(Session session)
{
string tmp;
var Ctrl = new ComboBoxCtrl(session, "DB_SELECT");
if (CheckConnection(session["DB_CONN"], out tmp))
foreach (var Db in GetDbList(ConnStr: session["DB_CONN"], ForbiddenNames: SysDb))
{
Ctrl.AddItem(Db);
session["DB_SELECT"] = Db; // Adds available DBs to installer log.
}
else else
{ session["DB_SELECT"] = "";
session["CORRECTCONNECTION"] = "0"; return ActionResult.Success;
} }
[CustomAction]
public static ActionResult CheckConnectionUI(Session session)
{
string ConnStr = session["DB_AUTH"].Equals("Windows Authentication") ? GetConnectionString(session["DB_SERVER"], "master") :
GetConnectionString(session["DB_SERVER"], "master", session["DB_LOGIN"], session["DB_PASSWORD"]);
string msg;
bool Result = CheckConnection(ConnStr, out msg);
session["DB_CONN_CORRECT"] = Result ? "1" : "0";
session["DB_CONN"] = Result ? ConnStr : "";
session["DB_CONN_MSG"] = msg;
return ActionResult.Success; return ActionResult.Success;
} }
[CustomAction] [CustomAction]
public static ActionResult FinalizeInstall(Session session) public static ActionResult FinalizeInstall(Session session)
{ {
var connectionString = GetCustomActionProperty(session, "ConnectionString").Replace(CustomDataDelimiter, ";"); /*var connectionString = GetCustomActionProperty(session, "ConnectionString").Replace(CustomDataDelimiter, ";");
var serviceFolder = GetCustomActionProperty(session, "ServiceFolder"); var serviceFolder = GetCustomActionProperty(session, "ServiceFolder");
var previousConnectionString = GetCustomActionProperty(session, "PreviousConnectionString").Replace(CustomDataDelimiter, ";"); var previousConnectionString = GetCustomActionProperty(session, "PreviousConnectionString").Replace(CustomDataDelimiter, ";");
var previousCryptoKey = GetCustomActionProperty(session, "PreviousCryptoKey"); var previousCryptoKey = GetCustomActionProperty(session, "PreviousCryptoKey");
@ -85,7 +278,7 @@ namespace WebsitePanel.WIXInstaller
ChangeConfigString("/configuration/connectionStrings/add[@name='EnterpriseServer']", "connectionString", connectionString, serviceFolder); ChangeConfigString("/configuration/connectionStrings/add[@name='EnterpriseServer']", "connectionString", connectionString, serviceFolder);
ChangeConfigString("/configuration/appSettings/add[@key='WebsitePanel.CryptoKey']", "value", previousCryptoKey, serviceFolder); ChangeConfigString("/configuration/appSettings/add[@key='WebsitePanel.CryptoKey']", "value", previousCryptoKey, serviceFolder);
InstallService(serviceFolder); InstallService(serviceFolder);*/
return ActionResult.Success; return ActionResult.Success;
} }
@ -93,7 +286,7 @@ namespace WebsitePanel.WIXInstaller
[CustomAction] [CustomAction]
public static ActionResult FinalizeUnInstall(Session session) public static ActionResult FinalizeUnInstall(Session session)
{ {
UnInstallService(); // UnInstallService();
return ActionResult.Success; return ActionResult.Success;
} }
@ -105,7 +298,7 @@ namespace WebsitePanel.WIXInstaller
session["SERVICEFOLDER"] = session["INSTALLFOLDER"]; session["SERVICEFOLDER"] = session["INSTALLFOLDER"];
var servicePath = SecurityUtils.GetServicePath("WebsitePanel Scheduler"); var servicePath = /*SecurityUtils.GetServicePath("WebsitePanel Scheduler")*/"";
if (!string.IsNullOrEmpty(servicePath)) if (!string.IsNullOrEmpty(servicePath))
{ {
@ -131,13 +324,59 @@ namespace WebsitePanel.WIXInstaller
{ {
session["SERVICEFOLDER"] = servicePath; session["SERVICEFOLDER"] = servicePath;
} }
} }
} }
return ActionResult.Success; return ActionResult.Success;
} }
[CustomAction]
public static ActionResult PrereqCheck(Session session)
{
string Msg;
var Ctx = Tool.GetSetupVars(session);
var ros = Adapter.CheckOS(Ctx, out Msg);
AddLog(session, Msg);
var riis = Adapter.CheckIIS(Ctx, out Msg);
AddLog(session, Msg);
var raspnet = Adapter.CheckASPNET(Ctx, out Msg);
AddLog(session, Msg);
session[Prop.REQ_OS] = ros == CheckStatuses.Success ? YesNo.Yes : YesNo.No;
session[Prop.REQ_IIS] = riis == CheckStatuses.Success ? YesNo.Yes : YesNo.No; ;
session[Prop.REQ_ASPNET] = raspnet == CheckStatuses.Success ? YesNo.Yes : YesNo.No; ;
session[Prop.REQ_SERVER] = YesNo.Yes;
session[Prop.REQ_ESERVER] = YesNo.Yes;
session[Prop.REQ_PORTAL] = YesNo.Yes;
session[Prop.REQ_WDPORTAL] = YesNo.Yes;
return ActionResult.Success;
}
[CustomAction]
public static ActionResult PrereqCheckUI(Session session)
{
var ListView = new ListViewCtrl(session, "REQCHECKLIST");
AddCheck(ListView, session, Prop.REQ_OS);
AddCheck(ListView, session, Prop.REQ_IIS);
AddCheck(ListView, session, Prop.REQ_ASPNET);
AddCheck(ListView, session, Prop.REQ_SERVER);
AddCheck(ListView, session, Prop.REQ_ESERVER);
AddCheck(ListView, session, Prop.REQ_PORTAL);
AddCheck(ListView, session, Prop.REQ_WDPORTAL);
return ActionResult.Success;
}
[CustomAction]
public static ActionResult FillIpListUI(Session session)
{
var Ctrls = new[]{ new ComboBoxCtrl(session, "PI_SERVER_IP"),
new ComboBoxCtrl(session, "PI_ESERVER_IP"),
new ComboBoxCtrl(session, "PI_PORTAL_IP") };
foreach (var Ip in GetIpList())
foreach (var Ctrl in Ctrls)
Ctrl.AddItem(Ip);
return ActionResult.Success;
}
#endregion
private static void InstallService(string installFolder) private static void InstallService(string installFolder)
{ {
try try
@ -204,7 +443,6 @@ namespace WebsitePanel.WIXInstaller
} }
} }
private static void StopService(string serviceName) private static void StopService(string serviceName)
{ {
var sc = new ServiceController(serviceName); var sc = new ServiceController(serviceName);
@ -229,36 +467,30 @@ namespace WebsitePanel.WIXInstaller
private static string GetConnectionString(string serverName, string databaseName) private static string GetConnectionString(string serverName, string databaseName)
{ {
return string.Format("Server={0};database={1};Trusted_Connection=true;", serverName, databaseName).Replace(";", CustomDataDelimiter); return string.Format("Server={0};database={1};Trusted_Connection=true;", serverName, databaseName)/*.Replace(";", CustomDataDelimiter)*/;
} }
private static string GetConnectionString(string serverName, string databaseName, string login, string password) private static string GetConnectionString(string serverName, string databaseName, string login, string password)
{ {
return string.Format("Server={0};database={1};uid={2};password={3};", serverName, databaseName, login, password).Replace(";", CustomDataDelimiter); return string.Format("Server={0};database={1};uid={2};password={3};", serverName, databaseName, login, password)/*.Replace(";", CustomDataDelimiter)*/;
} }
static bool CheckConnection(string ConnStr, out string Info)
private static bool CheckConnection(string connectionString)
{ {
var connection = new SqlConnection(connectionString); Info = string.Empty;
bool result = true; bool Result = false;
using (var Conn = new SqlConnection(ConnStr))
try
{ {
connection.Open(); try
}
catch (Exception)
{
result = false;
}
finally
{
if (connection != null && connection.State == ConnectionState.Open)
{ {
connection.Close(); Conn.Open();
Result = true;
}
catch (Exception ex)
{
Info = ex.Message;
} }
} }
return Result;
return result;
} }
private static string GetCustomActionProperty(Session session, string key) private static string GetCustomActionProperty(Session session, string key)
@ -270,5 +502,235 @@ namespace WebsitePanel.WIXInstaller
return string.Empty; return string.Empty;
} }
private static void AddCheck(ListViewCtrl view, Session session, string PropertyID)
{
view.AddItem(session[PropertyID] == YesNo.Yes, session[PropertyID + "_TITLE"]);
}
static IList<string> GetSqlInstances()
{
var Result = new List<string>();
using (var Src = SqlDataSourceEnumerator.Instance.GetDataSources())
{
foreach (DataRow Row in Src.Rows)
{
var Instance = Row["InstanceName"].ToString();
Result.Add((string.IsNullOrWhiteSpace(Instance) ? "" : (Instance + "\\")) + Row["ServerName"].ToString());
}
}
return Result;
}
static IEnumerable<string> GetDbList(string ConnStr, IList<string> ForbiddenNames = null)
{
using (var Conn = new SqlConnection(ConnStr))
{
Conn.Open();
var Cmd = Conn.CreateCommand();
Cmd.CommandText = "SELECT name FROM master..sysdatabases";
if (ForbiddenNames != null && ForbiddenNames.Count > 0)
Cmd.CommandText += string.Format(" WHERE name NOT IN ({0})", string.Join(", ", ForbiddenNames.Select(x => string.Format("'{0}'", x))));
var Result = Cmd.ExecuteReader();
while (Result.Read())
yield return Result["name"].ToString();
}
}
static IEnumerable<string> GetIpList()
{
foreach (var Ni in NetworkInterface.GetAllNetworkInterfaces())
if (Ni.OperationalStatus == OperationalStatus.Up && (Ni.NetworkInterfaceType == NetworkInterfaceType.Ethernet ||
Ni.NetworkInterfaceType == NetworkInterfaceType.Wireless80211 ||
Ni.NetworkInterfaceType == NetworkInterfaceType.Loopback))
foreach (var IpInfo in Ni.GetIPProperties().UnicastAddresses)
if (IpInfo.Address.AddressFamily == AddressFamily.InterNetwork)
yield return IpInfo.Address.ToString();
}
internal static void AddLog(Session Ctx, string Msg)
{
AddTo(Ctx, "PI_PREREQ_LOG", Msg);
}
internal static void AddTo(Session Ctx, string TextProp, string Msg)
{
if (!string.IsNullOrWhiteSpace(Msg))
{
string tmp = Ctx[TextProp];
if (string.IsNullOrWhiteSpace(tmp))
Ctx[TextProp] = Msg;
else
Ctx[TextProp] = tmp + Environment.NewLine + Msg;
}
}
internal static void ValidationReset(Session Ctx)
{
Ctx["VALIDATE_OK"] = "0";
Ctx["VALIDATE_MSG"] = "Error occurred.";
}
internal static void ValidationStatus(Session Ctx, bool Value)
{
Ctx["VALIDATE_OK"] = Value ? YesNo.Yes : YesNo.No;
}
internal static void ValidationMsg(Session Ctx, string Msg)
{
AddTo(Ctx, "VALIDATE_MSG", Msg);
}
internal static bool PasswordValidate(string Password, string Confirm, out string Msg)
{
Msg = string.Empty;
bool Result = false;
if (string.IsNullOrWhiteSpace(Password))
Msg = "Empty password.";
else if (Password != Confirm)
Msg = "Password does not match the confirm password. Type both passwords again.";
else
Result = true;
return Result;
}
internal static bool ValidatePasswordUI(Session Ctx, string Ns, out string Msg)
{
string p1 = Ctx[Ns + "_PASSWORD"];
string p2 = Ctx[Ns + "_PASSWORD_CONFIRM"];
return PasswordValidate(p1, p2, out Msg);
}
internal static bool ValidateADDomainUI(Session Ctx, string Ns, out string Msg)
{
bool Result = default(bool);
bool check = Ctx[Ns + "_CREATE_AD"] == YesNo.Yes;
string name = Ctx[Ns + "_DOMAIN"];
if (check && string.IsNullOrWhiteSpace(name))
{
Result = false;
Msg = "The domain can't be empty.";
}
else
{
Result = true;
Msg = string.Empty;
}
return Result;
}
internal static bool ValidateADLoginUI(Session Ctx, string Ns, out string Msg)
{
bool Result = default(bool);
string name = Ctx[Ns + "_LOGIN"];
if (string.IsNullOrWhiteSpace(name))
{
Result = false;
Msg = "The login can't be empty.";
}
else
{
Result = true;
Msg = string.Empty;
}
return Result;
}
internal static bool ValidateADUI(Session Ctx, string Ns, out string Msg)
{
bool Result = true;
if (!ValidateADDomainUI(Ctx, Ns, out Msg))
Result = false;
else if (!ValidateADLoginUI(Ctx, Ns, out Msg))
Result = false;
else if (!ValidatePasswordUI(Ctx, Ns, out Msg))
Result = false;
return Result;
}
internal static bool ValidateDbNameUI(Session Ctx, out string Msg)
{
Msg = string.Empty;
var Result = true;
string DbName = Ctx["DB_DATABASE"];
if (string.IsNullOrWhiteSpace(DbName))
{
Result = false;
Msg = "The database name can't be empty.";
}
return Result;
}
internal static void RecapListReset(Session Ctx)
{
Ctx["CUSTOM_INSTALL_TEXT"] = string.Empty;
}
internal static void RecapListAdd(Session Ctx, params string[] Msgs)
{
foreach (var Msg in Msgs)
AddTo(Ctx, "CUSTOM_INSTALL_TEXT", Msg); ;
}
internal static string GetProperty(Session Ctx, string Property)
{
if (Ctx.CustomActionData.ContainsKey(Property))
return Ctx[Property];
else
return string.Empty;
}
private static ActionResult ProcessInstall(Session Ctx, WiXInstallType InstallType)
{
IWiXSetup Install = null;
try
{
Ctx.AttachToSetupLog();
switch (InstallType)
{
case WiXInstallType.InstallServer:
Install = ServerSetup.Create(Ctx.CustomActionData, SetupActions.Install);
break;
case WiXInstallType.RemoveServer:
Install = ServerSetup.Create(Ctx.CustomActionData, SetupActions.Uninstall);
break;
case WiXInstallType.InstallEnterpriseServer:
Install = EServerSetup.Create(Ctx.CustomActionData, SetupActions.Install);
break;
case WiXInstallType.RemoveEnterpriseServer:
Install = EServerSetup.Create(Ctx.CustomActionData, SetupActions.Uninstall);
break;
case WiXInstallType.InstallPortal:
Install = PortalSetup.Create(Ctx.CustomActionData, SetupActions.Install);
break;
case WiXInstallType.RemovePortal:
Install = PortalSetup.Create(Ctx.CustomActionData, SetupActions.Uninstall);
break;
default:
throw new NotImplementedException();
}
Install.Run();
}
catch (WiXSetupException we)
{
Ctx.Log("Expected exception: " + we.ToString());
return ActionResult.Failure;
}
catch (Exception ex)
{
Ctx.Log(ex.ToString());
return ActionResult.Failure;
}
return ActionResult.Success;
}
[Conditional("DEBUG")]
private static void PopUpDebugger()
{
Debugger.Launch();
}
} }
public static class SessionExtension
{
public static void AttachToSetupLog(this Session Ctx)
{
WiXSetup.InstallLogListener(new WiXLogListener(Ctx));
WiXSetup.InstallLogListener(new InMemoryStringLogListener("WIX CA IN MEMORY"));
}
}
internal enum WiXInstallType: byte
{
InstallServer,
InstallEnterpriseServer,
InstallPortal,
RemoveServer,
RemoveEnterpriseServer,
RemovePortal,
RemoveUpdate,
RestoreUpdate
}
} }

View file

@ -32,10 +32,25 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<AddPdb Include="$(OutputPath)*.pdb" />
</ItemGroup>
<PropertyGroup>
<IntermediateOutputPath Condition=" '$(PlatformName)' == 'AnyCPU' ">$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
<IntermediateOutputPath Condition=" '$(PlatformName)' != 'AnyCPU' ">$(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<CustomActionContents>$(IntermediateOutputPath)$(AssemblyName).pdb;@(AddPdb)</CustomActionContents>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Web.Administration, Version=7.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Lib\Microsoft.Web.Administration.dll</HintPath>
</Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration.Install" /> <Reference Include="System.Configuration.Install" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.DirectoryServices" />
<Reference Include="System.ServiceProcess" /> <Reference Include="System.ServiceProcess" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
@ -44,6 +59,12 @@
<Reference Include="Microsoft.Deployment.WindowsInstaller" /> <Reference Include="Microsoft.Deployment.WindowsInstaller" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Common\InMemoryStringLogListener.cs" />
<Compile Include="Common\Tool.cs" />
<Compile Include="Common\Prop.cs" />
<Compile Include="Common\Util\IListCtrl.cs" />
<Compile Include="Common\WiXLogListener.cs" />
<Compile Include="Common\YesNo.cs" />
<Compile Include="CustomAction.cs" /> <Compile Include="CustomAction.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Content Include="CustomAction.config" /> <Content Include="CustomAction.config" />
@ -53,6 +74,10 @@
<Project>{3951C0EC-BD98-450E-B228-CDBE5BD4AD49}</Project> <Project>{3951C0EC-BD98-450E-B228-CDBE5BD4AD49}</Project>
<Name>WebsitePanel.Setup</Name> <Name>WebsitePanel.Setup</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\WebsitePanel.Installer.Core\WebsitePanel.Installer.Core.csproj">
<Project>{0E4A3F5B-0BB1-4F63-863D-7B0182B378CF}</Project>
<Name>WebsitePanel.Installer.Core</Name>
</ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(WixCATargetsPath)" /> <Import Project="$(WixCATargetsPath)" />

File diff suppressed because it is too large Load diff

View file

@ -8214,6 +8214,8 @@ AS
WHERE SIP.PropertyName = 'RamSize' AND PT.ParentPackageID = @PackageID) WHERE SIP.PropertyName = 'RamSize' AND PT.ParentPackageID = @PackageID)
DECLARE @Result2 int = (SELECT SUM(CAST(SIP.PropertyValue AS int)) FROM ServiceItemProperties AS SIP DECLARE @Result2 int = (SELECT SUM(CAST(SIP.PropertyValue AS int)) FROM ServiceItemProperties AS SIP
INNER JOIN ServiceItems AS SI ON SIP.ItemID = SI.ItemID INNER JOIN ServiceItems AS SI ON SIP.ItemID = SI.ItemID
INNER JOIN ServiceItemProperties AS SIP2 ON
SIP2.ItemID = SI.ItemID AND SIP2.PropertyName = 'DynamicMemory.Enabled' AND SIP2.PropertyValue = 'True'
INNER JOIN PackagesTreeCache AS PT ON SI.PackageID = PT.PackageID INNER JOIN PackagesTreeCache AS PT ON SI.PackageID = PT.PackageID
WHERE SIP.PropertyName = 'DynamicMemory.Maximum' AND PT.ParentPackageID = @PackageID) WHERE SIP.PropertyName = 'DynamicMemory.Maximum' AND PT.ParentPackageID = @PackageID)
SET @Result = CASE WHEN isnull(@Result1,0) > isnull(@Result2,0) THEN @Result1 ELSE @Result2 END SET @Result = CASE WHEN isnull(@Result1,0) > isnull(@Result2,0) THEN @Result1 ELSE @Result2 END
@ -10437,79 +10439,79 @@ GO
DECLARE @ExchangeMailboxSetupLetterTextBody nvarchar(2500) DECLARE @ExchangeMailboxSetupLetterTextBody nvarchar(2500)
Set @ExchangeMailboxSetupLetterTextBody = N'<ad:if test="#Email#"> Set @ExchangeMailboxSetupLetterTextBody = N'<ad:if test="#Email#">
Hello #Account.DisplayName#, Hello #Account.DisplayName#,
Thanks for choosing VirtuWorks as your Exchange hosting provider. Thanks for choosing VirtuWorks as your Exchange hosting provider.
</ad:if> </ad:if>
<ad:if test="#not(PMM)#"> <ad:if test="#not(PMM)#">
User Accounts User Accounts
The following user accounts have been created for you. The following user accounts have been created for you.
Username: #Account.UserPrincipalName# Username: #Account.UserPrincipalName#
E-mail: #Account.PrimaryEmailAddress# E-mail: #Account.PrimaryEmailAddress#
<ad:if test="#PswResetUrl#"> <ad:if test="#PswResetUrl#">
Password Reset Url: #PswResetUrl# Password Reset Url: #PswResetUrl#
</ad:if> </ad:if>
</ad:if> </ad:if>
================================= =================================
DNS DNS
================================= =================================
In order for us to accept mail for your domain, you will need to point your MX records to: In order for us to accept mail for your domain, you will need to point your MX records to:
<ad:foreach collection="#SmtpServers#" var="SmtpServer" index="i">#SmtpServer#</ad:foreach> <ad:foreach collection="#SmtpServers#" var="SmtpServer" index="i">#SmtpServer#</ad:foreach>
================================= =================================
Webmail (OWA, Outlook Web Access) Webmail (OWA, Outlook Web Access)
================================= =================================
https://mail.virtuworks.net/owa https://mail.virtuworks.net/owa
================================= =================================
Outlook (Windows Clients) Outlook (Windows Clients)
================================= =================================
To configure Outlook 2010 to work with VirtuWorks servers, please reference: To configure Outlook 2010 to work with VirtuWorks servers, please reference:
https://portal.virtuworks.net/whmcs/knowledgebase.php?action=displayarticle&id=2 https://portal.virtuworks.net/whmcs/knowledgebase.php?action=displayarticle&id=2
If you need to download and install the Outlook 2010 client: If you need to download and install the Outlook 2010 client:
Outlook 2010 Download URL: Outlook 2010 Download URL:
32 Bit - http://www.virtuworks.net/downloads/Outlook2010-32bit.zip 32 Bit - http://www.virtuworks.net/downloads/Outlook2010-32bit.zip
64 Bit - http://www.virtuworks.net/downloads/Outlook2010-64bit.zip 64 Bit - http://www.virtuworks.net/downloads/Outlook2010-64bit.zip
KEY: HXGFV-DY3HM-4W2BQ-3R7KQ-K8P49 KEY: HXGFV-DY3HM-4W2BQ-3R7KQ-K8P49
================================= =================================
ActiveSync, iPhone, iPad ActiveSync, iPhone, iPad
================================= =================================
Server: #ActiveSyncServer# Server: #ActiveSyncServer#
Domain: #SamDomain# Domain: #SamDomain#
SSL: must be checked SSL: must be checked
Your username: #SamUsername# Your username: #SamUsername#
================================= =================================
Password Changes Password Changes
================================= =================================
Passwords can be changed at any time using Webmail or the Control Panel (https://controlpanel.virtuworks.net). Passwords can be changed at any time using Webmail or the Control Panel (https://controlpanel.virtuworks.net).
================================= =================================
Control Panel Control Panel
================================= =================================
If you need to change the details of your account, you can easily do this using the Control Panel (https://controlpanel.virtuworks.net). If you need to change the details of your account, you can easily do this using the Control Panel (https://controlpanel.virtuworks.net).
================================= =================================
Support Support
================================= =================================
You have 2 options, email help@virtuworks.com or use the web interface at http://www.virtuworks.com/contact/' You have 2 options, email help@virtuworks.com or use the web interface at http://www.virtuworks.com/contact/'
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'ExchangeMailboxSetupLetter' AND [PropertyName]= N'TextBody' ) IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'ExchangeMailboxSetupLetter' AND [PropertyName]= N'TextBody' )
@ -10822,3 +10824,238 @@ SET ANSI_NULLS ON
GO GO
SET QUOTED_IDENTIFIER OFF SET QUOTED_IDENTIFIER OFF
GO GO
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetSearchObject')
DROP PROCEDURE GetSearchObject
GO
CREATE PROCEDURE [dbo].[GetSearchObject]
(
@ActorID int,
@UserID int,
@FilterColumn nvarchar(50) = '',
@FilterValue nvarchar(50) = '',
@StatusID int,
@RoleID int,
@SortColumn nvarchar(50),
@StartRow int,
@MaximumRows int = 0,
@Recursive bit,
@ColType nvarchar(50) = '',
@FullType nvarchar(50) = ''
)
AS
IF dbo.CheckActorUserRights(@ActorID, @UserID) = 0
RAISERROR('You are not allowed to access this account', 16, 1)
DECLARE @columnUsername nvarchar(20)
SET @columnUsername = 'Username'
DECLARE @columnEmail nvarchar(20)
SET @columnEmail = 'Email'
DECLARE @columnCompanyName nvarchar(20)
SET @columnCompanyName = 'CompanyName'
DECLARE @columnFullName nvarchar(20)
SET @columnFullName = 'FullName'
DECLARE @curUsers cursor
DECLARE @curSpace cursor
DECLARE @sqlSpace nvarchar(2000)
DECLARE @sqlUsers nvarchar(2000)
DECLARE @sqlReturn nvarchar(2000)
IF @FilterColumn = '' AND @FilterValue <> ''
SET @FilterColumn = 'TextSearch'
SET @sqlUsers = '
DECLARE @HasUserRights bit
SET @HasUserRights = dbo.CheckActorUserRights(@ActorID, @UserID)
DECLARE @Users TABLE
(
ItemPosition int IDENTITY(0,1),
UserID int
)
INSERT INTO @Users (UserID)
SELECT
U.UserID
FROM UsersDetailed AS U
WHERE
U.UserID <> @UserID AND U.IsPeer = 0 AND
(
(@Recursive = 0 AND OwnerID = @UserID) OR
(@Recursive = 1 AND dbo.CheckUserParent(@UserID, U.UserID) = 1)
)
AND ((@StatusID = 0) OR (@StatusID > 0 AND U.StatusID = @StatusID))
AND ((@RoleID = 0) OR (@RoleID > 0 AND U.RoleID = @RoleID))
AND @HasUserRights = 1
SET @curValue = cursor local for
SELECT
U.ItemID,
U.TextSearch,
U.ColumnType,
''Users'' as FullType,
0 as PackageID
FROM @Users AS TU
INNER JOIN
(
SELECT ItemID, TextSearch, ColumnType
FROM(
SELECT U0.UserID as ItemID, U0.Username as TextSearch, @columnUsername as ColumnType
FROM dbo.Users AS U0
UNION
SELECT U1.UserID as ItemID, U1.Email as TextSearch, @columnEmail as ColumnType
FROM dbo.Users AS U1
UNION
SELECT U2.UserID as ItemID, U2.CompanyName as TextSearch, @columnCompanyName as ColumnType
FROM dbo.Users AS U2
UNION
SELECT U3.UserID as ItemID, U3.FirstName + '' '' + U3.LastName as TextSearch, @columnFullName as ColumnType
FROM dbo.Users AS U3) as U
WHERE TextSearch<>'' '' OR ISNULL(TextSearch, 0) > 0
)
AS U ON TU.UserID = U.ItemID'
SET @sqlUsers = @sqlUsers + ' open @curValue'
exec sp_executesql @sqlUsers, N'@UserID int, @FilterValue nvarchar(50), @ActorID int, @Recursive bit, @StatusID int, @RoleID int, @columnUsername nvarchar(20), @columnEmail nvarchar(20), @columnCompanyName nvarchar(20), @columnFullName nvarchar(20), @curValue cursor output',
@UserID, @FilterValue, @ActorID, @Recursive, @StatusID, @RoleID, @columnUsername, @columnEmail, @columnCompanyName, @columnFullName, @curValue=@curUsers output
SET @sqlSpace = '
DECLARE @ItemsService TABLE
(
ItemID int
)
INSERT INTO @ItemsService (ItemID)
SELECT
SI.ItemID
FROM ServiceItems AS SI
INNER JOIN Packages AS P ON P.PackageID = SI.PackageID
INNER JOIN UsersDetailed AS U ON P.UserID = U.UserID
WHERE
dbo.CheckUserParent(@UserID, P.UserID) = 1
DECLARE @ItemsDomain TABLE
(
ItemID int
)
INSERT INTO @ItemsDomain (ItemID)
SELECT
D.DomainID
FROM Domains AS D
INNER JOIN Packages AS P ON P.PackageID = D.PackageID
INNER JOIN UsersDetailed AS U ON P.UserID = U.UserID
WHERE
dbo.CheckUserParent(@UserID, P.UserID) = 1
SET @curValue = cursor local for
SELECT
SI.ItemID as ItemID,
SI.ItemName as TextSearch,
STYPE.DisplayName as ColumnType,
SI.ItemName as FullType,
SI.PackageID as PackageID
FROM @ItemsService AS I
INNER JOIN ServiceItems AS SI ON I.ItemID = SI.ItemID
INNER JOIN ServiceItemTypes AS STYPE ON SI.ItemTypeID = STYPE.ItemTypeID
WHERE STYPE.Searchable = 1
UNION
SELECT
D.DomainID AS ItemID,
D.DomainName as TextSearch,
''Domain'' as ColumnType,
''Domain'' as FullType,
D.PackageID as PackageID
FROM @ItemsDomain AS I
INNER JOIN Domains AS D ON I.ItemID = D.DomainID
WHERE D.IsDomainPointer=0'
SET @sqlSpace = @sqlSpace + ' open @curValue'
exec sp_executesql @sqlSpace, N'@UserID int, @FilterValue nvarchar(50), @ActorID int, @curValue cursor output',
@UserID, @FilterValue, @ActorID, @curValue=@curSpace output
SET @sqlReturn = '
DECLARE @ItemID int
DECLARE @TextSearch nvarchar(500)
DECLARE @ColumnType nvarchar(50)
DECLARE @FullType nvarchar(50)
DECLARE @PackageID int
DECLARE @EndRow int
SET @EndRow = @StartRow + @MaximumRows
DECLARE @ItemsAll TABLE
(
ItemPosition int IDENTITY(1,1),
ItemID int,
TextSearch nvarchar(500),
ColumnType nvarchar(50),
FullType nvarchar(50),
PackageID int
)
FETCH NEXT FROM @curSpaceValue INTO @ItemID, @TextSearch, @ColumnType, @FullType, @PackageID
WHILE @@FETCH_STATUS = 0
BEGIN
INSERT INTO @ItemsAll(ItemID, TextSearch, ColumnType, FullType, PackageID)
VALUES(@ItemID, @TextSearch, @ColumnType, @FullType, @PackageID)
FETCH NEXT FROM @curSpaceValue INTO @ItemID, @TextSearch, @ColumnType, @FullType, @PackageID
END
FETCH NEXT FROM @curUsersValue INTO @ItemID, @TextSearch, @ColumnType, @FullType, @PackageID
WHILE @@FETCH_STATUS = 0
BEGIN
INSERT INTO @ItemsAll(ItemID, TextSearch, ColumnType, FullType, PackageID)
VALUES(@ItemID, @TextSearch, @ColumnType, @FullType, @PackageID)
FETCH NEXT FROM @curUsersValue INTO @ItemID, @TextSearch, @ColumnType, @FullType, @PackageID
END
DECLARE @ItemsReturn TABLE
(
ItemPosition int IDENTITY(1,1),
ItemID int,
TextSearch nvarchar(500),
ColumnType nvarchar(50),
FullType nvarchar(50),
PackageID int
)
INSERT INTO @ItemsReturn(ItemID, TextSearch, ColumnType, FullType, PackageID)
SELECT ItemID, TextSearch, ColumnType, FullType, PackageID
FROM @ItemsAll AS IA'
IF @FilterValue <> ''
SET @sqlReturn = @sqlReturn + ' WHERE IA.' + @FilterColumn + ' LIKE @FilterValue '
IF @SortColumn <> '' AND @SortColumn IS NOT NULL
SET @sqlReturn = @sqlReturn + ' ORDER BY ' + @SortColumn + ' '
SET @sqlReturn = @sqlReturn + '
SELECT COUNT(ItemID) FROM @ItemsReturn;
SELECT DISTINCT(ColumnType) FROM @ItemsReturn WHERE (1 = 1) ';
IF @FullType <> ''
SET @sqlReturn = @sqlReturn + ' AND FullType = ''' + @FullType + '''';
SET @sqlReturn = @sqlReturn + '; ';
SET @sqlReturn = @sqlReturn + '
SELECT ItemPosition, ItemID, TextSearch, ColumnType, FullType, PackageID
FROM @ItemsReturn AS IR WHERE (1 = 1)
'
IF @MaximumRows > 0
SET @sqlReturn = @sqlReturn + ' AND IR.ItemPosition BETWEEN @StartRow AND @EndRow';
IF @ColType <> ''
SET @sqlReturn = @sqlReturn + ' AND ColumnType in ( ' + @ColType + ' ) ';
IF @FullType <> ''
SET @sqlReturn = @sqlReturn + ' AND FullType = ''' + @FullType + '''';
exec sp_executesql @sqlReturn, N'@StartRow int, @MaximumRows int, @FilterValue nvarchar(50), @curSpaceValue cursor, @curUsersValue cursor',
@StartRow, @MaximumRows, @FilterValue, @curSpace, @curUsers
CLOSE @curSpace
DEALLOCATE @curSpace
CLOSE @curUsers
DEALLOCATE @curUsers
RETURN

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform> <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>3.7</ProductVersion> <ProductVersion>3.9</ProductVersion>
<ProjectGuid>3f3f1c39-6719-4862-bb45-4c227f13b821</ProjectGuid> <ProjectGuid>3f3f1c39-6719-4862-bb45-4c227f13b821</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
<OutputName>WebsitePanel.LocalizationToolkit</OutputName> <OutputName>WebsitePanel.LocalizationToolkit</OutputName>
@ -63,4 +63,4 @@
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
--> -->
</Project> </Project>

View file

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:4.0.30319.34014 // Runtime Version:4.0.30319.34209
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.

View file

@ -1,7 +1,7 @@
'------------------------------------------------------------------------------ '------------------------------------------------------------------------------
' <auto-generated> ' <auto-generated>
' This code was generated by a tool. ' This code was generated by a tool.
' Runtime Version:4.0.30319.34014 ' Runtime Version:4.0.30319.34209
' '
' Changes to this file may cause incorrect behavior and will be lost if ' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated. ' the code is regenerated.

View file

@ -113,6 +113,15 @@
public const string INSERT_DVD_DISK_ERROR = "VPS_INSERT_DVD_DISK_ERROR"; public const string INSERT_DVD_DISK_ERROR = "VPS_INSERT_DVD_DISK_ERROR";
public const string EJECT_DVD_DISK_ERROR = "VPS_EJECT_DVD_DISK_ERROR"; public const string EJECT_DVD_DISK_ERROR = "VPS_EJECT_DVD_DISK_ERROR";
// Replication
public const string SET_REPLICA_SERVER_ERROR = "VPS_SET_REPLICA_SERVER_ERROR";
public const string UNSET_REPLICA_SERVER_ERROR = "VPS_UNSET_REPLICA_SERVER_ERROR";
public const string NO_REPLICA_SERVER_ERROR = "VPS_NO_REPLICA_SERVER_ERROR";
public const string SET_REPLICATION_ERROR = "VPS_SET_REPLICATION_ERROR";
public const string DISABLE_REPLICATION_ERROR = "VPS_DISABLE_REPLICATION_ERROR";
public const string PAUSE_REPLICATION_ERROR = "VPS_PAUSE_REPLICATION_ERROR";
public const string RESUME_REPLICATION_ERROR = "VPS_RESUME_REPLICATION_ERROR";
public const string HOST_NAMER_IS_ALREADY_USED = "HOST_NAMER_IS_ALREADY_USED"; public const string HOST_NAMER_IS_ALREADY_USED = "HOST_NAMER_IS_ALREADY_USED";
public const string CANNOT_CHECK_HOST_EXISTS = "CANNOT_CHECK_HOST_EXISTS"; public const string CANNOT_CHECK_HOST_EXISTS = "CANNOT_CHECK_HOST_EXISTS";

View file

@ -906,7 +906,29 @@ namespace WebsitePanel.EnterpriseServer {
object[] results = this.EndInvoke(asyncResult); object[] results = this.EndInvoke(asyncResult);
return ((System.Data.DataSet)(results[0])); return ((System.Data.DataSet)(results[0]));
} }
/// <remarks/>
/// //TODO START
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetSearchObject", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public System.Data.DataSet GetSearchObject(int userId, string filterColumn, string filterValue, int statusId, int roleId, string sortColumn, int startRow, int maximumRows, string colType, string fullType)
{
object[] results = this.Invoke("GetSearchObject", new object[] {
userId,
filterColumn,
filterValue,
statusId,
roleId,
sortColumn,
startRow,
maximumRows,
colType,
fullType
});
return ((System.Data.DataSet)(results[0]));
}
//TODO END
/// <remarks/> /// <remarks/>
public void SearchServiceItemsPagedAsync(int userId, int itemTypeId, string filterValue, string sortColumn, int startRow, int maximumRows) { public void SearchServiceItemsPagedAsync(int userId, int itemTypeId, string filterValue, string sortColumn, int startRow, int maximumRows) {
this.SearchServiceItemsPagedAsync(userId, itemTypeId, filterValue, sortColumn, startRow, maximumRows, null); this.SearchServiceItemsPagedAsync(userId, itemTypeId, filterValue, sortColumn, startRow, maximumRows, null);

View file

@ -11,6 +11,12 @@
// //
// This source code was auto-generated by wsdl, Version=2.0.50727.42. // This source code was auto-generated by wsdl, Version=2.0.50727.42.
// //
using WebsitePanel.Providers;
using WebsitePanel.Providers.Common;
using WebsitePanel.Providers.ResultObjects;
using WebsitePanel.Providers.Virtualization;
namespace WebsitePanel.EnterpriseServer { namespace WebsitePanel.EnterpriseServer {
using System.Xml.Serialization; using System.Xml.Serialization;
using System.Web.Services; using System.Web.Services;
@ -18,10 +24,7 @@ namespace WebsitePanel.EnterpriseServer {
using System.Web.Services.Protocols; using System.Web.Services.Protocols;
using System; using System;
using System.Diagnostics; using System.Diagnostics;
using WebsitePanel.Providers;
using WebsitePanel.Providers.Common;
using WebsitePanel.Providers.Virtualization;
using WebsitePanel.Providers.ResultObjects;
/// <remarks/> /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
@ -141,6 +144,26 @@ namespace WebsitePanel.EnterpriseServer {
private System.Threading.SendOrPostCallback SendVirtualMachineSummaryLetterOperationCompleted; private System.Threading.SendOrPostCallback SendVirtualMachineSummaryLetterOperationCompleted;
private System.Threading.SendOrPostCallback GetCertificatesOperationCompleted;
private System.Threading.SendOrPostCallback SetReplicaServerOperationCompleted;
private System.Threading.SendOrPostCallback UnsetReplicaServerOperationCompleted;
private System.Threading.SendOrPostCallback GetReplicaServerOperationCompleted;
private System.Threading.SendOrPostCallback GetReplicationOperationCompleted;
private System.Threading.SendOrPostCallback GetReplicationInfoOperationCompleted;
private System.Threading.SendOrPostCallback SetVmReplicationOperationCompleted;
private System.Threading.SendOrPostCallback DisableVmReplicationOperationCompleted;
private System.Threading.SendOrPostCallback PauseReplicationOperationCompleted;
private System.Threading.SendOrPostCallback ResumeReplicationOperationCompleted;
/// <remarks/> /// <remarks/>
public esVirtualizationServer2012() { public esVirtualizationServer2012() {
this.Url = "http://127.0.0.1:9012/esVirtualizationServer2012.asmx"; this.Url = "http://127.0.0.1:9012/esVirtualizationServer2012.asmx";
@ -311,6 +334,36 @@ namespace WebsitePanel.EnterpriseServer {
/// <remarks/> /// <remarks/>
public event SendVirtualMachineSummaryLetterCompletedEventHandler SendVirtualMachineSummaryLetterCompleted; public event SendVirtualMachineSummaryLetterCompletedEventHandler SendVirtualMachineSummaryLetterCompleted;
/// <remarks/>
public event GetCertificatesCompletedEventHandler GetCertificatesCompleted;
/// <remarks/>
public event SetReplicaServerCompletedEventHandler SetReplicaServerCompleted;
/// <remarks/>
public event UnsetReplicaServerCompletedEventHandler UnsetReplicaServerCompleted;
/// <remarks/>
public event GetReplicaServerCompletedEventHandler GetReplicaServerCompleted;
/// <remarks/>
public event GetReplicationCompletedEventHandler GetReplicationCompleted;
/// <remarks/>
public event GetReplicationInfoCompletedEventHandler GetReplicationInfoCompleted;
/// <remarks/>
public event SetVmReplicationCompletedEventHandler SetVmReplicationCompleted;
/// <remarks/>
public event DisableVmReplicationCompletedEventHandler DisableVmReplicationCompleted;
/// <remarks/>
public event PauseReplicationCompletedEventHandler PauseReplicationCompleted;
/// <remarks/>
public event ResumeReplicationCompletedEventHandler ResumeReplicationCompleted;
/// <remarks/> /// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetVirtualMachines", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetVirtualMachines", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public VirtualMachineMetaItemsPaged GetVirtualMachines(int packageId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, bool recursive) { public VirtualMachineMetaItemsPaged GetVirtualMachines(int packageId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, bool recursive) {
@ -3121,6 +3174,437 @@ namespace WebsitePanel.EnterpriseServer {
} }
} }
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetCertificates", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public CertificateInfo[] GetCertificates(int serviceId, string remoteServer) {
object[] results = this.Invoke("GetCertificates", new object[] {
serviceId,
remoteServer});
return ((CertificateInfo[])(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetCertificates(int serviceId, string remoteServer, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetCertificates", new object[] {
serviceId,
remoteServer}, callback, asyncState);
}
/// <remarks/>
public CertificateInfo[] EndGetCertificates(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((CertificateInfo[])(results[0]));
}
/// <remarks/>
public void GetCertificatesAsync(int serviceId, string remoteServer) {
this.GetCertificatesAsync(serviceId, remoteServer, null);
}
/// <remarks/>
public void GetCertificatesAsync(int serviceId, string remoteServer, object userState) {
if ((this.GetCertificatesOperationCompleted == null)) {
this.GetCertificatesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetCertificatesOperationCompleted);
}
this.InvokeAsync("GetCertificates", new object[] {
serviceId,
remoteServer}, this.GetCertificatesOperationCompleted, userState);
}
private void OnGetCertificatesOperationCompleted(object arg) {
if ((this.GetCertificatesCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetCertificatesCompleted(this, new GetCertificatesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetReplicaServer", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public ResultObject SetReplicaServer(int serviceId, string remoteServer, string thumbprint, string storagePath) {
object[] results = this.Invoke("SetReplicaServer", new object[] {
serviceId,
remoteServer,
thumbprint,
storagePath});
return ((ResultObject)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginSetReplicaServer(int serviceId, string remoteServer, string thumbprint, string storagePath, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("SetReplicaServer", new object[] {
serviceId,
remoteServer,
thumbprint,
storagePath}, callback, asyncState);
}
/// <remarks/>
public ResultObject EndSetReplicaServer(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((ResultObject)(results[0]));
}
/// <remarks/>
public void SetReplicaServerAsync(int serviceId, string remoteServer, string thumbprint, string storagePath) {
this.SetReplicaServerAsync(serviceId, remoteServer, thumbprint, storagePath, null);
}
/// <remarks/>
public void SetReplicaServerAsync(int serviceId, string remoteServer, string thumbprint, string storagePath, object userState) {
if ((this.SetReplicaServerOperationCompleted == null)) {
this.SetReplicaServerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetReplicaServerOperationCompleted);
}
this.InvokeAsync("SetReplicaServer", new object[] {
serviceId,
remoteServer,
thumbprint,
storagePath}, this.SetReplicaServerOperationCompleted, userState);
}
private void OnSetReplicaServerOperationCompleted(object arg) {
if ((this.SetReplicaServerCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.SetReplicaServerCompleted(this, new SetReplicaServerCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UnsetReplicaServer", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public ResultObject UnsetReplicaServer(int serviceId, string remoteServer) {
object[] results = this.Invoke("UnsetReplicaServer", new object[] {
serviceId,
remoteServer});
return ((ResultObject)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginUnsetReplicaServer(int serviceId, string remoteServer, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("UnsetReplicaServer", new object[] {
serviceId,
remoteServer}, callback, asyncState);
}
/// <remarks/>
public ResultObject EndUnsetReplicaServer(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((ResultObject)(results[0]));
}
/// <remarks/>
public void UnsetReplicaServerAsync(int serviceId, string remoteServer) {
this.UnsetReplicaServerAsync(serviceId, remoteServer, null);
}
/// <remarks/>
public void UnsetReplicaServerAsync(int serviceId, string remoteServer, object userState) {
if ((this.UnsetReplicaServerOperationCompleted == null)) {
this.UnsetReplicaServerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUnsetReplicaServerOperationCompleted);
}
this.InvokeAsync("UnsetReplicaServer", new object[] {
serviceId,
remoteServer}, this.UnsetReplicaServerOperationCompleted, userState);
}
private void OnUnsetReplicaServerOperationCompleted(object arg) {
if ((this.UnsetReplicaServerCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.UnsetReplicaServerCompleted(this, new UnsetReplicaServerCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetReplicaServer", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public ReplicationServerInfo GetReplicaServer(int serviceId, string remoteServer) {
object[] results = this.Invoke("GetReplicaServer", new object[] {
serviceId,
remoteServer});
return ((ReplicationServerInfo)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetReplicaServer(int serviceId, string remoteServer, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetReplicaServer", new object[] {
serviceId,
remoteServer}, callback, asyncState);
}
/// <remarks/>
public ReplicationServerInfo EndGetReplicaServer(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((ReplicationServerInfo)(results[0]));
}
/// <remarks/>
public void GetReplicaServerAsync(int serviceId, string remoteServer) {
this.GetReplicaServerAsync(serviceId, remoteServer, null);
}
/// <remarks/>
public void GetReplicaServerAsync(int serviceId, string remoteServer, object userState) {
if ((this.GetReplicaServerOperationCompleted == null)) {
this.GetReplicaServerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetReplicaServerOperationCompleted);
}
this.InvokeAsync("GetReplicaServer", new object[] {
serviceId,
remoteServer}, this.GetReplicaServerOperationCompleted, userState);
}
private void OnGetReplicaServerOperationCompleted(object arg) {
if ((this.GetReplicaServerCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetReplicaServerCompleted(this, new GetReplicaServerCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetReplication", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public VmReplication GetReplication(int itemId) {
object[] results = this.Invoke("GetReplication", new object[] {
itemId});
return ((VmReplication)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetReplication(int itemId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetReplication", new object[] {
itemId}, callback, asyncState);
}
/// <remarks/>
public VmReplication EndGetReplication(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((VmReplication)(results[0]));
}
/// <remarks/>
public void GetReplicationAsync(int itemId) {
this.GetReplicationAsync(itemId, null);
}
/// <remarks/>
public void GetReplicationAsync(int itemId, object userState) {
if ((this.GetReplicationOperationCompleted == null)) {
this.GetReplicationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetReplicationOperationCompleted);
}
this.InvokeAsync("GetReplication", new object[] {
itemId}, this.GetReplicationOperationCompleted, userState);
}
private void OnGetReplicationOperationCompleted(object arg) {
if ((this.GetReplicationCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetReplicationCompleted(this, new GetReplicationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetReplicationInfo", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public ReplicationDetailInfo GetReplicationInfo(int itemId) {
object[] results = this.Invoke("GetReplicationInfo", new object[] {
itemId});
return ((ReplicationDetailInfo)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetReplicationInfo(int itemId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetReplicationInfo", new object[] {
itemId}, callback, asyncState);
}
/// <remarks/>
public ReplicationDetailInfo EndGetReplicationInfo(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((ReplicationDetailInfo)(results[0]));
}
/// <remarks/>
public void GetReplicationInfoAsync(int itemId) {
this.GetReplicationInfoAsync(itemId, null);
}
/// <remarks/>
public void GetReplicationInfoAsync(int itemId, object userState) {
if ((this.GetReplicationInfoOperationCompleted == null)) {
this.GetReplicationInfoOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetReplicationInfoOperationCompleted);
}
this.InvokeAsync("GetReplicationInfo", new object[] {
itemId}, this.GetReplicationInfoOperationCompleted, userState);
}
private void OnGetReplicationInfoOperationCompleted(object arg) {
if ((this.GetReplicationInfoCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetReplicationInfoCompleted(this, new GetReplicationInfoCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetVmReplication", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public ResultObject SetVmReplication(int itemId, VmReplication replication) {
object[] results = this.Invoke("SetVmReplication", new object[] {
itemId,
replication});
return ((ResultObject)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginSetVmReplication(int itemId, VmReplication replication, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("SetVmReplication", new object[] {
itemId,
replication}, callback, asyncState);
}
/// <remarks/>
public ResultObject EndSetVmReplication(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((ResultObject)(results[0]));
}
/// <remarks/>
public void SetVmReplicationAsync(int itemId, VmReplication replication) {
this.SetVmReplicationAsync(itemId, replication, null);
}
/// <remarks/>
public void SetVmReplicationAsync(int itemId, VmReplication replication, object userState) {
if ((this.SetVmReplicationOperationCompleted == null)) {
this.SetVmReplicationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetVmReplicationOperationCompleted);
}
this.InvokeAsync("SetVmReplication", new object[] {
itemId,
replication}, this.SetVmReplicationOperationCompleted, userState);
}
private void OnSetVmReplicationOperationCompleted(object arg) {
if ((this.SetVmReplicationCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.SetVmReplicationCompleted(this, new SetVmReplicationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DisableVmReplication", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public ResultObject DisableVmReplication(int itemId) {
object[] results = this.Invoke("DisableVmReplication", new object[] {
itemId});
return ((ResultObject)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginDisableVmReplication(int itemId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("DisableVmReplication", new object[] {
itemId}, callback, asyncState);
}
/// <remarks/>
public ResultObject EndDisableVmReplication(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((ResultObject)(results[0]));
}
/// <remarks/>
public void DisableVmReplicationAsync(int itemId) {
this.DisableVmReplicationAsync(itemId, null);
}
/// <remarks/>
public void DisableVmReplicationAsync(int itemId, object userState) {
if ((this.DisableVmReplicationOperationCompleted == null)) {
this.DisableVmReplicationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDisableVmReplicationOperationCompleted);
}
this.InvokeAsync("DisableVmReplication", new object[] {
itemId}, this.DisableVmReplicationOperationCompleted, userState);
}
private void OnDisableVmReplicationOperationCompleted(object arg) {
if ((this.DisableVmReplicationCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.DisableVmReplicationCompleted(this, new DisableVmReplicationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/PauseReplication", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public ResultObject PauseReplication(int itemId) {
object[] results = this.Invoke("PauseReplication", new object[] {
itemId});
return ((ResultObject)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginPauseReplication(int itemId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("PauseReplication", new object[] {
itemId}, callback, asyncState);
}
/// <remarks/>
public ResultObject EndPauseReplication(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((ResultObject)(results[0]));
}
/// <remarks/>
public void PauseReplicationAsync(int itemId) {
this.PauseReplicationAsync(itemId, null);
}
/// <remarks/>
public void PauseReplicationAsync(int itemId, object userState) {
if ((this.PauseReplicationOperationCompleted == null)) {
this.PauseReplicationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnPauseReplicationOperationCompleted);
}
this.InvokeAsync("PauseReplication", new object[] {
itemId}, this.PauseReplicationOperationCompleted, userState);
}
private void OnPauseReplicationOperationCompleted(object arg) {
if ((this.PauseReplicationCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.PauseReplicationCompleted(this, new PauseReplicationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/ResumeReplication", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public ResultObject ResumeReplication(int itemId) {
object[] results = this.Invoke("ResumeReplication", new object[] {
itemId});
return ((ResultObject)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginResumeReplication(int itemId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("ResumeReplication", new object[] {
itemId}, callback, asyncState);
}
/// <remarks/>
public ResultObject EndResumeReplication(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((ResultObject)(results[0]));
}
/// <remarks/>
public void ResumeReplicationAsync(int itemId) {
this.ResumeReplicationAsync(itemId, null);
}
/// <remarks/>
public void ResumeReplicationAsync(int itemId, object userState) {
if ((this.ResumeReplicationOperationCompleted == null)) {
this.ResumeReplicationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnResumeReplicationOperationCompleted);
}
this.InvokeAsync("ResumeReplication", new object[] {
itemId}, this.ResumeReplicationOperationCompleted, userState);
}
private void OnResumeReplicationOperationCompleted(object arg) {
if ((this.ResumeReplicationCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.ResumeReplicationCompleted(this, new ResumeReplicationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/> /// <remarks/>
public new void CancelAsync(object userState) { public new void CancelAsync(object userState) {
base.CancelAsync(userState); base.CancelAsync(userState);
@ -4556,4 +5040,264 @@ namespace WebsitePanel.EnterpriseServer {
} }
} }
} }
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetCertificatesCompletedEventHandler(object sender, GetCertificatesCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetCertificatesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetCertificatesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public CertificateInfo[] Result {
get {
this.RaiseExceptionIfNecessary();
return ((CertificateInfo[])(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void SetReplicaServerCompletedEventHandler(object sender, SetReplicaServerCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class SetReplicaServerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal SetReplicaServerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public ResultObject Result {
get {
this.RaiseExceptionIfNecessary();
return ((ResultObject)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void UnsetReplicaServerCompletedEventHandler(object sender, UnsetReplicaServerCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class UnsetReplicaServerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal UnsetReplicaServerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public ResultObject Result {
get {
this.RaiseExceptionIfNecessary();
return ((ResultObject)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetReplicaServerCompletedEventHandler(object sender, GetReplicaServerCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetReplicaServerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetReplicaServerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public ReplicationServerInfo Result {
get {
this.RaiseExceptionIfNecessary();
return ((ReplicationServerInfo)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetReplicationCompletedEventHandler(object sender, GetReplicationCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetReplicationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetReplicationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public VmReplication Result {
get {
this.RaiseExceptionIfNecessary();
return ((VmReplication)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void GetReplicationInfoCompletedEventHandler(object sender, GetReplicationInfoCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetReplicationInfoCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetReplicationInfoCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public ReplicationDetailInfo Result {
get {
this.RaiseExceptionIfNecessary();
return ((ReplicationDetailInfo)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void SetVmReplicationCompletedEventHandler(object sender, SetVmReplicationCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class SetVmReplicationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal SetVmReplicationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public ResultObject Result {
get {
this.RaiseExceptionIfNecessary();
return ((ResultObject)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void DisableVmReplicationCompletedEventHandler(object sender, DisableVmReplicationCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class DisableVmReplicationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal DisableVmReplicationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public ResultObject Result {
get {
this.RaiseExceptionIfNecessary();
return ((ResultObject)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void PauseReplicationCompletedEventHandler(object sender, PauseReplicationCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class PauseReplicationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal PauseReplicationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public ResultObject Result {
get {
this.RaiseExceptionIfNecessary();
return ((ResultObject)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
public delegate void ResumeReplicationCompletedEventHandler(object sender, ResumeReplicationCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class ResumeReplicationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal ResumeReplicationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public ResultObject Result {
get {
this.RaiseExceptionIfNecessary();
return ((ResultObject)(this.results[0]));
}
}
}
} }

View file

@ -139,6 +139,28 @@ namespace WebsitePanel.EnterpriseServer
new SqlParameter("@recursive", recursive)); new SqlParameter("@recursive", recursive));
} }
//TODO START
public static DataSet GetSearchObject(int actorId, int userId, string filterColumn, string filterValue,
int statusId, int roleId, string sortColumn, int startRow, int maximumRows, string colType, string fullType, bool recursive)
{
return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure,
ObjectQualifier + "GetSearchObject",
new SqlParameter("@actorId", actorId),
new SqlParameter("@UserID", userId),
new SqlParameter("@FilterColumn", VerifyColumnName(filterColumn)),
new SqlParameter("@FilterValue", VerifyColumnValue(filterValue)),
new SqlParameter("@statusId", statusId),
new SqlParameter("@roleId", roleId),
new SqlParameter("@SortColumn", VerifyColumnName(sortColumn)),
new SqlParameter("@startRow", startRow),
new SqlParameter("@maximumRows", maximumRows),
new SqlParameter("@recursive", recursive),
new SqlParameter("@ColType", colType),
new SqlParameter("@FullType", fullType));
}
//TODO END
public static DataSet GetUsersSummary(int actorId, int userId) public static DataSet GetUsersSummary(int actorId, int userId)
{ {
return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure, return SqlHelper.ExecuteDataset(ConnectionString, CommandType.StoredProcedure,

View file

@ -1650,12 +1650,12 @@ namespace WebsitePanel.EnterpriseServer
return result; return result;
} }
public static ResultObject DeleteMappedDrive(int itemId, string driveLetter) public static ResultObject DeleteMappedDrive(int itemId, string folderName)
{ {
return DeleteMappedDriveInternal(itemId, driveLetter); return DeleteMappedDriveInternal(itemId, folderName);
} }
protected static ResultObject DeleteMappedDriveInternal(int itemId, string driveLetter) protected static ResultObject DeleteMappedDriveInternal(int itemId, string folderName)
{ {
ResultObject result = TaskManager.StartResultTask<ResultObject>("ENTERPRISE_STORAGE", "DELETE_MAPPED_DRIVE", itemId); ResultObject result = TaskManager.StartResultTask<ResultObject>("ENTERPRISE_STORAGE", "DELETE_MAPPED_DRIVE", itemId);
@ -1670,9 +1670,13 @@ namespace WebsitePanel.EnterpriseServer
return result; return result;
} }
var webDavSetting = ObjectUtils.FillObjectFromDataReader<WebDavSetting>(DataProvider.GetEnterpriseFolder(itemId, folderName));
string path = string.Format(@"\\{0}@SSL\{1}\{2}", webDavSetting.Domain.Split('.')[0], org.OrganizationId, folderName);
Organizations orgProxy = OrganizationController.GetOrganizationProxy(org.ServiceId); Organizations orgProxy = OrganizationController.GetOrganizationProxy(org.ServiceId);
orgProxy.DeleteMappedDrive(org.OrganizationId, driveLetter); orgProxy.DeleteMappedDriveByPath(org.OrganizationId, path);
} }
catch (Exception ex) catch (Exception ex)
{ {

View file

@ -317,6 +317,15 @@ namespace WebsitePanel.EnterpriseServer
sortColumn, startRow, maximumRows); sortColumn, startRow, maximumRows);
} }
//TODO START
public static DataSet GetSearchObject(int userId, string filterColumn, string filterValue,
int statusId, int roleId, string sortColumn, int startRow, int maximumRows, string colType, string fullType)
{
return DataProvider.GetSearchObject(SecurityContext.User.UserId, userId,
filterColumn, filterValue, statusId, roleId, sortColumn, startRow, maximumRows, colType, fullType, false);
}
//TODO END
public static DataSet GetPackageQuotas(int packageId) public static DataSet GetPackageQuotas(int packageId)
{ {
return DataProvider.GetPackageQuotas(SecurityContext.User.UserId, packageId); return DataProvider.GetPackageQuotas(SecurityContext.User.UserId, packageId);

View file

@ -42,6 +42,7 @@ using System.Net.Mail;
using System.Diagnostics; using System.Diagnostics;
using System.Linq; using System.Linq;
using System.Net; using System.Net;
using WebsitePanel.Providers.Virtualization2012;
namespace WebsitePanel.EnterpriseServer namespace WebsitePanel.EnterpriseServer
{ {
@ -84,7 +85,7 @@ namespace WebsitePanel.EnterpriseServer
public static VirtualMachine[] GetVirtualMachinesByServiceId(int serviceId) public static VirtualMachine[] GetVirtualMachinesByServiceId(int serviceId)
{ {
// get proxy // get proxy
VirtualizationServer vps = GetVirtualizationProxy(serviceId); VirtualizationServer2012 vps = GetVirtualizationProxy(serviceId);
// load details // load details
return vps.GetVirtualMachines(); return vps.GetVirtualMachines();
@ -166,7 +167,7 @@ namespace WebsitePanel.EnterpriseServer
string path = settings["OsTemplatesPath"]; string path = settings["OsTemplatesPath"];
// get proxy // get proxy
VirtualizationServer vs = GetVirtualizationProxy(serviceId); VirtualizationServer2012 vs = GetVirtualizationProxy(serviceId);
return vs.GetLibraryItems(path); return vs.GetLibraryItems(path);
} }
@ -176,7 +177,7 @@ namespace WebsitePanel.EnterpriseServer
public static int GetMaximumCpuCoresNumber(int packageId) public static int GetMaximumCpuCoresNumber(int packageId)
{ {
// get proxy // get proxy
VirtualizationServer vs = GetVirtualizationProxyByPackageId(packageId); VirtualizationServer2012 vs = GetVirtualizationProxyByPackageId(packageId);
return vs.GetProcessorCoresNumber(); return vs.GetProcessorCoresNumber();
} }
@ -556,7 +557,7 @@ namespace WebsitePanel.EnterpriseServer
try try
{ {
// asynchronous process starts here // asynchronous process starts here
CreateServerAsyncWorker worker = new CreateServerAsyncWorker(); CreateServerAsyncWorker2012 worker = new CreateServerAsyncWorker2012();
worker.TaskId = vm.CurrentTaskId; // async task ID worker.TaskId = vm.CurrentTaskId; // async task ID
worker.ThreadUserId = SecurityContext.User.UserId; worker.ThreadUserId = SecurityContext.User.UserId;
@ -619,7 +620,7 @@ namespace WebsitePanel.EnterpriseServer
vm.ProvisioningStatus = VirtualMachineProvisioningStatus.Error; vm.ProvisioningStatus = VirtualMachineProvisioningStatus.Error;
// load proxy // load proxy
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId); VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
// load service settings // load service settings
StringDictionary settings = ServerController.GetServiceSettings(vm.ServiceId); StringDictionary settings = ServerController.GetServiceSettings(vm.ServiceId);
@ -1199,7 +1200,7 @@ namespace WebsitePanel.EnterpriseServer
StringDictionary settings = ServerController.GetServiceSettings(serviceId); StringDictionary settings = ServerController.GetServiceSettings(serviceId);
// load virtual machine info from service // load virtual machine info from service
VirtualizationServer vs = GetVirtualizationProxy(serviceId); VirtualizationServer2012 vs = GetVirtualizationProxy(serviceId);
VirtualMachine vm = vs.GetVirtualMachineEx(vmId); VirtualMachine vm = vs.GetVirtualMachineEx(vmId);
// set VM properties // set VM properties
@ -1461,7 +1462,7 @@ namespace WebsitePanel.EnterpriseServer
JobResult result = null; JobResult result = null;
// load proxy // load proxy
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId); VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
try try
{ {
@ -1540,7 +1541,7 @@ namespace WebsitePanel.EnterpriseServer
{ {
// create switch // create switch
// load proxy // load proxy
VirtualizationServer vs = GetVirtualizationProxy(item.ServiceId); VirtualizationServer2012 vs = GetVirtualizationProxy(item.ServiceId);
// create switch // create switch
VirtualSwitch sw = vs.CreateSwitch(name); VirtualSwitch sw = vs.CreateSwitch(name);
@ -1591,7 +1592,7 @@ namespace WebsitePanel.EnterpriseServer
return null; return null;
// get proxy // get proxy
VirtualizationServer vps = GetVirtualizationProxy(vm.ServiceId); VirtualizationServer2012 vps = GetVirtualizationProxy(vm.ServiceId);
// load jobs // load jobs
ConcreteJob[] jobs = vps.GetVirtualMachineJobs(vm.VirtualMachineId); ConcreteJob[] jobs = vps.GetVirtualMachineJobs(vm.VirtualMachineId);
@ -1617,7 +1618,7 @@ namespace WebsitePanel.EnterpriseServer
return null; return null;
// get proxy // get proxy
VirtualizationServer vps = GetVirtualizationProxy(vm.ServiceId); VirtualizationServer2012 vps = GetVirtualizationProxy(vm.ServiceId);
// return thumbnail // return thumbnail
return vps.GetVirtualMachineThumbnailImage(vm.VirtualMachineId, size); return vps.GetVirtualMachineThumbnailImage(vm.VirtualMachineId, size);
@ -1632,7 +1633,7 @@ namespace WebsitePanel.EnterpriseServer
return null; return null;
// get proxy // get proxy
VirtualizationServer vps = GetVirtualizationProxy(machine.ServiceId); VirtualizationServer2012 vps = GetVirtualizationProxy(machine.ServiceId);
// load details // load details
VirtualMachine vm = vps.GetVirtualMachine(machine.VirtualMachineId); VirtualMachine vm = vps.GetVirtualMachine(machine.VirtualMachineId);
@ -1649,7 +1650,7 @@ namespace WebsitePanel.EnterpriseServer
public static VirtualMachine GetVirtualMachineExtendedInfo(int serviceId, string vmId) public static VirtualMachine GetVirtualMachineExtendedInfo(int serviceId, string vmId)
{ {
// get proxy // get proxy
VirtualizationServer vps = GetVirtualizationProxy(serviceId); VirtualizationServer2012 vps = GetVirtualizationProxy(serviceId);
// load details // load details
return vps.GetVirtualMachineEx(vmId); return vps.GetVirtualMachineEx(vmId);
@ -1692,7 +1693,7 @@ namespace WebsitePanel.EnterpriseServer
try try
{ {
// get proxy // get proxy
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId); VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
// update virtual machine name // update virtual machine name
JobResult result = vs.RenameVirtualMachine(vm.VirtualMachineId, hostname); JobResult result = vs.RenameVirtualMachine(vm.VirtualMachineId, hostname);
@ -1812,7 +1813,7 @@ namespace WebsitePanel.EnterpriseServer
TaskManager.WriteParameter("New state", state); TaskManager.WriteParameter("New state", state);
// load proxy // load proxy
VirtualizationServer vps = GetVirtualizationProxy(machine.ServiceId); VirtualizationServer2012 vps = GetVirtualizationProxy(machine.ServiceId);
try try
{ {
@ -1935,7 +1936,7 @@ namespace WebsitePanel.EnterpriseServer
try try
{ {
// get proxy // get proxy
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId); VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
// change administrator password // change administrator password
JobResult result = SendAdministratorPasswordKVP(itemId, password); JobResult result = SendAdministratorPasswordKVP(itemId, password);
@ -2044,7 +2045,7 @@ namespace WebsitePanel.EnterpriseServer
JobResult result = null; JobResult result = null;
// get proxy // get proxy
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId); VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
// stop VPS if required // stop VPS if required
VirtualMachine vps = vs.GetVirtualMachine(vm.VirtualMachineId); VirtualMachine vps = vs.GetVirtualMachine(vm.VirtualMachineId);
@ -2183,7 +2184,7 @@ namespace WebsitePanel.EnterpriseServer
VirtualMachine vm = GetVirtualMachineByItemId(itemId); VirtualMachine vm = GetVirtualMachineByItemId(itemId);
// get proxy // get proxy
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId); VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
string isoPath = vs.GetInsertedDVD(vm.VirtualMachineId); string isoPath = vs.GetInsertedDVD(vm.VirtualMachineId);
if (String.IsNullOrEmpty(isoPath)) if (String.IsNullOrEmpty(isoPath))
@ -2212,7 +2213,7 @@ namespace WebsitePanel.EnterpriseServer
string path = settings["DvdLibraryPath"]; string path = settings["DvdLibraryPath"];
// get proxy // get proxy
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId); VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
return vs.GetLibraryItems(path); return vs.GetLibraryItems(path);
} }
@ -2252,7 +2253,7 @@ namespace WebsitePanel.EnterpriseServer
string fullPath = Path.Combine(libPath, isoPath); string fullPath = Path.Combine(libPath, isoPath);
// get proxy // get proxy
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId); VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
// insert DVD // insert DVD
JobResult result = vs.InsertDVD(vm.VirtualMachineId, fullPath); JobResult result = vs.InsertDVD(vm.VirtualMachineId, fullPath);
@ -2301,7 +2302,7 @@ namespace WebsitePanel.EnterpriseServer
try try
{ {
// get proxy // get proxy
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId); VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
// insert DVD // insert DVD
JobResult result = vs.EjectDVD(vm.VirtualMachineId); JobResult result = vs.EjectDVD(vm.VirtualMachineId);
@ -2332,7 +2333,7 @@ namespace WebsitePanel.EnterpriseServer
return null; return null;
// get proxy // get proxy
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId); VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
return vs.GetVirtualMachineSnapshots(vm.VirtualMachineId); return vs.GetVirtualMachineSnapshots(vm.VirtualMachineId);
} }
@ -2344,7 +2345,7 @@ namespace WebsitePanel.EnterpriseServer
return null; return null;
// get proxy // get proxy
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId); VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
return vs.GetSnapshot(snaphostId); return vs.GetSnapshot(snaphostId);
} }
@ -2376,7 +2377,7 @@ namespace WebsitePanel.EnterpriseServer
try try
{ {
// get proxy // get proxy
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId); VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
#region Check Quotas #region Check Quotas
// check quotas // check quotas
@ -2448,7 +2449,7 @@ namespace WebsitePanel.EnterpriseServer
JobResult result = null; JobResult result = null;
// get proxy // get proxy
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId); VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
// check VM state // check VM state
VirtualMachine vps = vs.GetVirtualMachine(vm.VirtualMachineId); VirtualMachine vps = vs.GetVirtualMachine(vm.VirtualMachineId);
@ -2512,7 +2513,7 @@ namespace WebsitePanel.EnterpriseServer
try try
{ {
// get proxy // get proxy
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId); VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
// take snapshot // take snapshot
JobResult result = vs.RenameSnapshot(vm.VirtualMachineId, snapshotId, newName); JobResult result = vs.RenameSnapshot(vm.VirtualMachineId, snapshotId, newName);
@ -2561,7 +2562,7 @@ namespace WebsitePanel.EnterpriseServer
try try
{ {
// get proxy // get proxy
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId); VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
// take snapshot // take snapshot
JobResult result = vs.DeleteSnapshot(snapshotId); JobResult result = vs.DeleteSnapshot(snapshotId);
@ -2617,7 +2618,7 @@ namespace WebsitePanel.EnterpriseServer
try try
{ {
// get proxy // get proxy
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId); VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
// take snapshot // take snapshot
JobResult result = vs.DeleteSnapshotSubtree(snapshotId); JobResult result = vs.DeleteSnapshotSubtree(snapshotId);
@ -2653,7 +2654,7 @@ namespace WebsitePanel.EnterpriseServer
return null; return null;
// get proxy // get proxy
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId); VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
return vs.GetSnapshotThumbnailImage(snapshotId, size); return vs.GetSnapshotThumbnailImage(snapshotId, size);
} }
@ -3328,7 +3329,7 @@ namespace WebsitePanel.EnterpriseServer
#region Virtual Switches #region Virtual Switches
public static VirtualSwitch[] GetExternalSwitches(int serviceId, string computerName) public static VirtualSwitch[] GetExternalSwitches(int serviceId, string computerName)
{ {
VirtualizationServer vs = new VirtualizationServer(); VirtualizationServer2012 vs = new VirtualizationServer2012();
ServiceProviderProxy.Init(vs, serviceId); ServiceProviderProxy.Init(vs, serviceId);
return vs.GetExternalSwitches(computerName); return vs.GetExternalSwitches(computerName);
} }
@ -3363,7 +3364,7 @@ namespace WebsitePanel.EnterpriseServer
try try
{ {
// get proxy // get proxy
VirtualizationServer vs = GetVirtualizationProxy(vm.ServiceId); VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
// check VM state // check VM state
VirtualMachine vps = vs.GetVirtualMachine(vm.VirtualMachineId); VirtualMachine vps = vs.GetVirtualMachine(vm.VirtualMachineId);
@ -3628,7 +3629,7 @@ namespace WebsitePanel.EnterpriseServer
return serviceId; return serviceId;
} }
private static VirtualizationServer GetVirtualizationProxyByPackageId(int packageId) private static VirtualizationServer2012 GetVirtualizationProxyByPackageId(int packageId)
{ {
// get service // get service
int serviceId = GetServiceId(packageId); int serviceId = GetServiceId(packageId);
@ -3636,9 +3637,9 @@ namespace WebsitePanel.EnterpriseServer
return GetVirtualizationProxy(serviceId); return GetVirtualizationProxy(serviceId);
} }
private static VirtualizationServer GetVirtualizationProxy(int serviceId) private static VirtualizationServer2012 GetVirtualizationProxy(int serviceId)
{ {
VirtualizationServer ws = new VirtualizationServer(); VirtualizationServer2012 ws = new VirtualizationServer2012();
ServiceProviderProxy.Init(ws, serviceId); ServiceProviderProxy.Init(ws, serviceId);
return ws; return ws;
} }
@ -3686,7 +3687,7 @@ namespace WebsitePanel.EnterpriseServer
res.ErrorCodes.Add(VirtualizationErrorCodes.JOB_FAILED_ERROR + ":" + job.ErrorDescription); res.ErrorCodes.Add(VirtualizationErrorCodes.JOB_FAILED_ERROR + ":" + job.ErrorDescription);
} }
private static bool JobCompleted(VirtualizationServer vs, ConcreteJob job) private static bool JobCompleted(VirtualizationServer2012 vs, ConcreteJob job)
{ {
TaskManager.IndicatorMaximum = 100; TaskManager.IndicatorMaximum = 100;
bool jobCompleted = true; bool jobCompleted = true;
@ -3715,5 +3716,239 @@ namespace WebsitePanel.EnterpriseServer
} }
#endregion #endregion
#region Replication
#region IsReplicaServer Part
public static CertificateInfo[] GetCertificates(int serviceId, string remoteServer)
{
VirtualizationServer2012 vs = GetVirtualizationProxy(serviceId);
return vs.GetCertificates(remoteServer);
}
public static ResultObject SetReplicaServer(int serviceId, string remoteServer, string thumbprint, string storagePath)
{
ResultObject result = new ResultObject();
try
{
if (string.IsNullOrEmpty(storagePath))
throw new Exception("Please enter replication path");
VirtualizationServer2012 vs = GetVirtualizationProxy(serviceId);
vs.SetReplicaServer(remoteServer, thumbprint, storagePath);
result.IsSuccess = true;
}
catch (Exception ex)
{
result.AddError(VirtualizationErrorCodes.SET_REPLICA_SERVER_ERROR, ex);
}
return result;
}
public static ResultObject UnsetReplicaServer(int serviceId, string remoteServer)
{
ResultObject result = new ResultObject();
try
{
VirtualizationServer2012 vs = GetVirtualizationProxy(serviceId);
vs.UnsetReplicaServer(remoteServer);
result.IsSuccess = true;
}
catch (Exception ex)
{
result.AddError(VirtualizationErrorCodes.UNSET_REPLICA_SERVER_ERROR, ex);
}
return result;
}
public static ReplicationServerInfo GetReplicaServer(int serviceId, string remoteServer)
{
VirtualizationServer2012 vs = GetVirtualizationProxy(serviceId);
return vs.GetReplicaServer(remoteServer);
}
#endregion
public static VmReplication GetReplication(int itemId)
{
VirtualMachine vm = GetVirtualMachineByItemId(itemId);
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
return vs.GetReplication(vm.VirtualMachineId);
}
public static ReplicationDetailInfo GetReplicationInfo(int itemId)
{
VirtualMachine vm = GetVirtualMachineByItemId(itemId);
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
return vs.GetReplicationInfo(vm.VirtualMachineId);
}
public static ResultObject SetVmReplication(int itemId, VmReplication replication)
{
TaskManager.StartTask("VPS2012", "SetVmReplication");
ResultObject result = new ResultObject();
try
{
VirtualMachine vm = GetVirtualMachineByItemId(itemId);
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
// Get replica server
var replicaServerInfo = GetReplicaInfoForService(vm.ServiceId, ref result);
if (result.ErrorCodes.Count > 0)
return result;
// We should use enable replication or set replication?
var vmReplica = vs.GetReplication(vm.VirtualMachineId);
if (vmReplica == null) // need enable
{
vs.EnableVmReplication(vm.VirtualMachineId, replicaServerInfo.ComputerName, replication);
vs.StartInitialReplication(vm.VirtualMachineId);
}
else // need set
{
vs.SetVmReplication(vm.VirtualMachineId, replicaServerInfo.ComputerName, replication);
}
result.IsSuccess = true;
}
catch (Exception ex)
{
throw TaskManager.WriteError(ex);
}
finally
{
TaskManager.CompleteTask();
}
TaskManager.WriteWarning("Organization with itemId '{0}' not found", itemId.ToString());
return result;
}
public static ResultObject DisableVmReplication(int itemId)
{
ResultObject result = new ResultObject();
try
{
VirtualMachine vm = GetVirtualMachineByItemId(itemId);
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
vs.DisableVmReplication(vm.VirtualMachineId);
CleanUpReplicaServer(vm);
result.IsSuccess = true;
}
catch (Exception ex)
{
result.AddError(VirtualizationErrorCodes.DISABLE_REPLICATION_ERROR, ex);
}
return result;
}
public static ResultObject PauseReplication(int itemId)
{
ResultObject result = new ResultObject();
try
{
VirtualMachine vm = GetVirtualMachineByItemId(itemId);
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
vs.PauseReplication(vm.VirtualMachineId);
result.IsSuccess = true;
}
catch (Exception ex)
{
result.AddError(VirtualizationErrorCodes.PAUSE_REPLICATION_ERROR, ex);
}
return result;
}
public static ResultObject ResumeReplication(int itemId)
{
ResultObject result = new ResultObject();
try
{
VirtualMachine vm = GetVirtualMachineByItemId(itemId);
VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
vs.ResumeReplication(vm.VirtualMachineId);
result.IsSuccess = true;
}
catch (Exception ex)
{
result.AddError(VirtualizationErrorCodes.RESUME_REPLICATION_ERROR, ex);
}
return result;
}
#region Private methods
private static void CleanUpReplicaServer(VirtualMachine originalVm)
{
try
{
ResultObject result = new ResultObject();
// Get replica server
var replicaServer = GetReplicaForService(originalVm.ServiceId, ref result);
// Clean up replica server
var replicaVm = replicaServer.GetVirtualMachines().FirstOrDefault(m => m.Name == originalVm.Name);
if (replicaVm != null)
{
replicaServer.DisableVmReplication(replicaVm.VirtualMachineId);
replicaServer.ShutDownVirtualMachine(replicaVm.VirtualMachineId, true, "ReplicaDelete");
replicaServer.DeleteVirtualMachine(replicaVm.VirtualMachineId);
}
}
catch { /* skip */ }
}
private static ReplicationServerInfo GetReplicaInfoForService(int serviceId, ref ResultObject result)
{
// Get service id of replica server
StringDictionary vsSesstings = ServerController.GetServiceSettings(serviceId);
string replicaServiceId = vsSesstings["ReplicaServerId"];
if (string.IsNullOrEmpty(replicaServiceId))
{
result.ErrorCodes.Add(VirtualizationErrorCodes.NO_REPLICA_SERVER_ERROR);
return null;
}
// get replica server info for replica service id
VirtualizationServer2012 vsReplica = GetVirtualizationProxy(Convert.ToInt32(replicaServiceId));
StringDictionary vsReplicaSesstings = ServerController.GetServiceSettings(Convert.ToInt32(replicaServiceId));
string computerName = vsReplicaSesstings["ServerName"];
var replicaServerInfo = vsReplica.GetReplicaServer(computerName);
if (!replicaServerInfo.Enabled)
{
result.ErrorCodes.Add(VirtualizationErrorCodes.NO_REPLICA_SERVER_ERROR);
return null;
}
return replicaServerInfo;
}
private static VirtualizationServer2012 GetReplicaForService(int serviceId, ref ResultObject result)
{
// Get service id of replica server
StringDictionary vsSesstings = ServerController.GetServiceSettings(serviceId);
string replicaServiceId = vsSesstings["ReplicaServerId"];
if (string.IsNullOrEmpty(replicaServiceId))
{
result.ErrorCodes.Add(VirtualizationErrorCodes.NO_REPLICA_SERVER_ERROR);
return null;
}
// get replica server for replica service id
return GetVirtualizationProxy(Convert.ToInt32(replicaServiceId));
}
#endregion
#endregion
} }
} }

View file

@ -134,6 +134,16 @@ namespace WebsitePanel.EnterpriseServer
sortColumn, startRow, maximumRows); sortColumn, startRow, maximumRows);
} }
//TODO START
[WebMethod]
public DataSet GetSearchObject(int userId, string filterColumn, string filterValue,
int statusId, int roleId, string sortColumn, int startRow, int maximumRows, string colType, string fullType)
{
return PackageController.GetSearchObject(userId, filterColumn, filterValue, statusId, roleId, sortColumn, startRow, maximumRows, colType, fullType);
}
//TODO END
[WebMethod] [WebMethod]
public DataSet GetPackagesPaged(int userId, string filterColumn, string filterValue, public DataSet GetPackagesPaged(int userId, string filterColumn, string filterValue,
string sortColumn, int startRow, int maximumRows) string sortColumn, int startRow, int maximumRows)

View file

@ -472,5 +472,70 @@ namespace WebsitePanel.EnterpriseServer
return VirtualizationServerController2012.SendVirtualMachineSummaryLetter(itemId, to, bcc, false); return VirtualizationServerController2012.SendVirtualMachineSummaryLetter(itemId, to, bcc, false);
} }
#endregion #endregion
}
#region Replication
[WebMethod]
public CertificateInfo[] GetCertificates(int serviceId, string remoteServer)
{
return VirtualizationServerController2012.GetCertificates(serviceId, remoteServer);
}
[WebMethod]
public ResultObject SetReplicaServer(int serviceId, string remoteServer, string thumbprint, string storagePath)
{
return VirtualizationServerController2012.SetReplicaServer(serviceId, remoteServer, thumbprint, storagePath);
}
[WebMethod]
public ResultObject UnsetReplicaServer(int serviceId, string remoteServer)
{
return VirtualizationServerController2012.UnsetReplicaServer(serviceId, remoteServer);
}
[WebMethod]
public ReplicationServerInfo GetReplicaServer(int serviceId, string remoteServer)
{
return VirtualizationServerController2012.GetReplicaServer(serviceId, remoteServer);
}
[WebMethod]
public VmReplication GetReplication(int itemId)
{
return VirtualizationServerController2012.GetReplication(itemId);
}
[WebMethod]
public ReplicationDetailInfo GetReplicationInfo(int itemId)
{
return VirtualizationServerController2012.GetReplicationInfo(itemId);
}
[WebMethod]
public ResultObject SetVmReplication(int itemId, VmReplication replication)
{
return VirtualizationServerController2012.SetVmReplication(itemId, replication);
}
[WebMethod]
public ResultObject DisableVmReplication(int itemId)
{
return VirtualizationServerController2012.DisableVmReplication(itemId);
}
[WebMethod]
public ResultObject PauseReplication(int itemId)
{
return VirtualizationServerController2012.PauseReplication(itemId);
}
[WebMethod]
public ResultObject ResumeReplication(int itemId)
{
return VirtualizationServerController2012.ResumeReplication(itemId);
}
#endregion
}
} }

View file

@ -0,0 +1,117 @@
// Copyright (c) 2015, Outercurve Foundation.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// - Neither the name of the Outercurve Foundation nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Text;
namespace WebsitePanel.Providers.Virtualization
{
public interface IVirtualizationServer2012
{
// Virtual Machines
VirtualMachine GetVirtualMachine(string vmId);
VirtualMachine GetVirtualMachineEx(string vmId);
List<VirtualMachine> GetVirtualMachines();
byte[] GetVirtualMachineThumbnailImage(string vmId, ThumbnailSize size);
VirtualMachine CreateVirtualMachine(VirtualMachine vm);
VirtualMachine UpdateVirtualMachine(VirtualMachine vm);
JobResult ChangeVirtualMachineState(string vmId, VirtualMachineRequestedState newState);
ReturnCode ShutDownVirtualMachine(string vmId, bool force, string reason);
List<ConcreteJob> GetVirtualMachineJobs(string vmId);
JobResult RenameVirtualMachine(string vmId, string name);
JobResult ExportVirtualMachine(string vmId, string exportPath);
JobResult DeleteVirtualMachine(string vmId);
// Snapshots
List<VirtualMachineSnapshot> GetVirtualMachineSnapshots(string vmId);
VirtualMachineSnapshot GetSnapshot(string snapshotId);
JobResult CreateSnapshot(string vmId);
JobResult RenameSnapshot(string vmId, string snapshotId, string name);
JobResult ApplySnapshot(string vmId, string snapshotId);
JobResult DeleteSnapshot(string snapshotId);
JobResult DeleteSnapshotSubtree(string snapshotId);
byte[] GetSnapshotThumbnailImage(string snapshotId, ThumbnailSize size);
// Virtual Switches
List<VirtualSwitch> GetExternalSwitches(string computerName);
List<VirtualSwitch> GetSwitches();
bool SwitchExists(string switchId);
VirtualSwitch CreateSwitch(string name);
ReturnCode DeleteSwitch(string switchId);
// DVD operations
string GetInsertedDVD(string vmId);
JobResult InsertDVD(string vmId, string isoPath);
JobResult EjectDVD(string vmId);
// KVP items
List<KvpExchangeDataItem> GetKVPItems(string vmId);
List<KvpExchangeDataItem> GetStandardKVPItems(string vmId);
JobResult AddKVPItems(string vmId, KvpExchangeDataItem[] items);
JobResult RemoveKVPItems(string vmId, string[] itemNames);
JobResult ModifyKVPItems(string vmId, KvpExchangeDataItem[] items);
// Library
LibraryItem[] GetLibraryItems(string path);
// Storage
VirtualHardDiskInfo GetVirtualHardDiskInfo(string vhdPath);
MountedDiskInfo MountVirtualHardDisk(string vhdPath);
ReturnCode UnmountVirtualHardDisk(string vhdPath);
JobResult ExpandVirtualHardDisk(string vhdPath, UInt64 sizeGB);
JobResult ConvertVirtualHardDisk(string sourcePath, string destinationPath, VirtualHardDiskType diskType);
void ExpandDiskVolume(string diskAddress, string volumeName);
void DeleteRemoteFile(string path);
string ReadRemoteFile(string path);
void WriteRemoteFile(string path, string content);
// Jobs
ConcreteJob GetJob(string jobId);
List<ConcreteJob> GetAllJobs();
ChangeJobStateReturnCode ChangeJobState(string jobId, ConcreteJobRequestedState newState);
// Configuration
int GetProcessorCoresNumber();
// Replication
List<CertificateInfo> GetCertificates(string remoteServer);
void SetReplicaServer(string remoteServer, string thumbprint, string storagePath);
void UnsetReplicaServer(string remoteServer);
ReplicationServerInfo GetReplicaServer(string remoteServer);
void EnableVmReplication(string vmId, string replicaServer, VmReplication replication);
void SetVmReplication(string vmId, string replicaServer, VmReplication replication);
void TestReplicationServer(string vmId, string replicaServer, string localThumbprint);
void StartInitialReplication(string vmId);
VmReplication GetReplication(string vmId);
void DisableVmReplication(string vmId);
ReplicationDetailInfo GetReplicationInfo(string vmId);
void PauseReplication(string vmId);
void ResumeReplication(string vmId);
}
}

View file

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WebsitePanel.Providers.Virtualization
{
public class CertificateInfo
{
public string Thumbprint { get; set; }
public string Subject { get; set; }
public string Title { get; set; }
}
}

View file

@ -0,0 +1,9 @@
namespace WebsitePanel.Providers.Virtualization
{
public enum ReplicaFrequency
{
Seconds30 = 30,
Minutes5 = 300,
Minutes15 = 900,
}
}

View file

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WebsitePanel.Providers.Virtualization
{
public enum ReplicaMode
{
None = 0,
ReplicationEnabled = 1,
IsReplicaServer = 2,
}
}

View file

@ -0,0 +1,24 @@
using System;
namespace WebsitePanel.Providers.Virtualization
{
public class ReplicationDetailInfo
{
public VmReplicationMode Mode { get; set; }
public ReplicationState State { get; set; }
public ReplicationHealth Health { get; set; }
public string HealthDetails { get; set; }
public string PrimaryServerName { get; set; }
public string ReplicaServerName { get; set; }
public DateTime FromTime { get; set; }
public DateTime ToTime { get; set; }
public string AverageSize { get; set; }
public string MaximumSize { get; set; }
public TimeSpan AverageLatency { get; set; }
public int Errors { get; set; }
public int SuccessfulReplications { get; set; }
public int MissedReplicationCount { get; set; }
public string PendingSize { get; set; }
public DateTime LastSynhronizedAt { get; set; }
}
}

View file

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WebsitePanel.Providers.Virtualization
{
public enum ReplicationHealth
{
Critical,
Warning,
Normal,
NotApplicable,
}
}

View file

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WebsitePanel.Providers.Virtualization
{
public class ReplicationServerInfo
{
public bool Enabled { get; set; }
public string ComputerName { get; set; }
}
}

View file

@ -0,0 +1,26 @@

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WebsitePanel.Providers.Virtualization
{
public enum ReplicationState
{
Disabled,
Error,
FailOverWaitingCompletion,
FailedOver,
NotApplicable,
ReadyForInitialReplication,
InitialReplicationInProgress,
Replicating,
Resynchronizing,
ResynchronizeSuspended,
Suspended,
SyncedReplicationComplete,
WaitingForInitialReplication,
WaitingForStartResynchronize,
}
}

View file

@ -0,0 +1,21 @@
namespace WebsitePanel.Providers.Virtualization
{
[Persistent]
public class VmReplication
{
[Persistent]
public string Thumbprint { get; set; }
[Persistent]
public string[] VhdToReplicate { get; set; }
[Persistent]
public ReplicaFrequency ReplicaFrequency { get; set; }
[Persistent]
public int AdditionalRecoveryPoints { get; set; }
[Persistent]
public int VSSSnapshotFrequencyHour { get; set; }
}
}

View file

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WebsitePanel.Providers.Virtualization
{
public enum VmReplicationMode
{
None,
Primary,
Replica,
TestReplica,
}
}

View file

@ -134,8 +134,7 @@ namespace WebsitePanel.Providers.Virtualization
[Persistent] [Persistent]
public string Status { get; set; } public string Status { get; set; }
[Persistent] public ReplicationState ReplicationState { get; set; }
public string ReplicationState { get; set; }
[Persistent] [Persistent]
public int Generation { get; set; } public int Generation { get; set; }

View file

@ -314,6 +314,7 @@
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="Virtualization\ControllerType.cs" /> <Compile Include="Virtualization\ControllerType.cs" />
<Compile Include="Virtualization\IVirtualizationServer2012.cs" />
<Compile Include="Virtualization\IVirtualizationServer.cs"> <Compile Include="Virtualization\IVirtualizationServer.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
@ -330,6 +331,15 @@
<Compile Include="Virtualization\MountedDiskInfo.cs" /> <Compile Include="Virtualization\MountedDiskInfo.cs" />
<Compile Include="Virtualization\OperationalStatus.cs" /> <Compile Include="Virtualization\OperationalStatus.cs" />
<Compile Include="Virtualization\PerformanceObject.cs" /> <Compile Include="Virtualization\PerformanceObject.cs" />
<Compile Include="Virtualization\Replication\CertificateInfo.cs" />
<Compile Include="Virtualization\Replication\ReplicaFrequency.cs" />
<Compile Include="Virtualization\Replication\ReplicationHealth.cs" />
<Compile Include="Virtualization\Replication\ReplicationServerInfo.cs" />
<Compile Include="Virtualization\Replication\VmReplicationMode.cs" />
<Compile Include="Virtualization\Replication\ReplicaMode.cs" />
<Compile Include="Virtualization\Replication\ReplicationState.cs" />
<Compile Include="Virtualization\Replication\ReplicationDetailInfo.cs" />
<Compile Include="Virtualization\Replication\VmReplication.cs" />
<Compile Include="Virtualization\ReturnCode.cs"> <Compile Include="Virtualization\ReturnCode.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>

View file

@ -1730,12 +1730,46 @@ namespace WebsitePanel.Providers.HostedSolution
internal void DeleteMappedDriveByPathInternal(string organizationId, string path) internal void DeleteMappedDriveByPathInternal(string organizationId, string path)
{ {
MappedDrive drive = GetDriveMaps(organizationId).Where(x => x.Path == path).FirstOrDefault(); HostedSolutionLog.LogStart("DeleteMappedDriveInternal");
HostedSolutionLog.DebugInfo("path : {0}:", path);
HostedSolutionLog.DebugInfo("organizationId : {0}", organizationId);
if (drive != null) if (string.IsNullOrEmpty(organizationId))
{ throw new ArgumentNullException("organizationId");
DeleteMappedDriveInternal(organizationId, drive.DriveLetter);
} if (string.IsNullOrEmpty(path))
throw new ArgumentNullException("path");
string gpoId;
if (!CheckMappedDriveGpoExists(organizationId, out gpoId))
{
CreateAndLinkMappedDrivesGPO(organizationId, out gpoId);
}
if (!string.IsNullOrEmpty(gpoId))
{
string filePath = string.Format("{0}\\{1}",
string.Format(GROUP_POLICY_MAPPED_DRIVES_FILE_PATH_TEMPLATE, RootDomain, gpoId),
"Drives.xml");
// open xml document
XmlDocument xml = new XmlDocument();
xml.Load(filePath);
XmlNode drive = xml.SelectSingleNode(string.Format("./Drives/Drive[contains(Properties/@path,'{0}')]", path));
if (drive != null)
{
drive.ParentNode.RemoveChild(drive);
}
xml.Save(filePath);
IncrementGPOVersion(organizationId, gpoId);
}
HostedSolutionLog.LogEnd("DeleteMappedDriveInternal");
} }
public void DeleteMappedDrive(string organizationId, string drive) public void DeleteMappedDrive(string organizationId, string drive)

View file

@ -20,6 +20,7 @@ namespace WebsitePanel.Providers.Virtualization
public const Int64 Size1G = 0x40000000; public const Int64 Size1G = 0x40000000;
public const Int64 Size1M = 0x100000; public const Int64 Size1M = 0x100000;
public const Int64 Size1K = 1024;
public const string KVP_RAM_SUMMARY_KEY = "VM-RAM-Summary"; public const string KVP_RAM_SUMMARY_KEY = "VM-RAM-Summary";
public const string KVP_HDD_SUMMARY_KEY = "VM-HDD-Summary"; public const string KVP_HDD_SUMMARY_KEY = "VM-HDD-Summary";

View file

@ -20,9 +20,17 @@ namespace WebsitePanel.Providers.Virtualization
{ {
return (T)obj.Members[name].Value; return (T)obj.Members[name].Value;
} }
public static T GetEnum<T>(this PSObject obj, string name) where T : struct public static T GetEnum<T>(this PSObject obj, string name, T? defaultValue = null) where T : struct
{ {
return (T)Enum.Parse(typeof(T), GetProperty(obj, name).ToString()); try
{
return (T) Enum.Parse(typeof (T), GetProperty(obj, name).ToString());
}
catch
{
if (defaultValue.HasValue) return defaultValue.Value;
throw;
}
} }
public static int GetInt(this PSObject obj, string name) public static int GetInt(this PSObject obj, string name)
{ {
@ -40,6 +48,25 @@ namespace WebsitePanel.Providers.Virtualization
{ {
return Convert.ToBoolean(obj.Members[name].Value); return Convert.ToBoolean(obj.Members[name].Value);
} }
public static string GetMb(this PSObject obj, string name)
{
var bytes = GetLong(obj, name);
if (bytes == 0)
return "0";
if (bytes > Constants.Size1G)
return string.Format("{0:0.0} GB", bytes / Constants.Size1G);
if (bytes > Constants.Size1M)
return string.Format("{0:0.0} MB", bytes / Constants.Size1M);
if (bytes > Constants.Size1K)
return string.Format("{0:0.0} KB", bytes / Constants.Size1K);
return string.Format("{0} b", bytes);
}
#endregion #endregion

View file

@ -52,7 +52,7 @@ namespace WebsitePanel.Providers.Virtualization
cmd.Parameters.Add("DynamicMemoryEnabled", false); cmd.Parameters.Add("DynamicMemoryEnabled", false);
} }
powerShell.Execute(cmd, true); powerShell.Execute(cmd, true, true);
} }
} }
} }

View file

@ -0,0 +1,49 @@
using System.Management.Automation.Runspaces;
namespace WebsitePanel.Providers.Virtualization
{
public static class ReplicaHelper
{
public static void SetReplicaServer(PowerShellManager powerShell, bool enabled, string remoteServer, string thumbprint, string storagePath)
{
Command cmd = new Command("Set-VMReplicationServer");
cmd.Parameters.Add("ReplicationEnabled", enabled);
if (!string.IsNullOrEmpty(remoteServer))
{
cmd.Parameters.Add("ComputerName", remoteServer);
}
if (!string.IsNullOrEmpty(thumbprint))
{
cmd.Parameters.Add("AllowedAuthenticationType", "Certificate");
cmd.Parameters.Add("CertificateThumbprint", thumbprint);
}
if (!string.IsNullOrEmpty(storagePath))
{
cmd.Parameters.Add("ReplicationAllowedFromAnyServer", true);
cmd.Parameters.Add("DefaultStorageLocation", storagePath);
}
powerShell.Execute(cmd, false);
}
public static void SetFirewallRule(PowerShellManager powerShell, bool enabled)
{
Command cmd = new Command("Enable-Netfirewallrule");
cmd.Parameters.Add("DisplayName", "Hyper-V Replica HTTPS Listener (TCP-In)");
powerShell.Execute(cmd, false);
}
public static void RemoveVmReplication(PowerShellManager powerShell, string vmName, string server)
{
Command cmd = new Command("Remove-VMReplication");
cmd.Parameters.Add("VmName", vmName);
if (!string.IsNullOrEmpty(server)) cmd.Parameters.Add("ComputerName", server);
powerShell.Execute(cmd, false);
}
}
}

View file

@ -61,5 +61,25 @@ namespace WebsitePanel.Providers.Virtualization
powerShell.Execute(cmd, true); powerShell.Execute(cmd, true);
} }
public static void Delete(PowerShellManager powerShell, string vmName, string server)
{
Command cmd = new Command("Remove-VM");
cmd.Parameters.Add("Name", vmName);
if (!string.IsNullOrEmpty(server)) cmd.Parameters.Add("ComputerName", server);
cmd.Parameters.Add("Force");
powerShell.Execute(cmd, false, true);
}
public static void Stop(PowerShellManager powerShell, string vmName, bool force, string server)
{
Command cmd = new Command("Stop-VM");
cmd.Parameters.Add("Name", vmName);
if (force) cmd.Parameters.Add("Force");
if (!string.IsNullOrEmpty(server)) cmd.Parameters.Add("ComputerName", server);
//if (!string.IsNullOrEmpty(reason)) cmd.Parameters.Add("Reason", reason);
powerShell.Execute(cmd, false);
}
} }
} }

View file

@ -56,7 +56,7 @@ using System.Configuration;
namespace WebsitePanel.Providers.Virtualization namespace WebsitePanel.Providers.Virtualization
{ {
public class HyperV2012R2 : HostingServiceProviderBase, IVirtualizationServer public class HyperV2012R2 : HostingServiceProviderBase, IVirtualizationServer2012
{ {
#region Provider Settings #region Provider Settings
protected string ServerNameSettings protected string ServerNameSettings
@ -98,6 +98,20 @@ namespace WebsitePanel.Providers.Virtualization
{ {
get { return ProviderSettings.GetInt("CpuWeight"); } get { return ProviderSettings.GetInt("CpuWeight"); }
} }
public ReplicaMode ReplicaMode
{
get { return (ReplicaMode) Enum.Parse(typeof(ReplicaMode) , ProviderSettings["ReplicaMode"]); }
}
protected string ReplicaServerPath
{
get { return ProviderSettings["ReplicaServerPath"]; }
}
protected string ReplicaServerThumbprint
{
get { return ProviderSettings["ReplicaServerThumbprint"]; }
}
#endregion #endregion
#region Fields #region Fields
@ -157,12 +171,12 @@ namespace WebsitePanel.Providers.Virtualization
vm.RamSize = Convert.ToInt32(ConvertNullableToInt64(result[0].GetProperty("MemoryStartup")) / Constants.Size1M); vm.RamSize = Convert.ToInt32(ConvertNullableToInt64(result[0].GetProperty("MemoryStartup")) / Constants.Size1M);
vm.Uptime = Convert.ToInt64(result[0].GetProperty<TimeSpan>("UpTime").TotalMilliseconds); vm.Uptime = Convert.ToInt64(result[0].GetProperty<TimeSpan>("UpTime").TotalMilliseconds);
vm.Status = result[0].GetProperty("Status").ToString(); vm.Status = result[0].GetProperty("Status").ToString();
vm.ReplicationState = result[0].GetProperty("ReplicationState").ToString();
vm.Generation = result[0].GetInt("Generation"); vm.Generation = result[0].GetInt("Generation");
vm.ProcessorCount = result[0].GetInt("ProcessorCount"); vm.ProcessorCount = result[0].GetInt("ProcessorCount");
vm.ParentSnapshotId = result[0].GetString("ParentSnapshotId"); vm.ParentSnapshotId = result[0].GetString("ParentSnapshotId");
vm.Heartbeat = VirtualMachineHelper.GetVMHeartBeatStatus(PowerShell, vm.Name); vm.Heartbeat = VirtualMachineHelper.GetVMHeartBeatStatus(PowerShell, vm.Name);
vm.CreatedDate = DateTime.Now; vm.CreatedDate = DateTime.Now;
vm.ReplicationState = result[0].GetEnum<ReplicationState>("ReplicationState");
if (extendedInfo) if (extendedInfo)
{ {
@ -222,9 +236,10 @@ namespace WebsitePanel.Providers.Virtualization
VirtualMachine vm = new VirtualMachine VirtualMachine vm = new VirtualMachine
{ {
VirtualMachineId = current.GetProperty("Id").ToString(), VirtualMachineId = current.GetProperty("Id").ToString(),
Name = current.GetProperty("Name").ToString(), Name = current.GetString("Name"),
State = (VirtualMachineState)Enum.Parse(typeof(VirtualMachineState), current.GetProperty("State").ToString()), State = current.GetEnum<VirtualMachineState>("State"),
Uptime = Convert.ToInt64(current.GetProperty<TimeSpan>("UpTime").TotalMilliseconds) Uptime = Convert.ToInt64(current.GetProperty<TimeSpan>("UpTime").TotalMilliseconds),
ReplicationState = current.GetEnum<ReplicationState>("ReplicationState")
}; };
vmachines.Add(vm); vmachines.Add(vm);
} }
@ -443,30 +458,11 @@ namespace WebsitePanel.Providers.Virtualization
public ReturnCode ShutDownVirtualMachine(string vmId, bool force, string reason) public ReturnCode ShutDownVirtualMachine(string vmId, bool force, string reason)
{ {
HostedSolutionLog.LogStart("ShutDownVirtualMachine");
ReturnCode returnCode = ReturnCode.OK;
var vm = GetVirtualMachine(vmId); var vm = GetVirtualMachine(vmId);
try VirtualMachineHelper.Stop(PowerShell, vm.Name, force, ServerNameSettings);
{
Command cmd = new Command("Stop-VM");
cmd.Parameters.Add("Name", vm.Name); return ReturnCode.OK;
if (force) cmd.Parameters.Add("Force");
//if (!string.IsNullOrEmpty(reason)) cmd.Parameters.Add("Reason", reason);
PowerShell.Execute(cmd, true);
}
catch (Exception ex)
{
HostedSolutionLog.LogError("ShutDownVirtualMachine", ex);
throw;
}
HostedSolutionLog.LogEnd("ShutDownVirtualMachine");
return returnCode;
} }
public List<ConcreteJob> GetVirtualMachineJobs(string vmId) public List<ConcreteJob> GetVirtualMachineJobs(string vmId)
@ -517,10 +513,7 @@ namespace WebsitePanel.Providers.Virtualization
//DeleteSwitch(networkAdapter.SwitchName); //DeleteSwitch(networkAdapter.SwitchName);
} }
Command cmdSet = new Command("Remove-VM"); VirtualMachineHelper.Delete(PowerShell, vm.Name, ServerNameSettings);
cmdSet.Parameters.Add("Name", vm.Name);
cmdSet.Parameters.Add("Force");
PowerShell.Execute(cmdSet, true, true);
return JobHelper.CreateSuccessResult(ReturnCode.JobStarted); return JobHelper.CreateSuccessResult(ReturnCode.JobStarted);
} }
@ -787,10 +780,10 @@ namespace WebsitePanel.Providers.Virtualization
Command cmd = new Command("Get-VMSwitch"); Command cmd = new Command("Get-VMSwitch");
// Not needed as the PowerShellManager adds the computer name // Not needed as the PowerShellManager adds the computer name
//if (!string.IsNullOrEmpty(computerName)) cmd.Parameters.Add("ComputerName", computerName); if (!string.IsNullOrEmpty(computerName)) cmd.Parameters.Add("ComputerName", computerName);
if (!string.IsNullOrEmpty(type)) cmd.Parameters.Add("SwitchType", type); if (!string.IsNullOrEmpty(type)) cmd.Parameters.Add("SwitchType", type);
Collection<PSObject> result = PowerShell.Execute(cmd, true, true); Collection<PSObject> result = PowerShell.Execute(cmd, false, true);
foreach (PSObject current in result) foreach (PSObject current in result)
{ {
@ -1963,6 +1956,285 @@ namespace WebsitePanel.Providers.Virtualization
return !String.IsNullOrEmpty(connString); return !String.IsNullOrEmpty(connString);
} }
#endregion Hyper-V Cloud #endregion Hyper-V Cloud
#region Replication
public List<CertificateInfo> GetCertificates(string remoteServer)
{
// we cant get certificates from remote server
if (!string.IsNullOrEmpty(remoteServer))
return null;
Command cmd = new Command("Get-ChildItem");
cmd.Parameters.Add("Path", @"cert:\LocalMachine\My");
Collection<PSObject> result = PowerShell.Execute(cmd, false);
return result
.Select(
cert => new CertificateInfo
{
Subject = cert.GetString("Subject"),
Thumbprint = cert.GetString("Thumbprint"),
Title = string.Format("{0} ({1})", cert.GetString("Thumbprint"), cert.GetString("Subject")),
})
.ToList();
}
public void SetReplicaServer(string remoteServer, string thumbprint, string storagePath)
{
// we cant enable firewall rules on remote server
if (string.IsNullOrEmpty(remoteServer))
ReplicaHelper.SetFirewallRule(PowerShell, true);
if (GetReplicaServer(remoteServer) != null)
UnsetReplicaServer(remoteServer);
ReplicaHelper.SetReplicaServer(PowerShell, true, remoteServer, thumbprint, storagePath);
}
public void UnsetReplicaServer(string remoteServer)
{
ReplicaHelper.SetReplicaServer(PowerShell, false, remoteServer, null, null);
}
public ReplicationServerInfo GetReplicaServer(string remoteServer)
{
ReplicationServerInfo replicaServer = null;
Command cmd = new Command("Get-VMReplicationServer");
if (!string.IsNullOrEmpty(remoteServer))
{
cmd.Parameters.Add("ComputerName", remoteServer);
}
Collection<PSObject> result = PowerShell.Execute(cmd, false);
if (result != null && result.Count > 0)
{
replicaServer = new ReplicationServerInfo();
replicaServer.Enabled = result[0].GetBool("RepEnabled");
replicaServer.ComputerName = result[0].GetString("ComputerName");
}
return replicaServer;
}
public void EnableVmReplication(string vmId, string replicaServer, VmReplication replication)
{
if (ReplicaMode != ReplicaMode.ReplicationEnabled)
throw new Exception("Server does not allow replication by settings");
var vm = GetVirtualMachineEx(vmId);
Command cmd = new Command("Enable-VMReplication");
cmd.Parameters.Add("VmName", vm.Name);
cmd.Parameters.Add("ReplicaServerName", replicaServer);
cmd.Parameters.Add("ReplicaServerPort", 443);
cmd.Parameters.Add("AuthenticationType", "Cert");
cmd.Parameters.Add("CertificateThumbprint", replication.Thumbprint);
cmd.Parameters.Add("ReplicationFrequencySec", (int)replication.ReplicaFrequency);
var excludes = vm.Disks
.Select(d => d.Path)
.Where(p => replication.VhdToReplicate.All(vp => !p.Equals(vp, StringComparison.OrdinalIgnoreCase)))
.ToArray();
if (excludes.Any())
cmd.Parameters.Add("ExcludedVhdPath", excludes);
// recovery points
cmd.Parameters.Add("RecoveryHistory", replication.AdditionalRecoveryPoints);
if (replication.AdditionalRecoveryPoints > 0)
{
if (replication.AdditionalRecoveryPoints > 24)
throw new Exception("AdditionalRecoveryPoints can not be greater than 24");
if (replication.VSSSnapshotFrequencyHour > 0)
{
if (replication.VSSSnapshotFrequencyHour > 12)
throw new Exception("VSSSnapshotFrequencyHour can not be greater than 12");
cmd.Parameters.Add("VSSSnapshotFrequencyHour", replication.VSSSnapshotFrequencyHour);
}
}
PowerShell.Execute(cmd, true, true);
}
public void SetVmReplication(string vmId, string replicaServer, VmReplication replication)
{
if (ReplicaMode != ReplicaMode.ReplicationEnabled)
throw new Exception("Server does not allow replication by settings");
var vm = GetVirtualMachineEx(vmId);
Command cmd = new Command("Set-VMReplication");
cmd.Parameters.Add("VmName", vm.Name);
cmd.Parameters.Add("ReplicaServerName", replicaServer);
cmd.Parameters.Add("ReplicaServerPort", 443);
cmd.Parameters.Add("AuthenticationType", "Cert");
cmd.Parameters.Add("CertificateThumbprint", replication.Thumbprint);
cmd.Parameters.Add("ReplicationFrequencySec", (int)replication.ReplicaFrequency);
// recovery points
cmd.Parameters.Add("RecoveryHistory", replication.AdditionalRecoveryPoints);
if (replication.AdditionalRecoveryPoints > 0)
{
if (replication.AdditionalRecoveryPoints > 24)
throw new Exception("AdditionalRecoveryPoints can not be greater than 24");
if (replication.VSSSnapshotFrequencyHour > 0)
{
if (replication.VSSSnapshotFrequencyHour > 12)
throw new Exception("VSSSnapshotFrequencyHour can not be greater than 12");
cmd.Parameters.Add("VSSSnapshotFrequencyHour", replication.VSSSnapshotFrequencyHour);
}
else
{
cmd.Parameters.Add("DisableVSSSnapshotReplication");
}
}
PowerShell.Execute(cmd, true, true);
}
public void TestReplicationServer(string vmId, string replicaServer, string localThumbprint)
{
if (ReplicaMode != ReplicaMode.ReplicationEnabled)
throw new Exception("Server does not allow replication by settings");
var vm = GetVirtualMachine(vmId);
Command cmd = new Command("Test-VMReplicationConnection");
cmd.Parameters.Add("VmName", vm.Name);
cmd.Parameters.Add("ReplicaServerName", replicaServer);
cmd.Parameters.Add("ReplicaServerPort", 443);
cmd.Parameters.Add("AuthenticationType", "Cert");
cmd.Parameters.Add("CertificateThumbprint", localThumbprint);
PowerShell.Execute(cmd, true);
}
public void StartInitialReplication(string vmId)
{
if (ReplicaMode != ReplicaMode.ReplicationEnabled)
throw new Exception("Server does not allow replication by settings");
var vm = GetVirtualMachine(vmId);
Command cmd = new Command("Start-VMInitialReplication");
cmd.Parameters.Add("VmName", vm.Name);
PowerShell.Execute(cmd, true);
}
public VmReplication GetReplication(string vmId)
{
if (ReplicaMode != ReplicaMode.ReplicationEnabled)
throw new Exception("Server does not allow replication by settings");
VmReplication replica = null;
var vm = GetVirtualMachineEx(vmId);
Command cmd = new Command("Get-VMReplication");
cmd.Parameters.Add("VmName", vm.Name);
Collection<PSObject> result = PowerShell.Execute(cmd, true);
if (result != null && result.Count > 0)
{
replica = new VmReplication();
replica.ReplicaFrequency = result[0].GetEnum<ReplicaFrequency>("FrequencySec", ReplicaFrequency.Seconds30);
replica.Thumbprint = result[0].GetString("CertificateThumbprint");
replica.AdditionalRecoveryPoints = result[0].GetInt("RecoveryHistory");
replica.VSSSnapshotFrequencyHour = result[0].GetInt("VSSSnapshotFrequencyHour");
List<string> excludes = new List<string>();
foreach (dynamic item in (IEnumerable) result[0].GetProperty("ExcludedDisks"))
excludes.Add(item.Path.ToString());
replica.VhdToReplicate = vm.Disks
.Select(d => d.Path)
.Where(p => excludes.All(ep => !p.Equals(ep, StringComparison.OrdinalIgnoreCase)))
.ToArray();
}
return replica;
}
public void DisableVmReplication(string vmId)
{
if (ReplicaMode == ReplicaMode.None)
throw new Exception("Server does not allow replication by settings");
var vm = GetVirtualMachine(vmId);
ReplicaHelper.RemoveVmReplication(PowerShell, vm.Name, ServerNameSettings);
}
public ReplicationDetailInfo GetReplicationInfo(string vmId)
{
if (ReplicaMode != ReplicaMode.ReplicationEnabled)
throw new Exception("Server does not allow replication by settings");
ReplicationDetailInfo replica = null;
var vm = GetVirtualMachine(vmId);
Command cmd = new Command("Measure-VMReplication");
cmd.Parameters.Add("VmName", vm.Name);
Collection<PSObject> result = PowerShell.Execute(cmd, true);
if (result != null && result.Count > 0)
{
replica = new ReplicationDetailInfo();
replica.AverageLatency = result[0].GetProperty<TimeSpan?>("AverageReplicationLatency") ?? new TimeSpan();
replica.AverageSize = result[0].GetMb("AverageReplicationSize");
replica.Errors = result[0].GetInt("ReplicationErrors");
replica.FromTime = result[0].GetProperty<DateTime>("MonitoringStartTime");
replica.Health = result[0].GetEnum<ReplicationHealth>("ReplicationHealth");
replica.HealthDetails = string.Join(" ", result[0].GetProperty<string[]>("ReplicationHealthDetails"));
replica.LastSynhronizedAt = result[0].GetProperty<DateTime?>("LastReplicationTime") ?? new DateTime();
replica.MaximumSize = result[0].GetMb("MaximumReplicationSize");
replica.Mode = result[0].GetEnum<VmReplicationMode>("ReplicationMode");
replica.PendingSize = result[0].GetMb("PendingReplicationSize");
replica.PrimaryServerName = result[0].GetString("PrimaryServerName");
replica.ReplicaServerName = result[0].GetString("CurrentReplicaServerName");
replica.State = result[0].GetEnum<ReplicationState>("ReplicationState");
replica.SuccessfulReplications = result[0].GetInt("SuccessfulReplicationCount");
replica.MissedReplicationCount = result[0].GetInt("MissedReplicationCount");
replica.ToTime = result[0].GetProperty<DateTime>("MonitoringEndTime");
}
return replica;
}
public void PauseReplication(string vmId)
{
if (ReplicaMode != ReplicaMode.ReplicationEnabled)
throw new Exception("Server does not allow replication by settings");
var vm = GetVirtualMachine(vmId);
Command cmd = new Command("Suspend-VMReplication");
cmd.Parameters.Add("VmName", vm.Name);
PowerShell.Execute(cmd, true);
}
public void ResumeReplication(string vmId)
{
if (ReplicaMode != ReplicaMode.ReplicationEnabled)
throw new Exception("Server does not allow replication by settings");
var vm = GetVirtualMachine(vmId);
Command cmd = new Command("Resume-VMReplication");
cmd.Parameters.Add("VmName", vm.Name);
PowerShell.Execute(cmd, true);
}
#endregion
} }
} }

View file

@ -56,6 +56,7 @@
<Compile Include="Constants.cs" /> <Compile Include="Constants.cs" />
<Compile Include="Extensions\PSObjectExtension.cs" /> <Compile Include="Extensions\PSObjectExtension.cs" />
<Compile Include="Extensions\StringExtensions.cs" /> <Compile Include="Extensions\StringExtensions.cs" />
<Compile Include="Helpers\ReplicaHelper.cs" />
<Compile Include="Helpers\BiosHelper.cs" /> <Compile Include="Helpers\BiosHelper.cs" />
<Compile Include="Helpers\MemoryHelper.cs" /> <Compile Include="Helpers\MemoryHelper.cs" />
<Compile Include="Helpers\VdsHelper.cs" /> <Compile Include="Helpers\VdsHelper.cs" />

File diff suppressed because it is too large Load diff

View file

@ -99,6 +99,7 @@
<Compile Include="VirtualizationServerProxy.cs"> <Compile Include="VirtualizationServerProxy.cs">
<SubType>code</SubType> <SubType>code</SubType>
</Compile> </Compile>
<Compile Include="VirtualizationServerProxy2012.cs" />
<Compile Include="WebServerProxy.cs" /> <Compile Include="WebServerProxy.cs" />
<Compile Include="WindowsServerProxy.cs" /> <Compile Include="WindowsServerProxy.cs" />
</ItemGroup> </ItemGroup>

View file

@ -0,0 +1 @@
<%@ WebService Language="C#" CodeBehind="VirtualizationServer2012.asmx.cs" Class="WebsitePanel.Server.VirtualizationServer2012" %>

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0"?>
<configuration> <configuration>
<!-- Custom configuration sections --> <!-- Custom configuration sections -->
<configSections> <configSections>
@ -7,34 +7,34 @@
<section name="cachingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerSettings,Microsoft.Practices.EnterpriseLibrary.Caching"/> <section name="cachingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerSettings,Microsoft.Practices.EnterpriseLibrary.Caching"/>
</configSections> </configSections>
<appSettings> <appSettings>
<add key="WebsitePanel.HyperV.UseDiskPartClearReadOnlyFlag" value="false" /> <add key="WebsitePanel.HyperV.UseDiskPartClearReadOnlyFlag" value="false"/>
<add key="WebsitePanel.Exchange.ClearQueryBaseDN" value="false" /> <add key="WebsitePanel.Exchange.ClearQueryBaseDN" value="false"/>
<add key="WebsitePanel.Exchange.enableSP2abp" value="false" /> <add key="WebsitePanel.Exchange.enableSP2abp" value="false"/>
<add key="SCVMMServerName" value="" /> <add key="SCVMMServerName" value=""/>
<add key="SCVMMServerPort" value="" /> <add key="SCVMMServerPort" value=""/>
</appSettings> </appSettings>
<system.diagnostics> <system.diagnostics>
<switches> <switches>
<add name="Log" value="2" /> <add name="Log" value="2"/>
<!-- 0 - Off, 1 - Error, 2 - Warning, 3 - Info, 4 - Verbose --> <!-- 0 - Off, 1 - Error, 2 - Warning, 3 - Info, 4 - Verbose -->
</switches> </switches>
<trace autoflush="true"> <trace autoflush="true">
<listeners> <listeners>
<add name="DefaultListener" type="WebsitePanel.Server.Utils.EventLogTraceListener, WebsitePanel.Server.Utils" initializeData="WebsitePanel" /> <add name="DefaultListener" type="WebsitePanel.Server.Utils.EventLogTraceListener, WebsitePanel.Server.Utils" initializeData="WebsitePanel"/>
<!-- Writes log to the file <!-- Writes log to the file
<add name="DefaultListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="WebsitePanel.Server.log" /> <add name="DefaultListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="WebsitePanel.Server.log" />
--> -->
<remove name="Default" /> <remove name="Default"/>
</listeners> </listeners>
</trace> </trace>
</system.diagnostics> </system.diagnostics>
<!-- Caching Configuration --> <!-- Caching Configuration -->
<cachingConfiguration defaultCacheManager="Default Cache Manager"> <cachingConfiguration defaultCacheManager="Default Cache Manager">
<backingStores> <backingStores>
<add name="inMemory" type="Microsoft.Practices.EnterpriseLibrary.Caching.BackingStoreImplementations.NullBackingStore, Microsoft.Practices.EnterpriseLibrary.Caching" /> <add name="inMemory" type="Microsoft.Practices.EnterpriseLibrary.Caching.BackingStoreImplementations.NullBackingStore, Microsoft.Practices.EnterpriseLibrary.Caching"/>
</backingStores> </backingStores>
<cacheManagers> <cacheManagers>
<add name="Default Cache Manager" expirationPollFrequencyInSeconds="43200" maximumElementsInCacheBeforeScavenging="1000" numberToRemoveWhenScavenging="10" backingStoreName="inMemory" /> <add name="Default Cache Manager" expirationPollFrequencyInSeconds="43200" maximumElementsInCacheBeforeScavenging="1000" numberToRemoveWhenScavenging="10" backingStoreName="inMemory"/>
</cacheManagers> </cacheManagers>
</cachingConfiguration> </cachingConfiguration>
<!-- WebsitePanel Configuration --> <!-- WebsitePanel Configuration -->
@ -42,127 +42,72 @@
<!-- Security settings --> <!-- Security settings -->
<security> <security>
<!-- Perform security check --> <!-- Perform security check -->
<enabled value="true" /> <enabled value="true"/>
<!-- Server password --> <!-- Server password -->
<password value="+uxnDOdf55yuH6iZYXgYAxsfIBw=" /> <password value="+uxnDOdf55yuH6iZYXgYAxsfIBw="/>
</security> </security>
</websitepanel.server> </websitepanel.server>
<system.web> <system.web>
<!-- Disable any authentication --> <!-- Disable any authentication -->
<authentication mode="None" /> <authentication mode="None"/>
<!-- Correct HTTP runtime settings --> <!-- Correct HTTP runtime settings -->
<httpRuntime executionTimeout="3600" maxRequestLength="16384" /> <httpRuntime executionTimeout="3600" maxRequestLength="16384"/>
<!-- Set globalization settings --> <!-- Set globalization settings -->
<globalization culture="en-US" uiCulture="en" requestEncoding="UTF-8" responseEncoding="UTF-8" fileEncoding="UTF-8" /> <globalization culture="en-US" uiCulture="en" requestEncoding="UTF-8" responseEncoding="UTF-8" fileEncoding="UTF-8"/>
<!-- Web Services settings --> <!-- Web Services settings -->
<webServices> <webServices>
<protocols> <protocols>
<remove name="HttpPost" /> <remove name="HttpPost"/>
<remove name="HttpPostLocalhost" /> <remove name="HttpPostLocalhost"/>
<remove name="HttpGet" /> <remove name="HttpGet"/>
</protocols> </protocols>
<soapServerProtocolFactory type="Microsoft.Web.Services3.WseProtocolFactory, Microsoft.Web.Services3" /> <soapServerProtocolFactory type="Microsoft.Web.Services3.WseProtocolFactory, Microsoft.Web.Services3"/>
</webServices> </webServices>
<compilation debug="true"> <compilation debug="true" targetFramework="4.0"/>
<assemblies> <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
</assemblies>
</compilation>
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</controls>
</pages>
<httpHandlers>
<remove verb="*" path="*.asmx" />
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</httpModules>
</system.web> </system.web>
<!-- WSE 3.0 settings --> <!-- WSE 3.0 settings -->
<microsoft.web.services3> <microsoft.web.services3>
<diagnostics> <diagnostics>
<trace enabled="false" input="InputTrace.webinfo" output="OutputTrace.webinfo" /> <trace enabled="false" input="InputTrace.webinfo" output="OutputTrace.webinfo"/>
</diagnostics> </diagnostics>
<messaging> <messaging>
<maxMessageLength value="-1" /> <maxMessageLength value="-1"/>
<mtom serverMode="optional" clientMode="On" /> <mtom serverMode="optional" clientMode="On"/>
</messaging> </messaging>
<security> <security>
<securityTokenManager> <securityTokenManager>
<add type="WebsitePanel.Server.ServerUsernameTokenManager, WebsitePanel.Server" namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" localName="UsernameToken" /> <add type="WebsitePanel.Server.ServerUsernameTokenManager, WebsitePanel.Server" namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" localName="UsernameToken"/>
</securityTokenManager> </securityTokenManager>
<timeToleranceInSeconds value="86400" /> <timeToleranceInSeconds value="86400"/>
</security> </security>
<policy fileName="WsePolicyCache.Config" /> <policy fileName="WsePolicyCache.Config"/>
</microsoft.web.services3> </microsoft.web.services3>
<system.serviceModel> <system.serviceModel>
<bindings> <bindings>
<wsHttpBinding> <wsHttpBinding>
<binding name="WSHttpBinding_IVirtualMachineManagementService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="10485760" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"> <binding name="WSHttpBinding_IVirtualMachineManagementService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="10485760" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /> <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/>
<security mode="Message"> <security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None" realm="" /> <transport clientCredentialType="Windows" proxyCredentialType="None" realm=""/>
<message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" /> <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default"/>
</security> </security>
</binding> </binding>
<binding name="WSHttpBinding_IMonitoringService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="10485760" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"> <binding name="WSHttpBinding_IMonitoringService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="10485760" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /> <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/>
<security mode="Message"> <security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None" realm="" /> <transport clientCredentialType="Windows" proxyCredentialType="None" realm=""/>
<message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" /> <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default"/>
</security> </security>
</binding> </binding>
</wsHttpBinding> </wsHttpBinding>
</bindings> </bindings>
</system.serviceModel> </system.serviceModel>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
<providerOption name="CompilerVersion" value="v3.5" />
<providerOption name="WarnAsError" value="false" />
</compiler>
</compilers>
</system.codedom>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules>
<remove name="ScriptModule" />
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated" />
<remove name="ScriptHandlerFactory" />
<remove name="ScriptHandlerFactoryAppServices" />
<remove name="ScriptResource" />
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</handlers>
</system.webServer>
<runtime> <runtime>
<assemblyBinding appliesTo="v2.0.50727" xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
</dependentAssembly>
</assemblyBinding>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin/Crm2011;bin/Crm2013;bin/Exchange2013;bin/Sharepoint2013;bin/Lync2013;bin/Lync2013HP;bin/Dns2012;bin/IceWarp;bin/IIs80;bin/HyperV2012R2;bin/Crm2015" /> <probing privatePath="bin/Crm2011;bin/Crm2013;bin/Exchange2013;bin/Sharepoint2013;bin/Lync2013;bin/Lync2013HP;bin/Dns2012;bin/IceWarp;bin/IIs80;bin/HyperV2012R2;bin/Crm2015"/>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
</configuration> </configuration>

View file

@ -17,7 +17,7 @@
<OldToolsVersion>4.0</OldToolsVersion> <OldToolsVersion>4.0</OldToolsVersion>
<UpgradeBackupLocation> <UpgradeBackupLocation>
</UpgradeBackupLocation> </UpgradeBackupLocation>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
<UseIISExpress>false</UseIISExpress> <UseIISExpress>false</UseIISExpress>
<IISExpressSSLPort /> <IISExpressSSLPort />
@ -80,6 +80,7 @@
<Reference Include="System.ServiceModel" /> <Reference Include="System.ServiceModel" />
<Reference Include="System.ServiceProcess" /> <Reference Include="System.ServiceProcess" />
<Reference Include="System.Web" /> <Reference Include="System.Web" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.Web.DynamicData" /> <Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" /> <Reference Include="System.Web.Entity" />
<Reference Include="System.Web.Extensions" /> <Reference Include="System.Web.Extensions" />
@ -235,18 +236,12 @@
<Content Include="bin\WebsitePanel.Providers.OS.Windows2012.pdb" /> <Content Include="bin\WebsitePanel.Providers.OS.Windows2012.pdb" />
<Content Include="bin\WebsitePanel.Providers.RemoteDesktopServices.Windows2012.dll" /> <Content Include="bin\WebsitePanel.Providers.RemoteDesktopServices.Windows2012.dll" />
<Content Include="bin\WebsitePanel.Providers.RemoteDesktopServices.Windows2012.pdb" /> <Content Include="bin\WebsitePanel.Providers.RemoteDesktopServices.Windows2012.pdb" />
<Content Include="bin\WebsitePanel.Providers.SharePoint.Sps20.dll" />
<Content Include="bin\WebsitePanel.Providers.SharePoint.Sps20.pdb" />
<Content Include="bin\WebsitePanel.Providers.SharePoint.Sps30.dll" />
<Content Include="bin\WebsitePanel.Providers.SharePoint.Sps30.pdb" />
<Content Include="bin\WebsitePanel.Providers.Statistics.AWStats.dll" /> <Content Include="bin\WebsitePanel.Providers.Statistics.AWStats.dll" />
<Content Include="bin\WebsitePanel.Providers.Statistics.AWStats.pdb" /> <Content Include="bin\WebsitePanel.Providers.Statistics.AWStats.pdb" />
<Content Include="bin\WebsitePanel.Providers.Statistics.SmarterStats.dll" /> <Content Include="bin\WebsitePanel.Providers.Statistics.SmarterStats.dll" />
<Content Include="bin\WebsitePanel.Providers.Statistics.SmarterStats.pdb" /> <Content Include="bin\WebsitePanel.Providers.Statistics.SmarterStats.pdb" />
<Content Include="bin\WebsitePanel.Providers.Virtualization.HyperV.dll" /> <Content Include="bin\WebsitePanel.Providers.Virtualization.HyperV.dll" />
<Content Include="bin\WebsitePanel.Providers.Virtualization.HyperV.pdb" /> <Content Include="bin\WebsitePanel.Providers.Virtualization.HyperV.pdb" />
<Content Include="bin\WebsitePanel.Providers.Virtualization.HyperV2012R2.dll" />
<Content Include="bin\WebsitePanel.Providers.Virtualization.HyperV2012R2.pdb" />
<Content Include="bin\WebsitePanel.Providers.VirtualizationForPC.HyperVForPC.dll" /> <Content Include="bin\WebsitePanel.Providers.VirtualizationForPC.HyperVForPC.dll" />
<Content Include="bin\WebsitePanel.Providers.VirtualizationForPC.HyperVForPC.pdb" /> <Content Include="bin\WebsitePanel.Providers.VirtualizationForPC.HyperVForPC.pdb" />
<Content Include="bin\WebsitePanel.Providers.Web.HeliconZoo.dll" /> <Content Include="bin\WebsitePanel.Providers.Web.HeliconZoo.dll" />
@ -259,8 +254,6 @@
<Content Include="bin\WebsitePanel.Providers.Web.IIs80.pdb" /> <Content Include="bin\WebsitePanel.Providers.Web.IIs80.pdb" />
<Content Include="bin\WebsitePanel.Providers.Web.WebDav.dll" /> <Content Include="bin\WebsitePanel.Providers.Web.WebDav.dll" />
<Content Include="bin\WebsitePanel.Providers.Web.WebDav.pdb" /> <Content Include="bin\WebsitePanel.Providers.Web.WebDav.pdb" />
<Content Include="bin\WebsitePanel.Server.Client.dll" />
<Content Include="bin\WebsitePanel.Server.Client.pdb" />
<Content Include="bin\WebsitePanel.Server.dll" /> <Content Include="bin\WebsitePanel.Server.dll" />
<Content Include="bin\WebsitePanel.Server.pdb" /> <Content Include="bin\WebsitePanel.Server.pdb" />
<Content Include="bin\WebsitePanel.Server.Utils.dll" /> <Content Include="bin\WebsitePanel.Server.Utils.dll" />
@ -292,6 +285,7 @@
<Content Include="ServiceProvider.asmx" /> <Content Include="ServiceProvider.asmx" />
<Content Include="SharePointServer.asmx" /> <Content Include="SharePointServer.asmx" />
<Content Include="StatisticsServer.asmx" /> <Content Include="StatisticsServer.asmx" />
<Content Include="VirtualizationServer2012.asmx" />
<Content Include="VirtualizationServer.asmx" /> <Content Include="VirtualizationServer.asmx" />
<Content Include="VirtualizationServerForPrivateCloud.asmx" /> <Content Include="VirtualizationServerForPrivateCloud.asmx" />
<Content Include="bin\WebsitePanel.Server.dll.config" /> <Content Include="bin\WebsitePanel.Server.dll.config" />
@ -406,6 +400,10 @@
<DependentUpon>StatisticsServer.asmx</DependentUpon> <DependentUpon>StatisticsServer.asmx</DependentUpon>
<SubType>Component</SubType> <SubType>Component</SubType>
</Compile> </Compile>
<Compile Include="VirtualizationServer2012.asmx.cs">
<DependentUpon>VirtualizationServer2012.asmx</DependentUpon>
<SubType>Component</SubType>
</Compile>
<Compile Include="VirtualizationServer.asmx.cs"> <Compile Include="VirtualizationServer.asmx.cs">
<DependentUpon>VirtualizationServer.asmx</DependentUpon> <DependentUpon>VirtualizationServer.asmx</DependentUpon>
<SubType>Component</SubType> <SubType>Component</SubType>
@ -428,10 +426,6 @@
<Project>{684C932A-6C75-46AC-A327-F3689D89EB42}</Project> <Project>{684C932A-6C75-46AC-A327-F3689D89EB42}</Project>
<Name>WebsitePanel.Providers.Base</Name> <Name>WebsitePanel.Providers.Base</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\WebsitePanel.Server.Client\WebsitePanel.Server.Client.csproj">
<Project>{990c4a2a-34a5-4be0-9546-e10abdfffd0e}</Project>
<Name>WebsitePanel.Server.Client</Name>
</ProjectReference>
<ProjectReference Include="..\WebsitePanel.Server.Utils\WebsitePanel.Server.Utils.csproj"> <ProjectReference Include="..\WebsitePanel.Server.Utils\WebsitePanel.Server.Utils.csproj">
<Project>{E91E52F3-9555-4D00-B577-2B1DBDD87CA7}</Project> <Project>{E91E52F3-9555-4D00-B577-2B1DBDD87CA7}</Project>
<Name>WebsitePanel.Server.Utils</Name> <Name>WebsitePanel.Server.Utils</Name>

View file

@ -0,0 +1 @@
<%@ WebHandler Language="C#" Class="WebsitePanel.WebPortal.WebsitePanelAjaxHandler,WebsitePanel.Portal.Modules" %>

View file

@ -124,7 +124,7 @@
</Group> </Group>
<Group pageID="SpaceHome" titleresourcekey="VPS" disabled="True"> <Group pageID="SpaceHome" titleresourcekey="VPS" disabled="True">
<Icon pageID="SpaceVPS" resourceGroup="VPS" imageUrl="icons/vps_48.png" /> <Icon pageID="SpaceVPS" resourceGroup="VPS" imageUrl="icons/vps_48.png" />
<Icon pageID="SpaceVPS2012" resourceGroup="VPS2012" imageUrl="icons/vps_48.png" /> <Icon pageID="SpaceVPS2012" resourceGroup="VPS2012" imageUrl="icons/vps2012_48.png" />
<Icon pageID="SpaceVPSForPC" resourceGroup="VPSForPC" imageUrl="icons/vpsforpc_48.png" /> <Icon pageID="SpaceVPSForPC" resourceGroup="VPSForPC" imageUrl="icons/vpsforpc_48.png" />
</Group> </Group>
<!-- <!--

View file

@ -21,6 +21,9 @@
<FromEmail> <FromEmail>
</FromEmail> </FromEmail>
<!-- Pages --> <!-- Pages -->
<!--TODO START-->
<SearchObjectPage>SearchObject</SearchObjectPage>
<!--TODO END-->
<DefaultPage>Home</DefaultPage> <DefaultPage>Home</DefaultPage>
<LoginPage>Login</LoginPage> <LoginPage>Login</LoginPage>
<UserHomePage>Home</UserHomePage> <UserHomePage>Home</UserHomePage>

View file

@ -13,6 +13,15 @@
</Controls> </Controls>
</ModuleDefinition> </ModuleDefinition>
<!--TODO START-->
<ModuleDefinition id="SearchObject">
<Controls>
<Control key="" src="WebsitePanel/SearchObject.ascx" title="SearchObject" type="View" />
</Controls>
</ModuleDefinition>
<!--TODO END-->
<!-- Common Modules --> <!-- Common Modules -->
<ModuleDefinition id="SearchUsers"> <ModuleDefinition id="SearchUsers">
<Controls> <Controls>
@ -645,32 +654,33 @@
<ModuleDefinition id="VPS2012"> <ModuleDefinition id="VPS2012">
<Controls> <Controls>
<Control key="" src="WebsitePanel/VPS2012/VdcHome.ascx" title="VdcHome" type="View" /> <Control key="" src="WebsitePanel/VPS2012/VdcHome.ascx" title="VdcHome" type="View" icon="vps2012_48.png" />
<Control key="vdc_create_server" src="WebsitePanel/VPS2012/VdcCreateServer.ascx" title="VdcCreateServer" type="View" /> <Control key="vdc_create_server" src="WebsitePanel/VPS2012/VdcCreateServer.ascx" title="VdcCreateServer" type="View" icon="vps2012_48.png" />
<Control key="vdc_import_server" src="WebsitePanel/VPS2012/VdcImportServer.ascx" title="VdcImportServer" type="View" /> <Control key="vdc_import_server" src="WebsitePanel/VPS2012/VdcImportServer.ascx" title="VdcImportServer" type="View" icon="vps2012_48.png" />
<Control key="vdc_external_network" src="WebsitePanel/VPS2012/VdcExternalNetwork.ascx" title="VdcExternalNetwork" type="View" /> <Control key="vdc_external_network" src="WebsitePanel/VPS2012/VdcExternalNetwork.ascx" title="VdcExternalNetwork" type="View" icon="vps2012_48.png" />
<Control key="vdc_management_network" src="WebsitePanel/VPS2012/VdcManagementNetwork.ascx" title="VdcManagementNetwork" type="View" /> <Control key="vdc_management_network" src="WebsitePanel/VPS2012/VdcManagementNetwork.ascx" title="VdcManagementNetwork" type="View" icon="vps2012_48.png" />
<Control key="vdc_allocate_external_ip" src="WebsitePanel/VPS2012/VdcAddExternalAddress.ascx" title="VdcAddExternalAddress" type="View" /> <Control key="vdc_allocate_external_ip" src="WebsitePanel/VPS2012/VdcAddExternalAddress.ascx" title="VdcAddExternalAddress" type="View" icon="vps2012_48.png" />
<Control key="vdc_private_network" src="WebsitePanel/VPS2012/VdcPrivateNetwork.ascx" title="VdcPrivateNetwork" type="View" /> <Control key="vdc_private_network" src="WebsitePanel/VPS2012/VdcPrivateNetwork.ascx" title="VdcPrivateNetwork" type="View" icon="vps2012_48.png" />
<Control key="vdc_permissions" src="WebsitePanel/VPS2012/VdcPermissions.ascx" title="VdcPermissions" type="View" /> <Control key="vdc_permissions" src="WebsitePanel/VPS2012/VdcPermissions.ascx" title="VdcPermissions" type="View" icon="vps2012_48.png" />
<Control key="vdc_audit_log" src="WebsitePanel/VPS2012/VdcAuditLog.ascx" title="VdcAuditLog" type="View" /> <Control key="vdc_audit_log" src="WebsitePanel/VPS2012/VdcAuditLog.ascx" title="VdcAuditLog" type="View" icon="vps2012_48.png" />
<Control key="vps_general" src="WebsitePanel/VPS2012/VpsDetailsGeneral.ascx" title="VpsDetailsGeneral" type="View" /> <Control key="vps_general" src="WebsitePanel/VPS2012/VpsDetailsGeneral.ascx" title="VpsDetailsGeneral" type="View" icon="vps2012_48.png"/>
<Control key="vps_config" src="WebsitePanel/VPS2012/VpsDetailsConfiguration.ascx" title="VpsDetailsConfiguration" type="View" /> <Control key="vps_config" src="WebsitePanel/VPS2012/VpsDetailsConfiguration.ascx" title="VpsDetailsConfiguration" type="View" icon="vps2012_48.png" />
<Control key="vps_edit_config" src="WebsitePanel/VPS2012/VpsDetailsEditConfiguration.ascx" title="VpsDetailsEditConfiguration" type="View" /> <Control key="vps_edit_config" src="WebsitePanel/VPS2012/VpsDetailsEditConfiguration.ascx" title="VpsDetailsEditConfiguration" type="View" icon="vps2012_48.png" />
<Control key="vps_dvd" src="WebsitePanel/VPS2012/VpsDetailsDvd.ascx" title="VpsDetailsDvd" type="View" /> <Control key="vps_dvd" src="WebsitePanel/VPS2012/VpsDetailsDvd.ascx" title="VpsDetailsDvd" type="View" icon="vps2012_48.png" />
<Control key="vps_insert_dvd" src="WebsitePanel/VPS2012/VpsDetailsInsertDvd.ascx" title="VpsDetailsInsertDvd" type="View" /> <Control key="vps_insert_dvd" src="WebsitePanel/VPS2012/VpsDetailsInsertDvd.ascx" title="VpsDetailsInsertDvd" type="View" icon="vps2012_48.png" />
<Control key="vps_snapshots" src="WebsitePanel/VPS2012/VpsDetailsSnapshots.ascx" title="VpsDetailsSnapshots" type="View" /> <Control key="vps_snapshots" src="WebsitePanel/VPS2012/VpsDetailsSnapshots.ascx" title="VpsDetailsSnapshots" type="View" icon="vps2012_48.png" />
<Control key="vps_network" src="WebsitePanel/VPS2012/VpsDetailsNetwork.ascx" title="VpsDetailsNetwork" type="View" /> <Control key="vps_replication" src="WebsitePanel/VPS2012/VpsDetailsReplications.ascx" title="VpsDetailReplications" type="View" icon="vps2012_48.png" />
<Control key="vps_add_external_ip" src="WebsitePanel/VPS2012/VpsDetailsAddExternalAddress.ascx" title="VpsDetailsAddExternalAddress" type="View" /> <Control key="vps_network" src="WebsitePanel/VPS2012/VpsDetailsNetwork.ascx" title="VpsDetailsNetwork" type="View" icon="vps2012_48.png" />
<Control key="vps_add_private_ip" src="WebsitePanel/VPS2012/VpsDetailsAddPrivateAddress.ascx" title="VpsDetailsAddPrivateAddress" type="View" /> <Control key="vps_add_external_ip" src="WebsitePanel/VPS2012/VpsDetailsAddExternalAddress.ascx" title="VpsDetailsAddExternalAddress" type="View" icon="vps2012_48.png" />
<Control key="vps_permissions" src="WebsitePanel/VPS2012/VpsDetailsPermissions.ascx" title="VpsDetailsNetworking" type="View" /> <Control key="vps_add_private_ip" src="WebsitePanel/VPS2012/VpsDetailsAddPrivateAddress.ascx" title="VpsDetailsAddPrivateAddress" type="View" icon="vps2012_48.png" />
<Control key="vps_tools" src="WebsitePanel/VPS2012/VpsDetailsTools.ascx" title="VpsDetailsTools" type="View" /> <Control key="vps_permissions" src="WebsitePanel/VPS2012/VpsDetailsPermissions.ascx" title="VpsDetailsNetworking" type="View" icon="vps2012_48.png" />
<Control key="vps_audit_log" src="WebsitePanel/VPS2012/VpsDetailsAuditLog.ascx" title="VpsDetailsAuditLog" type="View" /> <Control key="vps_tools" src="WebsitePanel/VPS2012/VpsDetailsTools.ascx" title="VpsDetailsTools" type="View" icon="vps2012_48.png" />
<Control key="vps_help" src="WebsitePanel/VPS2012/VpsDetailsHelp.ascx" title="VpsDetailsHelp" type="View" /> <Control key="vps_audit_log" src="WebsitePanel/VPS2012/VpsDetailsAuditLog.ascx" title="VpsDetailsAuditLog" type="View" icon="vps2012_48.png" />
<Control key="vps_tools_delete" src="WebsitePanel/VPS2012/VpsToolsDeleteServer.ascx" title="VpsToolsDeleteServer" type="View" /> <Control key="vps_help" src="WebsitePanel/VPS2012/VpsDetailsHelp.ascx" title="VpsDetailsHelp" type="View" icon="vps2012_48.png" />
<Control key="vps_tools_move" src="WebsitePanel/VPS2012/VpsMoveServer.ascx" title="VpsMoveServer" type="View" /> <Control key="vps_tools_delete" src="WebsitePanel/VPS2012/VpsToolsDeleteServer.ascx" title="VpsToolsDeleteServer" type="View" icon="vps2012_48.png" />
<Control key="vps_tools_reinstall" src="WebsitePanel/VPS2012/VpsToolsReinstallServer.ascx" title="VpsToolsReinstallServer" type="View" /> <Control key="vps_tools_move" src="WebsitePanel/VPS2012/VpsMoveServer.ascx" title="VpsMoveServer" type="View" icon="vps2012_48.png" />
<Control key="vps_tools_reinstall" src="WebsitePanel/VPS2012/VpsToolsReinstallServer.ascx" title="VpsToolsReinstallServer" type="View" icon="vps2012_48.png" />
</Controls> </Controls>
</ModuleDefinition> </ModuleDefinition>
@ -727,4 +737,11 @@
<Control key="" src="WebsitePanel/OrganizationMenu.ascx" title="OrganizationMenu" type="View" /> <Control key="" src="WebsitePanel/OrganizationMenu.ascx" title="OrganizationMenu" type="View" />
</Controls> </Controls>
</ModuleDefinition> </ModuleDefinition>
<!-- Virtual Personal Servers -->
<ModuleDefinition id="VpsMenu">
<Controls>
<Control key="" src="WebsitePanel/VpsMenu.ascx" title="VpsMenu" type="View" />
</Controls>
</ModuleDefinition>
</ModuleDefinitions> </ModuleDefinitions>

View file

@ -26,6 +26,14 @@
</Content> </Content>
</Page> </Page>
<!--TODO START-->
<Page name="SearchObject" roles="Administrator,Reseller,PlatformCSR,ResellerCSR,PlatformHelpdesk,ResellerHelpdesk,User" hidden="True" skin="Browse1.ascx">
<Content id="ContentPane">
<Module moduleDefinitionID="SearchObject" title="SearchObject" icon="sphere_zoom_48.png" container="Edit.ascx" />
</Content>
</Page>
<!--TODO END-->
<Page name="SearchSpaces" roles="Administrator,Reseller,PlatformCSR,ResellerCSR,PlatformHelpdesk,ResellerHelpdesk,User" hidden="True" skin="Browse1.ascx"> <Page name="SearchSpaces" roles="Administrator,Reseller,PlatformCSR,ResellerCSR,PlatformHelpdesk,ResellerHelpdesk,User" hidden="True" skin="Browse1.ascx">
<Content id="ContentPane"> <Content id="ContentPane">
<Module moduleDefinitionID="SearchSpaces" title="SearchSpaces" icon="sphere_zoom_48.png" container="Edit.ascx" /> <Module moduleDefinitionID="SearchSpaces" title="SearchSpaces" icon="sphere_zoom_48.png" container="Edit.ascx" />
@ -652,7 +660,7 @@
</Content> </Content>
</Page> </Page>
<Page name="SpaceVPS2012" roles="Administrator,Reseller,PlatformCSR,ResellerCSR,PlatformHelpdesk,ResellerHelpdesk,User" hidden="True" skin="VPS.ascx" adminskin="VPS.ascx"> <Page name="SpaceVPS2012" roles="Administrator,Reseller,PlatformCSR,ResellerCSR,PlatformHelpdesk,ResellerHelpdesk,User" hidden="True">
<Content id="LeftPane"> <Content id="LeftPane">
<Module moduleDefinitionID="UserAccountMenu" title="UserMenu" container="Clear.ascx"> <Module moduleDefinitionID="UserAccountMenu" title="UserMenu" container="Clear.ascx">
<ModuleData ref="UserMenu"/> <ModuleData ref="UserMenu"/>
@ -660,9 +668,11 @@
<Module moduleDefinitionID="SpaceMenu" title="SpaceMenu" container="Clear.ascx"> <Module moduleDefinitionID="SpaceMenu" title="SpaceMenu" container="Clear.ascx">
<ModuleData ref="SpaceMenu"/> <ModuleData ref="SpaceMenu"/>
</Module> </Module>
<Module moduleDefinitionID="VpsMenu" title="VpsMenu" container="Clear.ascx">
</Module>
</Content> </Content>
<Content id="ContentPane"> <Content id="ContentPane">
<Module moduleDefinitionID="VPS2012" title="VirtualPrivateServers2012" icon="" container="VPS2012.ascx" admincontainer="VPS2012.ascx" readOnlyRoles="PlatformCSR,ResellerCSR"/> <Module moduleDefinitionID="VPS2012" title="VirtualPrivateServers2012" icon="vps2012_48.png" readOnlyRoles="PlatformCSR,ResellerCSR"/>
</Content> </Content>
</Page> </Page>

View file

@ -711,6 +711,9 @@
<data name="ModuleTitle.SearchSpaces" xml:space="preserve"> <data name="ModuleTitle.SearchSpaces" xml:space="preserve">
<value>Search Hosting Spaces</value> <value>Search Hosting Spaces</value>
</data> </data>
<data name="ModuleTitle.SearchObject" xml:space="preserve">
<value>Search Objects</value>
</data>
<data name="ModuleTitle.SearchUsers" xml:space="preserve"> <data name="ModuleTitle.SearchUsers" xml:space="preserve">
<value>Search User Accounts</value> <value>Search User Accounts</value>
</data> </data>
@ -813,4 +816,83 @@
<data name="ModuleTitle.RDSServersEditServer" xml:space="preserve"> <data name="ModuleTitle.RDSServersEditServer" xml:space="preserve">
<value>Edit RDS Server</value> <value>Edit RDS Server</value>
</data> </data>
<data name="ModuleTitle.VirtualPrivateServers2012" xml:space="preserve">
<value>Virtual Private Servers</value>
</data>
<data name="ModuleTitle.VdcCreateServer" xml:space="preserve">
<value>Create New VPS</value>
</data>
<data name="ModuleTitle.VdcImportServer" xml:space="preserve">
<value>Import VPS</value>
</data>
<data name="ModuleTitle.VdcExternalNetwork" xml:space="preserve">
<value>External Network</value>
</data>
<data name="ModuleTitle.VdcManagementNetwork" xml:space="preserve">
<value>Management Network</value>
</data>
<data name="ModuleTitle.VdcAddExternalAddress" xml:space="preserve">
<value>Allocate IP Addresses</value>
</data>
<data name="ModuleTitle.VdcPrivateNetwork" xml:space="preserve">
<value>Private Network</value>
</data>
<data name="ModuleTitle.VdcPermissions" xml:space="preserve">
<value>User Permissions</value>
</data>
<data name="ModuleTitle.VdcAuditLog" xml:space="preserve">
<value>Audit Log</value>
</data>
<data name="ModuleTitle.VpsDetailsGeneral" xml:space="preserve">
<value>General</value>
</data>
<data name="ModuleTitle.VpsDetailsConfiguration" xml:space="preserve">
<value>Configuration</value>
</data>
<data name="ModuleTitle.VpsDetailsEditConfiguration" xml:space="preserve">
<value>Edit Configuration</value>
</data>
<data name="ModuleTitle.VpsDetailsDvd" xml:space="preserve">
<value>DVD</value>
</data>
<data name="ModuleTitle.VpsDetailsInsertDvd" xml:space="preserve">
<value>DVD</value>
</data>
<data name="ModuleTitle.VpsDetailsSnapshots" xml:space="preserve">
<value>Snapshots</value>
</data>
<data name="ModuleTitle.VpsDetailReplications" xml:space="preserve">
<value>Replication</value>
</data>
<data name="ModuleTitle.VpsDetailsNetwork" xml:space="preserve">
<value>Network</value>
</data>
<data name="ModuleTitle.VpsDetailsAddExternalAddress" xml:space="preserve">
<value>Network</value>
</data>
<data name="ModuleTitle.VpsDetailsAddPrivateAddress" xml:space="preserve">
<value>Network</value>
</data>
<data name="ModuleTitle.VpsDetailsNetworking" xml:space="preserve">
<value>Permissions</value>
</data>
<data name="ModuleTitle.VpsDetailsTools" xml:space="preserve">
<value>Tools</value>
</data>
<data name="ModuleTitle.VpsDetailsAuditLog" xml:space="preserve">
<value>Audit Log</value>
</data>
<data name="ModuleTitle.VpsDetailsHelp" xml:space="preserve">
<value>Help</value>
</data>
<data name="ModuleTitle.VpsToolsDeleteServer" xml:space="preserve">
<value>Delete Server</value>
</data>
<data name="ModuleTitle.VpsMoveServer" xml:space="preserve">
<value>Move VPS</value>
</data>
<data name="ModuleTitle.VpsToolsReinstallServer" xml:space="preserve">
<value>Re-install Server</value>
</data>
</root> </root>

View file

@ -141,6 +141,12 @@
<data name="PageTitle.SearchSpaces" xml:space="preserve"> <data name="PageTitle.SearchSpaces" xml:space="preserve">
<value>{user} - Search Hosting Spaces</value> <value>{user} - Search Hosting Spaces</value>
</data> </data>
<data name="PageName.SearchObject" xml:space="preserve">
<value>Search Objects</value>
</data>
<data name="PageTitle.SearchObject" xml:space="preserve">
<value>{user} - Search Objects</value>
</data>
<data name="PageName.Home" xml:space="preserve"> <data name="PageName.Home" xml:space="preserve">
<value>Account Home</value> <value>Account Home</value>
</data> </data>

View file

@ -4075,6 +4075,53 @@
<data name="Error.VPS_ERROR_TAKE_SNAPSHOT" xml:space="preserve"> <data name="Error.VPS_ERROR_TAKE_SNAPSHOT" xml:space="preserve">
<value>Cannot take virtual machine snapshot</value> <value>Cannot take virtual machine snapshot</value>
</data> </data>
<data name="Error.VPS_ERROR_SET_VM_REPLICATION" xml:space="preserve">
<value>Cannot enable/set replication for the virtual machine</value>
</data>
<data name="Error.VPS_ERROR_DISABLE_VM_REPLICATION" xml:space="preserve">
<value>Cannot disable replication for the virtual machine</value>
</data>
<data name="Error.VPS_ERROR_GET_VM_REPLICATION" xml:space="preserve">
<value>Cannot get replication for the virtual machine</value>
</data>
<data name="Error.VPS_SET_REPLICA_SERVER_ERROR" xml:space="preserve">
<value>Cannot set replication for the server</value>
</data>
<data name="Error.VPS_UNSET_REPLICA_SERVER_ERROR" xml:space="preserve">
<value>Cannot unset replication for the server</value>
</data>
<data name="Error.VPS_NO_REPLICA_SERVER_ERROR" xml:space="preserve">
<value>Cannot find replication server</value>
</data>
<data name="Error.VPS_SET_REPLICATION_ERROR" xml:space="preserve">
<value>Cannot enable\set replication for the virtual machine</value>
</data>
<data name="Success.VPS_SET_REPLICATION_ERROR" xml:space="preserve">
<value>Replication set\enabled for the virtual machine</value>
</data>
<data name="Error.VPS_DISABLE_REPLICATION_ERROR" xml:space="preserve">
<value>Cannot disable replication for the virtual machine</value>
</data>
<data name="Success.VPS_DISABLE_REPLICATION_ERROR" xml:space="preserve">
<value>Replication disabled for the virtual machine</value>
</data>
<data name="Error.VPS_PAUSE_REPLICATION_ERROR" xml:space="preserve">
<value>Cannot pause replication for the virtual machine</value>
</data>
<data name="Success.VPS_PAUSE_REPLICATION_ERROR" xml:space="preserve">
<value>Replication paused for the virtual machine</value>
</data>
<data name="Error.VPS_RESUME_REPLICATION_ERROR" xml:space="preserve">
<value>Cannot resume replication for the virtual machine</value>
</data>
<data name="Success.VPS_RESUME_REPLICATION_ERROR" xml:space="preserve">
<value>Replication resumed for the virtual machine</value>
</data>
<data name="Error.VPS_REQUIRED" xml:space="preserve">
<value>Please fill required fields</value>
</data>
<data name="VPS.VPS_JOB_FAILED_ERROR" xml:space="preserve"> <data name="VPS.VPS_JOB_FAILED_ERROR" xml:space="preserve">
<value>Job execution failed with the following code: {1}</value> <value>Job execution failed with the following code: {1}</value>
</data> </data>

View file

@ -41,4 +41,5 @@ Default skin template. The following skins are provided as examples only.
<asp:ImageButton SkinID="ApplySmall" runat="server" ImageUrl="Images/apply_16.png" ImageAlign="AbsMiddle" Width="16" Height="16"/> <asp:ImageButton SkinID="ApplySmall" runat="server" ImageUrl="Images/apply_16.png" ImageAlign="AbsMiddle" Width="16" Height="16"/>
<asp:ImageButton SkinID="VpsDelete" runat="server" ImageUrl="Images/VPS/delete.png" ImageAlign="AbsMiddle" Width="16" Height="16"/> <asp:ImageButton SkinID="VpsDelete" runat="server" ImageUrl="Images/VPS/delete.png" ImageAlign="AbsMiddle" Width="16" Height="16"/>
<asp:ImageButton SkinID="VpsDelete2012" runat="server" ImageUrl="Images/VPS2012/delete.png" ImageAlign="AbsMiddle" Width="16" Height="16"/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B

View file

@ -44,6 +44,8 @@ Default skin template. The following skins are provided as examples only.
<asp:Image runat="server" SkinID="OptionEnabled" ImageUrl="images/Exchange/checkbox.png" ImageAlign="AbsMiddle" Width="16" Height="16" /> <asp:Image runat="server" SkinID="OptionEnabled" ImageUrl="images/Exchange/checkbox.png" ImageAlign="AbsMiddle" Width="16" Height="16" />
<asp:Image runat="server" SkinID="OptionDisabled" ImageUrl="images/VPS/delete.png" ImageAlign="AbsMiddle" Width="16" Height="16" /> <asp:Image runat="server" SkinID="OptionDisabled" ImageUrl="images/VPS/delete.png" ImageAlign="AbsMiddle" Width="16" Height="16" />
<asp:Image runat="server" SkinID="OptionDisabled2012" ImageUrl="images/VPS2012/delete.png" ImageAlign="AbsMiddle" Width="16" Height="16" />
<asp:Image runat="server" SkinID="Vps16" ImageUrl="images/VPS/server.png" ImageAlign="AbsMiddle" Width="16" Height="16" /> <asp:Image runat="server" SkinID="Vps16" ImageUrl="images/VPS/server.png" ImageAlign="AbsMiddle" Width="16" Height="16" />
<asp:Image runat="server" SkinID="Vps2012_16" ImageUrl="images/VPS2012/server.png" ImageAlign="AbsMiddle" Width="16" Height="16" />
<asp:Image runat="server" SkinID="Rdc16" ImageUrl="images/VPS/rdc16.png" ImageAlign="AbsMiddle" Width="16" Height="16" /> <asp:Image runat="server" SkinID="Rdc16" ImageUrl="images/VPS/rdc16.png" ImageAlign="AbsMiddle" Width="16" Height="16" />

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 800 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 B

Some files were not shown because too many files have changed in this diff Show more