Merge
This commit is contained in:
commit
c07c84a750
47 changed files with 1216 additions and 1134 deletions
|
@ -12,3 +12,30 @@ BEGIN
|
||||||
END
|
END
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
-- registering MySQL 5.5 provider
|
||||||
|
IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [DisplayName] = 'MySQL Server 5.5')
|
||||||
|
BEGIN
|
||||||
|
-- provider
|
||||||
|
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (301, 11, N'MySQL', N'MySQL Server 5.5', N'WebsitePanel.Providers.Database.MySqlServer55, WebsitePanel.Providers.Database.MySQL', N'MySQL', NULL)
|
||||||
|
-- properties
|
||||||
|
INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (301, N'ExternalAddress', N'localhost')
|
||||||
|
INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (301, N'InstallFolder', N'%PROGRAMFILES%\MySQL\MySQL Server 5.5')
|
||||||
|
INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (301, N'InternalAddress', N'localhost,3306')
|
||||||
|
INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (301, N'RootLogin', N'root')
|
||||||
|
INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (301, N'RootPassword', N'')
|
||||||
|
END
|
||||||
|
GO
|
||||||
|
|
||||||
|
-- registering SmarterMail 9.x provider
|
||||||
|
IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [DisplayName] = 'SmarterMail 9.x')
|
||||||
|
BEGIN
|
||||||
|
-- provider
|
||||||
|
INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (65, 4, N'SmarterMail', N'SmarterMail 9.x', N'WebsitePanel.Providers.Mail.SmarterMail9, WebsitePanel.Providers.Mail.SmarterMail9', N'SmarterMail60', NULL)
|
||||||
|
-- properties
|
||||||
|
INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (65, N'AdminPassword', N'')
|
||||||
|
INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (65, N'AdminUsername', N'admin')
|
||||||
|
INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (65, N'DomainsPath', N'%SYSTEMDRIVE%\SmarterMail')
|
||||||
|
INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (65, N'ServerIPAddress', N'127.0.0.1;127.0.0.1')
|
||||||
|
INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (65, N'ServiceUrl', N'http://localhost:9998/services/')
|
||||||
|
END
|
||||||
|
GO
|
Binary file not shown.
|
@ -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.235
|
// Runtime Version:4.0.30319.239
|
||||||
//
|
//
|
||||||
// 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.
|
||||||
|
|
|
@ -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.235
|
' Runtime Version:4.0.30319.239
|
||||||
'
|
'
|
||||||
' 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.
|
||||||
|
|
|
@ -29,8 +29,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Products.Hosti
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Products.HostingPlan", "WebsitePanel.Products.HostingPlan\WebsitePanel.Products.HostingPlan.csproj", "{65FEDD1B-379C-413D-84D8-20E6C29C645D}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Products.HostingPlan", "WebsitePanel.Products.HostingPlan\WebsitePanel.Products.HostingPlan.csproj", "{65FEDD1B-379C-413D-84D8-20E6C29C645D}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Plugins.Directi", "WebsitePanel.Registrars.Directi\WebsitePanel.Plugins.Directi.csproj", "{823D6FA5-F84F-4E50-9091-040C256955A5}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Plugins.Enom", "WebsitePanel.Registrars.Enom\WebsitePanel.Plugins.Enom.csproj", "{39A6F585-4A27-4AAA-A43F-858FC32ADF98}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Plugins.Enom", "WebsitePanel.Registrars.Enom\WebsitePanel.Plugins.Enom.csproj", "{39A6F585-4A27-4AAA-A43F-858FC32ADF98}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Common.Utils", "WebsitePanel.Common.Utils\WebsitePanel.Common.Utils.csproj", "{53D22D35-4013-415F-BA09-F67A0DBBB0C1}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Common.Utils", "WebsitePanel.Common.Utils\WebsitePanel.Common.Utils.csproj", "{53D22D35-4013-415F-BA09-F67A0DBBB0C1}"
|
||||||
|
@ -81,10 +79,6 @@ Global
|
||||||
{338F816B-BEB4-4F18-9EA1-2EFD35DBA65B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{338F816B-BEB4-4F18-9EA1-2EFD35DBA65B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{65FEDD1B-379C-413D-84D8-20E6C29C645D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{65FEDD1B-379C-413D-84D8-20E6C29C645D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{65FEDD1B-379C-413D-84D8-20E6C29C645D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{65FEDD1B-379C-413D-84D8-20E6C29C645D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{823D6FA5-F84F-4E50-9091-040C256955A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{823D6FA5-F84F-4E50-9091-040C256955A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{823D6FA5-F84F-4E50-9091-040C256955A5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{823D6FA5-F84F-4E50-9091-040C256955A5}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{39A6F585-4A27-4AAA-A43F-858FC32ADF98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{39A6F585-4A27-4AAA-A43F-858FC32ADF98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{39A6F585-4A27-4AAA-A43F-858FC32ADF98}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{39A6F585-4A27-4AAA-A43F-858FC32ADF98}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{39A6F585-4A27-4AAA-A43F-858FC32ADF98}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{39A6F585-4A27-4AAA-A43F-858FC32ADF98}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
</configSections>
|
</configSections>
|
||||||
<!-- Connection strings -->
|
<!-- Connection strings -->
|
||||||
<connectionStrings>
|
<connectionStrings>
|
||||||
<add name="EnterpriseServer" connectionString="${installer.connectionstring}" providerName="System.Data.SqlClient"/>
|
<add name="EnterpriseServer" connectionString="Server=(local)\SQLExpress;Database=WebsitePanel;uid=WebsitePanel;pwd=Password12" providerName="System.Data.SqlClient"/>
|
||||||
</connectionStrings>
|
</connectionStrings>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<!-- Encryption util settings -->
|
<!-- Encryption util settings -->
|
||||||
<add key="WebsitePanel.CryptoKey" value="${installer.cryptokey}"/>
|
<add key="WebsitePanel.CryptoKey" value="1234567890"/>
|
||||||
<!-- A1D4KDHUE83NKHddF -->
|
<!-- A1D4KDHUE83NKHddF -->
|
||||||
<add key="WebsitePanel.EncryptionEnabled" value="true"/>
|
<add key="WebsitePanel.EncryptionEnabled" value="true"/>
|
||||||
<!-- Web Applications -->
|
<!-- Web Applications -->
|
||||||
|
|
|
@ -47,7 +47,6 @@ namespace WebsitePanel.Providers.Web
|
||||||
private string siteId;
|
private string siteId;
|
||||||
private string siteIPAddress;
|
private string siteIPAddress;
|
||||||
private int siteIPAddressId;
|
private int siteIPAddressId;
|
||||||
private string logsPath;
|
|
||||||
private string dataPath;
|
private string dataPath;
|
||||||
private ServerBinding[] bindings;
|
private ServerBinding[] bindings;
|
||||||
private bool frontPageAvailable;
|
private bool frontPageAvailable;
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="SDNSAPI">
|
<Reference Include="SDNSAPI">
|
||||||
<HintPath>..\..\..\..\..\WebsitePanel.bak\WebsitePanel\Branches\1.2.0\Lib\References\SimpleDNS\SDNSAPI.dll</HintPath>
|
<HintPath>..\..\Lib\References\SimpleDNS\SDNSAPI.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// Copyright (c) 2010, SMB SAAS Systems Inc.
|
// Copyright (c) 2011, Outercurve Foundation.
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without modification,
|
// Redistribution and use in source and binary forms, with or without modification,
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
// this list of conditions and the following disclaimer in the documentation
|
// this list of conditions and the following disclaimer in the documentation
|
||||||
// and/or other materials provided with the distribution.
|
// and/or other materials provided with the distribution.
|
||||||
//
|
//
|
||||||
// - Neither the name of the SMB SAAS Systems Inc. nor the names of its
|
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||||
// contributors may be used to endorse or promote products derived from this
|
// contributors may be used to endorse or promote products derived from this
|
||||||
// software without specific prior written permission.
|
// software without specific prior written permission.
|
||||||
//
|
//
|
||||||
|
|
|
@ -80,31 +80,31 @@
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Exchange.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Exchange.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\WebsitePanel.bak\WebsitePanel\Branches\1.2.0\Lib\References\Microsoft\Microsoft.Exchange.Common.dll</HintPath>
|
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Exchange.Common.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Exchange.Data, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Exchange.Data, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\WebsitePanel.bak\WebsitePanel\Branches\1.2.0\Lib\References\Microsoft\Microsoft.Exchange.Data.dll</HintPath>
|
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Exchange.Data.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Exchange.Data.Directory, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Exchange.Data.Directory, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\WebsitePanel.bak\WebsitePanel\Branches\1.2.0\Lib\References\Microsoft\Microsoft.Exchange.Data.Directory.dll</HintPath>
|
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Exchange.Data.Directory.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Exchange.Data.Storage, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Exchange.Data.Storage, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\WebsitePanel.bak\WebsitePanel\Branches\1.2.0\Lib\References\Microsoft\Microsoft.Exchange.Data.Storage.dll</HintPath>
|
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Exchange.Data.Storage.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Exchange.Diagnostics, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Exchange.Diagnostics, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\WebsitePanel.bak\WebsitePanel\Branches\1.2.0\Lib\References\Microsoft\Microsoft.Exchange.Diagnostics.dll</HintPath>
|
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Exchange.Diagnostics.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Exchange.Extensibility.Internal, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Exchange.Extensibility.Internal, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\WebsitePanel.bak\WebsitePanel\Branches\1.2.0\Lib\References\Microsoft\Microsoft.Exchange.Extensibility.Internal.dll</HintPath>
|
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Exchange.Extensibility.Internal.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Exchange.Net, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Exchange.Net, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\..\WebsitePanel.bak\WebsitePanel\Branches\1.2.0\Lib\References\Microsoft\Microsoft.Exchange.Net.dll</HintPath>
|
<HintPath>..\..\Lib\References\Microsoft\Microsoft.Exchange.Net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.SharePoint">
|
<Reference Include="Microsoft.SharePoint">
|
||||||
<HintPath>..\..\Lib\References\Microsoft\Microsoft.SharePoint.dll</HintPath>
|
<HintPath>..\..\Lib\References\Microsoft\Microsoft.SharePoint.dll</HintPath>
|
||||||
|
|
|
@ -1,4 +1,32 @@
|
||||||
using System;
|
// Copyright (c) 2011, 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.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
|
@ -1,4 +1,32 @@
|
||||||
using System;
|
// Copyright (c) 2011, 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.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// Copyright (c) 2010, SMB SAAS Systems Inc.
|
// Copyright (c) 2011, Outercurve Foundation.
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without modification,
|
// Redistribution and use in source and binary forms, with or without modification,
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
// this list of conditions and the following disclaimer in the documentation
|
// this list of conditions and the following disclaimer in the documentation
|
||||||
// and/or other materials provided with the distribution.
|
// and/or other materials provided with the distribution.
|
||||||
//
|
//
|
||||||
// - Neither the name of the SMB SAAS Systems Inc. nor the names of its
|
// - Neither the name of the Outercurve Foundation nor the names of its
|
||||||
// contributors may be used to endorse or promote products derived from this
|
// contributors may be used to endorse or promote products derived from this
|
||||||
// software without specific prior written permission.
|
// software without specific prior written permission.
|
||||||
//
|
//
|
||||||
|
|
|
@ -908,7 +908,7 @@ namespace WebsitePanel.Providers.VirtualizationForPC
|
||||||
steps.AppendLine("VM created");
|
steps.AppendLine("VM created");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (System.TimeoutException ex)
|
catch (System.TimeoutException)
|
||||||
{
|
{
|
||||||
vmTemplate.ProvisioningStatus = VirtualMachineProvisioningStatus.InProgress;
|
vmTemplate.ProvisioningStatus = VirtualMachineProvisioningStatus.InProgress;
|
||||||
}
|
}
|
||||||
|
@ -1064,38 +1064,32 @@ namespace WebsitePanel.Providers.VirtualizationForPC
|
||||||
{
|
{
|
||||||
List<Virtualization.VirtualNetworkInfo> result = new List<Virtualization.VirtualNetworkInfo>();
|
List<Virtualization.VirtualNetworkInfo> result = new List<Virtualization.VirtualNetworkInfo>();
|
||||||
|
|
||||||
try
|
using (WSPVirtualMachineManagementServiceClient client = GetVMMSClient())
|
||||||
{
|
{
|
||||||
using (WSPVirtualMachineManagementServiceClient client = GetVMMSClient())
|
VirtualizationForPC.SVMMService.VirtualNetworkInfo[] networks = client.GetVirtualNetworkByHost(hostInfo);
|
||||||
|
foreach (var item in networks)
|
||||||
{
|
{
|
||||||
VirtualizationForPC.SVMMService.VirtualNetworkInfo[] networks = client.GetVirtualNetworkByHost(hostInfo);
|
result.Add(
|
||||||
foreach (var item in networks)
|
new Virtualization.VirtualNetworkInfo
|
||||||
{
|
{
|
||||||
result.Add(
|
BoundToVMHost = item.BoundToVMHost,
|
||||||
new Virtualization.VirtualNetworkInfo
|
DefaultGatewayAddress = item.DefaultGatewayAddress,
|
||||||
{
|
Description = item.Description,
|
||||||
BoundToVMHost = item.BoundToVMHost,
|
DNSServers = item.DNSServers,
|
||||||
DefaultGatewayAddress = item.DefaultGatewayAddress,
|
EnablingIPAddress = item.EnablingIPAddress,
|
||||||
Description = item.Description,
|
HighlyAvailable = item.HighlyAvailable,
|
||||||
DNSServers = item.DNSServers,
|
HostBoundVlanId = item.HostBoundVlanId,
|
||||||
EnablingIPAddress = item.EnablingIPAddress,
|
Id = item.Id,
|
||||||
HighlyAvailable = item.HighlyAvailable,
|
Name = item.Name,
|
||||||
HostBoundVlanId = item.HostBoundVlanId,
|
NetworkAddress = item.NetworkAddress,
|
||||||
Id = item.Id,
|
NetworkMask = item.NetworkMask,
|
||||||
Name = item.Name,
|
Tag = item.Tag,
|
||||||
NetworkAddress = item.NetworkAddress,
|
VMHost = item.VMHost.ComputerName,
|
||||||
NetworkMask = item.NetworkMask,
|
VMHostId = item.VMHostId,
|
||||||
Tag = item.Tag,
|
WINServers = item.WINServers
|
||||||
VMHost = item.VMHost.ComputerName,
|
});
|
||||||
VMHostId = item.VMHostId,
|
|
||||||
WINServers = item.WINServers
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
return result.ToArray();
|
return result.ToArray();
|
||||||
|
|
||||||
|
@ -1287,35 +1281,29 @@ namespace WebsitePanel.Providers.VirtualizationForPC
|
||||||
|
|
||||||
List<VirtualMachineSnapshot> ret = new List<VirtualMachineSnapshot>();
|
List<VirtualMachineSnapshot> ret = new List<VirtualMachineSnapshot>();
|
||||||
|
|
||||||
try
|
using (WSPVirtualMachineManagementServiceClient client = GetVMMSClient())
|
||||||
{
|
{
|
||||||
using (WSPVirtualMachineManagementServiceClient client = GetVMMSClient())
|
VMCheckpointInfo[] chkPtnList = client.GetVirtualMachineByName(vmId).VMCheckpoints;
|
||||||
{
|
|
||||||
VMCheckpointInfo[] chkPtnList = client.GetVirtualMachineByName(vmId).VMCheckpoints;
|
|
||||||
|
|
||||||
if (chkPtnList != null)
|
if (chkPtnList != null)
|
||||||
|
{
|
||||||
|
foreach (VMCheckpointInfo curr in chkPtnList)
|
||||||
{
|
{
|
||||||
foreach (VMCheckpointInfo curr in chkPtnList)
|
ret.Add(new VirtualMachineSnapshot()
|
||||||
{
|
{
|
||||||
ret.Add(new VirtualMachineSnapshot()
|
Created = curr.AddedTime
|
||||||
{
|
,
|
||||||
Created = curr.AddedTime
|
Id = curr.Id.ToString()
|
||||||
,
|
,
|
||||||
Id = curr.Id.ToString()
|
Name = curr.Name
|
||||||
,
|
,
|
||||||
Name = curr.Name
|
CheckPointId = curr.CheckpointID
|
||||||
,
|
,
|
||||||
CheckPointId = curr.CheckpointID
|
ParentId = curr.ParentCheckpointID
|
||||||
,
|
});
|
||||||
ParentId = curr.ParentCheckpointID
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -1338,7 +1326,7 @@ namespace WebsitePanel.Providers.VirtualizationForPC
|
||||||
client.NewVirtualMachineCheckpoint(vm.Id, String.Format("{0} - {1}", vm.Name, DateTime.Now), String.Empty);
|
client.NewVirtualMachineCheckpoint(vm.Id, String.Format("{0} - {1}", vm.Name, DateTime.Now), String.Empty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (TimeoutException ext)
|
catch (TimeoutException)
|
||||||
{
|
{
|
||||||
ret.ReturnValue = ReturnCode.JobStarted;
|
ret.ReturnValue = ReturnCode.JobStarted;
|
||||||
}
|
}
|
||||||
|
@ -1368,7 +1356,7 @@ namespace WebsitePanel.Providers.VirtualizationForPC
|
||||||
client.RestoreVirtualMachineCheckpoint(snapshotId);
|
client.RestoreVirtualMachineCheckpoint(snapshotId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (TimeoutException ext)
|
catch (TimeoutException)
|
||||||
{
|
{
|
||||||
error = true;
|
error = true;
|
||||||
ret.ReturnValue = ReturnCode.JobStarted;
|
ret.ReturnValue = ReturnCode.JobStarted;
|
||||||
|
@ -1856,25 +1844,19 @@ namespace WebsitePanel.Providers.VirtualizationForPC
|
||||||
public WSPVirtualMachineManagementServiceClient GetVMMSClient()
|
public WSPVirtualMachineManagementServiceClient GetVMMSClient()
|
||||||
{
|
{
|
||||||
WSPVirtualMachineManagementServiceClient ret;
|
WSPVirtualMachineManagementServiceClient ret;
|
||||||
try
|
|
||||||
|
if (!String.IsNullOrWhiteSpace(SCVMMServer)
|
||||||
|
&& !String.IsNullOrWhiteSpace(SCVMMPrincipalName))
|
||||||
{
|
{
|
||||||
if (!String.IsNullOrWhiteSpace(SCVMMServer)
|
EndpointAddress endPointAddress = GetEndPointAddress(SCVMMServer, SCVMMPrincipalName);
|
||||||
&& !String.IsNullOrWhiteSpace(SCVMMPrincipalName))
|
|
||||||
{
|
|
||||||
EndpointAddress endPointAddress = GetEndPointAddress(SCVMMServer, SCVMMPrincipalName);
|
|
||||||
|
|
||||||
ret = new WSPVirtualMachineManagementServiceClient(new WSHttpBinding("WSHttpBinding_IVirtualMachineManagementService"), endPointAddress);
|
ret = new WSPVirtualMachineManagementServiceClient(new WSHttpBinding("WSHttpBinding_IVirtualMachineManagementService"), endPointAddress);
|
||||||
|
|
||||||
VersionInfo ver = new VersionInfo();
|
VersionInfo ver = new VersionInfo();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw new Exception("SCVMMServer or SCVMMPrincipalName is empty");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
else
|
||||||
{
|
{
|
||||||
throw;
|
throw new Exception("SCVMMServer or SCVMMPrincipalName is empty");
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -1884,23 +1866,16 @@ namespace WebsitePanel.Providers.VirtualizationForPC
|
||||||
{
|
{
|
||||||
WSPMonitoringServiceClient ret;
|
WSPMonitoringServiceClient ret;
|
||||||
|
|
||||||
try
|
if (!String.IsNullOrWhiteSpace(SCOMServer)
|
||||||
|
&& !String.IsNullOrWhiteSpace(SCOMPrincipalName))
|
||||||
{
|
{
|
||||||
if (!String.IsNullOrWhiteSpace(SCOMServer)
|
EndpointAddress endPointAddress = GetEndPointAddress(SCOMServer, SCOMPrincipalName);
|
||||||
&& !String.IsNullOrWhiteSpace(SCOMPrincipalName))
|
|
||||||
{
|
|
||||||
EndpointAddress endPointAddress = GetEndPointAddress(SCOMServer, SCOMPrincipalName);
|
|
||||||
|
|
||||||
ret = new WSPMonitoringServiceClient(new WSHttpBinding("WSHttpBinding_IMonitoringService"), endPointAddress);
|
ret = new WSPMonitoringServiceClient(new WSHttpBinding("WSHttpBinding_IMonitoringService"), endPointAddress);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw new Exception("MonitoringServer or MonitoringPrincipalName is empty");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
else
|
||||||
{
|
{
|
||||||
throw;
|
throw new Exception("MonitoringServer or MonitoringPrincipalName is empty");
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -41,23 +41,20 @@ namespace WebsitePanel.Providers.Web.Iis.Authentication
|
||||||
public const string UserNameAttribute = "userName";
|
public const string UserNameAttribute = "userName";
|
||||||
public const string PasswordAttribute = "password";
|
public const string PasswordAttribute = "password";
|
||||||
|
|
||||||
public PropertyBag GetAuthenticationSettings(string siteId)
|
public PropertyBag GetAuthenticationSettings(ServerManager srvman, string siteId)
|
||||||
{
|
{
|
||||||
using (var srvman = GetServerManager())
|
var config = srvman.GetApplicationHostConfiguration();
|
||||||
{
|
//
|
||||||
var config = srvman.GetApplicationHostConfiguration();
|
var section = config.GetSection(Constants.AnonymousAuthenticationSection, siteId);
|
||||||
//
|
//
|
||||||
var section = config.GetSection(Constants.AnonymousAuthenticationSection, siteId);
|
PropertyBag bag = new PropertyBag();
|
||||||
//
|
//
|
||||||
PropertyBag bag = new PropertyBag();
|
bag[AuthenticationGlobals.AnonymousAuthenticationUserName] = Convert.ToString(section.GetAttributeValue(UserNameAttribute));
|
||||||
//
|
bag[AuthenticationGlobals.AnonymousAuthenticationPassword] = Convert.ToString(section.GetAttributeValue(PasswordAttribute));
|
||||||
bag[AuthenticationGlobals.AnonymousAuthenticationUserName] = Convert.ToString(section.GetAttributeValue(UserNameAttribute));
|
bag[AuthenticationGlobals.Enabled] = Convert.ToBoolean(section.GetAttributeValue(EnabledAttribute));
|
||||||
bag[AuthenticationGlobals.AnonymousAuthenticationPassword] = Convert.ToString(section.GetAttributeValue(PasswordAttribute));
|
bag[AuthenticationGlobals.IsLocked] = section.IsLocked;
|
||||||
bag[AuthenticationGlobals.Enabled] = Convert.ToBoolean(section.GetAttributeValue(EnabledAttribute));
|
//
|
||||||
bag[AuthenticationGlobals.IsLocked] = section.IsLocked;
|
return bag;
|
||||||
//
|
|
||||||
return bag;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetAuthenticationSettings(string virtualPath, string userName,
|
public void SetAuthenticationSettings(string virtualPath, string userName,
|
||||||
|
|
|
@ -37,16 +37,13 @@ namespace WebsitePanel.Providers.Web.Iis.Authentication
|
||||||
{
|
{
|
||||||
public const string EnabledAttribute = "enabled";
|
public const string EnabledAttribute = "enabled";
|
||||||
|
|
||||||
public void GetAuthenticationSettings(WebVirtualDirectory virtualDir)
|
public void GetAuthenticationSettings(ServerManager srvman, WebVirtualDirectory virtualDir)
|
||||||
{
|
{
|
||||||
using (var srvman = GetServerManager())
|
var config = srvman.GetApplicationHostConfiguration();
|
||||||
{
|
//
|
||||||
var config = srvman.GetApplicationHostConfiguration();
|
var section = config.GetSection(Constants.BasicAuthenticationSection, virtualDir.FullQualifiedPath);
|
||||||
//
|
//
|
||||||
var section = config.GetSection(Constants.BasicAuthenticationSection, virtualDir.FullQualifiedPath);
|
virtualDir.EnableBasicAuthentication = Convert.ToBoolean(section.GetAttributeValue(EnabledAttribute));
|
||||||
//
|
|
||||||
virtualDir.EnableBasicAuthentication = Convert.ToBoolean(section.GetAttributeValue(EnabledAttribute));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetAuthenticationSettings(WebVirtualDirectory virtualDir)
|
public void SetAuthenticationSettings(WebVirtualDirectory virtualDir)
|
||||||
|
|
|
@ -37,20 +37,15 @@ namespace WebsitePanel.Providers.Web.Iis.Authentication
|
||||||
{
|
{
|
||||||
public const string EnabledAttribute = "enabled";
|
public const string EnabledAttribute = "enabled";
|
||||||
|
|
||||||
public PropertyBag GetAuthenticationSettings(string siteId)
|
public PropertyBag GetAuthenticationSettings(ServerManager srvman, string siteId)
|
||||||
{
|
{
|
||||||
PropertyBag bag = new PropertyBag();
|
PropertyBag bag = new PropertyBag();
|
||||||
//
|
var config = srvman.GetApplicationHostConfiguration();
|
||||||
using (var srvman = GetServerManager())
|
//
|
||||||
{
|
var section = config.GetSection(Constants.WindowsAuthenticationSection, siteId);
|
||||||
var config = srvman.GetApplicationHostConfiguration();
|
//
|
||||||
//
|
bag[AuthenticationGlobals.IsLocked] = section.IsLocked;
|
||||||
var section = config.GetSection(Constants.WindowsAuthenticationSection, siteId);
|
bag[AuthenticationGlobals.Enabled] = Convert.ToBoolean(section.GetAttributeValue(EnabledAttribute));
|
||||||
//
|
|
||||||
bag[AuthenticationGlobals.IsLocked] = section.IsLocked;
|
|
||||||
bag[AuthenticationGlobals.Enabled] = Convert.ToBoolean(section.GetAttributeValue(EnabledAttribute));
|
|
||||||
}
|
|
||||||
//
|
|
||||||
return bag;
|
return bag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,20 +40,17 @@ namespace WebsitePanel.Providers.Web.Iis.ClassicAsp
|
||||||
public const string SectionName = "system.webServer/asp";
|
public const string SectionName = "system.webServer/asp";
|
||||||
public const string EnableParentPathsAttribute = "enableParentPaths";
|
public const string EnableParentPathsAttribute = "enableParentPaths";
|
||||||
|
|
||||||
public PropertyBag GetClassicAspSettings(string siteId)
|
public PropertyBag GetClassicAspSettings(ServerManager srvman, string siteId)
|
||||||
{
|
{
|
||||||
using (var srvman = GetServerManager())
|
var config = srvman.GetApplicationHostConfiguration();
|
||||||
{
|
//
|
||||||
var config = srvman.GetApplicationHostConfiguration();
|
var aspSection = config.GetSection(SectionName, siteId);
|
||||||
//
|
//
|
||||||
var aspSection = config.GetSection(SectionName, siteId);
|
PropertyBag bag = new PropertyBag();
|
||||||
//
|
//
|
||||||
PropertyBag bag = new PropertyBag();
|
bag[ClassicAspGlobals.EnableParentPaths] = Convert.ToBoolean(aspSection.GetAttributeValue(EnableParentPathsAttribute));
|
||||||
//
|
//
|
||||||
bag[ClassicAspGlobals.EnableParentPaths] = Convert.ToBoolean(aspSection.GetAttributeValue(EnableParentPathsAttribute));
|
return bag;
|
||||||
//
|
|
||||||
return bag;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetClassicAspSettings(WebVirtualDirectory virtualDir)
|
public void SetClassicAspSettings(WebVirtualDirectory virtualDir)
|
||||||
|
|
|
@ -31,12 +31,14 @@ namespace WebsitePanel.Providers.Web.Iis.Common
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Web;
|
||||||
|
|
||||||
using Microsoft.Web.Administration;
|
using Microsoft.Web.Administration;
|
||||||
using Microsoft.Web.Management.Server;
|
using Microsoft.Web.Management.Server;
|
||||||
|
|
||||||
public abstract class ConfigurationModuleService
|
public abstract class ConfigurationModuleService
|
||||||
{
|
{
|
||||||
|
private const string ServerManagerContextKey = "ServerManagerContextKey";
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// We'll use it in the future to implement management of web farm with shared configuration enabled
|
/// We'll use it in the future to implement management of web farm with shared configuration enabled
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -43,31 +43,28 @@ namespace WebsitePanel.Providers.Web.Iis.DefaultDocuments
|
||||||
{
|
{
|
||||||
public const string ValueAttribute = "value";
|
public const string ValueAttribute = "value";
|
||||||
|
|
||||||
public string GetDefaultDocumentSettings(string siteId)
|
public string GetDefaultDocumentSettings(ServerManager srvman, string siteId)
|
||||||
{
|
{
|
||||||
using (var srvman = GetServerManager())
|
// Load web site configuration
|
||||||
|
var config = srvman.GetWebConfiguration(siteId);
|
||||||
|
// Load corresponding section
|
||||||
|
var section = config.GetSection(Constants.DefaultDocumentsSection);
|
||||||
|
//
|
||||||
|
var filesCollection = section.GetCollection("files");
|
||||||
|
// Build default documents
|
||||||
|
var defaultDocs = new List<String>();
|
||||||
|
//
|
||||||
|
foreach (var item in filesCollection)
|
||||||
{
|
{
|
||||||
// Load web site configuration
|
var item2Get = GetDefaultDocument(item);
|
||||||
var config = srvman.GetWebConfiguration(siteId);
|
|
||||||
// Load corresponding section
|
|
||||||
var section = config.GetSection(Constants.DefaultDocumentsSection);
|
|
||||||
//
|
//
|
||||||
var filesCollection = section.GetCollection("files");
|
if (String.IsNullOrEmpty(item2Get))
|
||||||
// Build default documents
|
continue;
|
||||||
var defaultDocs = new List<String>();
|
|
||||||
//
|
//
|
||||||
foreach (var item in filesCollection)
|
defaultDocs.Add(item2Get);
|
||||||
{
|
|
||||||
var item2Get = GetDefaultDocument(item);
|
|
||||||
//
|
|
||||||
if (String.IsNullOrEmpty(item2Get))
|
|
||||||
continue;
|
|
||||||
//
|
|
||||||
defaultDocs.Add(item2Get);
|
|
||||||
}
|
|
||||||
//
|
|
||||||
return String.Join(",", defaultDocs.ToArray());
|
|
||||||
}
|
}
|
||||||
|
//
|
||||||
|
return String.Join(",", defaultDocs.ToArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetDefaultDocumentsEnabled(string siteId, bool enabled)
|
public void SetDefaultDocumentsEnabled(string siteId, bool enabled)
|
||||||
|
|
|
@ -35,20 +35,17 @@ namespace WebsitePanel.Providers.Web.Iis.DirectoryBrowse
|
||||||
|
|
||||||
internal sealed class DirectoryBrowseModuleService : ConfigurationModuleService
|
internal sealed class DirectoryBrowseModuleService : ConfigurationModuleService
|
||||||
{
|
{
|
||||||
public PropertyBag GetDirectoryBrowseSettings(string siteId)
|
public PropertyBag GetDirectoryBrowseSettings(ServerManager srvman, string siteId)
|
||||||
{
|
{
|
||||||
using (var srvman = GetServerManager())
|
var config = srvman.GetWebConfiguration(siteId);
|
||||||
{
|
//
|
||||||
var config = srvman.GetWebConfiguration(siteId);
|
DirectoryBrowseSection directoryBrowseSection = (DirectoryBrowseSection)config.GetSection(Constants.DirectoryBrowseSection, typeof(DirectoryBrowseSection));
|
||||||
//
|
//
|
||||||
DirectoryBrowseSection directoryBrowseSection = (DirectoryBrowseSection)config.GetSection(Constants.DirectoryBrowseSection, typeof(DirectoryBrowseSection));
|
PropertyBag bag = new PropertyBag();
|
||||||
//
|
bag[DirectoryBrowseGlobals.Enabled] = directoryBrowseSection.Enabled;
|
||||||
PropertyBag bag = new PropertyBag();
|
bag[DirectoryBrowseGlobals.ShowFlags] = (int)directoryBrowseSection.ShowFlags;
|
||||||
bag[DirectoryBrowseGlobals.Enabled] = directoryBrowseSection.Enabled;
|
bag[DirectoryBrowseGlobals.ReadOnly] = directoryBrowseSection.IsLocked;
|
||||||
bag[DirectoryBrowseGlobals.ShowFlags] = (int)directoryBrowseSection.ShowFlags;
|
return bag;
|
||||||
bag[DirectoryBrowseGlobals.ReadOnly] = directoryBrowseSection.IsLocked;
|
|
||||||
return bag;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetDirectoryBrowseEnabled(string siteId, bool enabled)
|
public void SetDirectoryBrowseEnabled(string siteId, bool enabled)
|
||||||
|
|
|
@ -58,36 +58,33 @@ using System.Collections.Specialized;
|
||||||
{ Constants.AspNet40x64PathSetting, @"\Framework64\v4.0.30128\aspnet_isapi.dll" }
|
{ Constants.AspNet40x64PathSetting, @"\Framework64\v4.0.30128\aspnet_isapi.dll" }
|
||||||
};
|
};
|
||||||
|
|
||||||
public SettingPair[] GetISAPIExtensionsInstalled()
|
public SettingPair[] GetISAPIExtensionsInstalled(ServerManager srvman)
|
||||||
{
|
{
|
||||||
List<SettingPair> settings = new List<SettingPair>();
|
List<SettingPair> settings = new List<SettingPair>();
|
||||||
//
|
//
|
||||||
using (var srvman = GetServerManager())
|
var config = srvman.GetApplicationHostConfiguration();
|
||||||
|
//
|
||||||
|
var section = config.GetSection(Constants.IsapiCgiRestrictionSection);
|
||||||
|
//
|
||||||
|
foreach (var item in section.GetCollection())
|
||||||
{
|
{
|
||||||
var config = srvman.GetApplicationHostConfiguration();
|
var isapiModulePath = Convert.ToString(item.GetAttributeValue(PathAttribute));
|
||||||
//
|
//
|
||||||
var section = config.GetSection(Constants.IsapiCgiRestrictionSection);
|
for (int i = 0; i < ISAPI_MODULES.Keys.Count; i++)
|
||||||
//
|
|
||||||
foreach (var item in section.GetCollection())
|
|
||||||
{
|
{
|
||||||
var isapiModulePath = Convert.ToString(item.GetAttributeValue(PathAttribute));
|
var pathExt = ISAPI_MODULES.Get(i);
|
||||||
//
|
//
|
||||||
for (int i = 0; i < ISAPI_MODULES.Keys.Count; i++)
|
if (isapiModulePath.EndsWith(pathExt))
|
||||||
{
|
{
|
||||||
var pathExt = ISAPI_MODULES.Get(i);
|
settings.Add(new SettingPair
|
||||||
//
|
|
||||||
if (isapiModulePath.EndsWith(pathExt))
|
|
||||||
{
|
{
|
||||||
settings.Add(new SettingPair
|
// Retrieve key name
|
||||||
{
|
Name = ISAPI_MODULES.GetKey(i),
|
||||||
// Retrieve key name
|
// Evaluate ISAPI module path
|
||||||
Name = ISAPI_MODULES.GetKey(i),
|
Value = isapiModulePath
|
||||||
// Evaluate ISAPI module path
|
});
|
||||||
Value = isapiModulePath
|
//
|
||||||
});
|
break;
|
||||||
//
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,45 +87,22 @@ namespace WebsitePanel.Providers.Web.Handlers
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetHandlersAccessPolicy(string fqPath, HandlerAccessPolicy policy)
|
public void SetHandlersAccessPolicy(ServerManager srvman, string fqPath, HandlerAccessPolicy policy)
|
||||||
{
|
{
|
||||||
|
var config = srvman.GetWebConfiguration(fqPath);
|
||||||
//
|
//
|
||||||
using (var srvman = GetServerManager())
|
HandlersSection section = (HandlersSection)config.GetSection(Constants.HandlersSection, typeof(HandlersSection));
|
||||||
{
|
//
|
||||||
var config = srvman.GetWebConfiguration(fqPath);
|
section.AccessPolicy = policy;
|
||||||
//
|
|
||||||
HandlersSection section = (HandlersSection)config.GetSection(Constants.HandlersSection, typeof(HandlersSection));
|
|
||||||
//
|
|
||||||
section.AccessPolicy = policy;
|
|
||||||
//
|
|
||||||
srvman.CommitChanges();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public HandlerAccessPolicy GetHandlersAccessPolicy(string fqPath)
|
public HandlerAccessPolicy GetHandlersAccessPolicy(ServerManager srvman, string fqPath)
|
||||||
{
|
{
|
||||||
|
var config = srvman.GetWebConfiguration(fqPath);
|
||||||
//
|
//
|
||||||
using (var srvman = GetServerManager())
|
HandlersSection section = (HandlersSection)config.GetSection(Constants.HandlersSection, typeof(HandlersSection));
|
||||||
{
|
//
|
||||||
var config = srvman.GetWebConfiguration(fqPath);
|
return section.AccessPolicy;
|
||||||
//
|
|
||||||
HandlersSection section = (HandlersSection)config.GetSection(Constants.HandlersSection, typeof(HandlersSection));
|
|
||||||
//
|
|
||||||
return section.AccessPolicy;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal ConfigurationElementCollection GetHandlers(WebVirtualDirectory virtualDir)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
using (var srvman = GetServerManager())
|
|
||||||
{
|
|
||||||
var config = srvman.GetWebConfiguration(virtualDir.FullQualifiedPath);
|
|
||||||
//
|
|
||||||
var section = config.GetSection(Constants.HandlersSection);
|
|
||||||
//
|
|
||||||
return section.GetCollection();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -141,16 +118,16 @@ namespace WebsitePanel.Providers.Web.Handlers
|
||||||
if (String.IsNullOrEmpty(processor))
|
if (String.IsNullOrEmpty(processor))
|
||||||
return;
|
return;
|
||||||
// This section helps to overcome "legacy" issues
|
// This section helps to overcome "legacy" issues
|
||||||
using (var srvman = GetServerManager())
|
//using (var srvman = GetServerManager())
|
||||||
{
|
//{
|
||||||
var config = srvman.GetWebConfiguration(virtualDir.FullQualifiedPath);
|
// var config = srvman.GetWebConfiguration(virtualDir.FullQualifiedPath);
|
||||||
//
|
// //
|
||||||
var handlersSection = config.GetSection(Constants.HandlersSection);
|
// var handlersSection = config.GetSection(Constants.HandlersSection);
|
||||||
// Do a complete section cleanup
|
// // Do a complete section cleanup
|
||||||
handlersSection.RevertToParent();
|
// handlersSection.RevertToParent();
|
||||||
//
|
// //
|
||||||
srvman.CommitChanges();
|
// srvman.CommitChanges();
|
||||||
}
|
//}
|
||||||
//
|
//
|
||||||
using (var srvman = GetServerManager())
|
using (var srvman = GetServerManager())
|
||||||
{
|
{
|
||||||
|
|
|
@ -44,23 +44,20 @@ namespace WebsitePanel.Providers.Web.HttpRedirect
|
||||||
public const string DestinationAttribute = "destination";
|
public const string DestinationAttribute = "destination";
|
||||||
public const string HttpResponseStatusAttribute = "httpResponseStatus";
|
public const string HttpResponseStatusAttribute = "httpResponseStatus";
|
||||||
|
|
||||||
public void LoadHttpRedirectSettings(WebVirtualDirectory virtualDir)
|
public void GetHttpRedirectSettings(ServerManager srvman, WebVirtualDirectory virtualDir)
|
||||||
{
|
{
|
||||||
using (var srvman = GetServerManager())
|
// Load web site configuration
|
||||||
{
|
var config = srvman.GetWebConfiguration(virtualDir.FullQualifiedPath);
|
||||||
// Load web site configuration
|
// Load corresponding section
|
||||||
var config = srvman.GetWebConfiguration(virtualDir.FullQualifiedPath);
|
var section = config.GetSection(Constants.HttpRedirectSection);
|
||||||
// Load corresponding section
|
//
|
||||||
var section = config.GetSection(Constants.HttpRedirectSection);
|
if (!Convert.ToBoolean(section.GetAttributeValue(EnabledAttribute)))
|
||||||
//
|
return;
|
||||||
if (!Convert.ToBoolean(section.GetAttributeValue(EnabledAttribute)))
|
//
|
||||||
return;
|
virtualDir.RedirectExactUrl = Convert.ToBoolean(section.GetAttributeValue(ExactDestinationAttribute));
|
||||||
//
|
virtualDir.RedirectDirectoryBelow = Convert.ToBoolean(section.GetAttributeValue(ChildOnlyAttribute));
|
||||||
virtualDir.RedirectExactUrl = Convert.ToBoolean(section.GetAttributeValue(ExactDestinationAttribute));
|
virtualDir.HttpRedirect = Convert.ToString(section.GetAttributeValue(DestinationAttribute));
|
||||||
virtualDir.RedirectDirectoryBelow = Convert.ToBoolean(section.GetAttributeValue(ChildOnlyAttribute));
|
virtualDir.RedirectPermanent = String.Equals("301", Convert.ToString(section.GetAttributeValue(HttpResponseStatusAttribute)));
|
||||||
virtualDir.HttpRedirect = Convert.ToString(section.GetAttributeValue(DestinationAttribute));
|
|
||||||
virtualDir.RedirectPermanent = String.Equals("301", Convert.ToString(section.GetAttributeValue(HttpResponseStatusAttribute)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetHttpRedirectSettings(WebVirtualDirectory virtualDir)
|
public void SetHttpRedirectSettings(WebVirtualDirectory virtualDir)
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -44,28 +44,25 @@ namespace WebsitePanel.Providers.Web.MimeTypes
|
||||||
/// Loads available mime maps into supplied virtual iisDirObject description.
|
/// Loads available mime maps into supplied virtual iisDirObject description.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="vdir">Virtual iisDirObject description.</param>
|
/// <param name="vdir">Virtual iisDirObject description.</param>
|
||||||
public void GetMimeMaps(WebVirtualDirectory virtualDir)
|
public void GetMimeMaps(ServerManager srvman, WebVirtualDirectory virtualDir)
|
||||||
{
|
{
|
||||||
using (var srvman = GetServerManager())
|
var config = srvman.GetWebConfiguration(virtualDir.FullQualifiedPath);
|
||||||
|
//
|
||||||
|
var section = config.GetSection(Constants.StaticContentSection);
|
||||||
|
//
|
||||||
|
var mappings = new List<MimeMap>();
|
||||||
|
//
|
||||||
|
foreach (var item in section.GetCollection())
|
||||||
{
|
{
|
||||||
var config = srvman.GetWebConfiguration(virtualDir.FullQualifiedPath);
|
var item2Get = GetMimeMap(item);
|
||||||
//
|
//
|
||||||
var section = config.GetSection(Constants.StaticContentSection);
|
if (item2Get == null)
|
||||||
|
continue;
|
||||||
//
|
//
|
||||||
var mappings = new List<MimeMap>();
|
mappings.Add(item2Get);
|
||||||
//
|
|
||||||
foreach (var item in section.GetCollection())
|
|
||||||
{
|
|
||||||
var item2Get = GetMimeMap(item);
|
|
||||||
//
|
|
||||||
if (item2Get == null)
|
|
||||||
continue;
|
|
||||||
//
|
|
||||||
mappings.Add(item2Get);
|
|
||||||
}
|
|
||||||
//
|
|
||||||
virtualDir.MimeMaps = mappings.ToArray();
|
|
||||||
}
|
}
|
||||||
|
//
|
||||||
|
virtualDir.MimeMaps = mappings.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -53,8 +53,7 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
CX500DistinguishedName dn = new CX500DistinguishedName();
|
CX500DistinguishedName dn = new CX500DistinguishedName();
|
||||||
CX509Enrollment enroll = new CX509Enrollment();
|
CX509Enrollment enroll = new CX509Enrollment();
|
||||||
CObjectIds objectIds = new CObjectIds();
|
CObjectIds objectIds = new CObjectIds();
|
||||||
CObjectId clientObjectId = new CObjectId();
|
CObjectId objectId = new CObjectId();
|
||||||
CObjectId serverObjectId = new CObjectId();
|
|
||||||
CX509ExtensionKeyUsage extensionKeyUsage = new CX509ExtensionKeyUsage();
|
CX509ExtensionKeyUsage extensionKeyUsage = new CX509ExtensionKeyUsage();
|
||||||
CX509ExtensionEnhancedKeyUsage x509ExtensionEnhancedKeyUsage = new CX509ExtensionEnhancedKeyUsage();
|
CX509ExtensionEnhancedKeyUsage x509ExtensionEnhancedKeyUsage = new CX509ExtensionEnhancedKeyUsage();
|
||||||
|
|
||||||
|
@ -66,11 +65,14 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
csPs.Add(csp);
|
csPs.Add(csp);
|
||||||
|
|
||||||
// Provide key container name, key length and key spec to the private key object
|
// Provide key container name, key length and key spec to the private key object
|
||||||
//objPrivateKey.ContainerName = "AlejaCMa";
|
|
||||||
privateKey.Length = cert.CSRLength;
|
privateKey.Length = cert.CSRLength;
|
||||||
privateKey.KeySpec = X509KeySpec.XCN_AT_SIGNATURE;
|
privateKey.KeySpec = X509KeySpec.XCN_AT_KEYEXCHANGE;
|
||||||
privateKey.KeyUsage = X509PrivateKeyUsageFlags.XCN_NCRYPT_ALLOW_ALL_USAGES;
|
privateKey.KeyUsage = X509PrivateKeyUsageFlags.XCN_NCRYPT_ALLOW_ALL_USAGES;
|
||||||
privateKey.ExportPolicy = X509PrivateKeyExportFlags.XCN_NCRYPT_ALLOW_PLAINTEXT_EXPORT_FLAG | X509PrivateKeyExportFlags.XCN_NCRYPT_ALLOW_EXPORT_FLAG;
|
privateKey.ExportPolicy =
|
||||||
|
X509PrivateKeyExportFlags.XCN_NCRYPT_ALLOW_PLAINTEXT_EXPORT_FLAG
|
||||||
|
| X509PrivateKeyExportFlags.XCN_NCRYPT_ALLOW_ARCHIVING_FLAG
|
||||||
|
| X509PrivateKeyExportFlags.XCN_NCRYPT_ALLOW_PLAINTEXT_ARCHIVING_FLAG
|
||||||
|
| X509PrivateKeyExportFlags.XCN_NCRYPT_ALLOW_EXPORT_FLAG;
|
||||||
privateKey.MachineContext = true;
|
privateKey.MachineContext = true;
|
||||||
|
|
||||||
// Provide the CSP collection object (in this case containing only 1 CSP object)
|
// Provide the CSP collection object (in this case containing only 1 CSP object)
|
||||||
|
@ -97,10 +99,9 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
pkcs10.X509Extensions.Add((CX509Extension)extensionKeyUsage);
|
pkcs10.X509Extensions.Add((CX509Extension)extensionKeyUsage);
|
||||||
|
|
||||||
// Enhanced Key Usage Extension
|
// Enhanced Key Usage Extension
|
||||||
clientObjectId.InitializeFromValue("1.3.6.1.5.5.7.3.2");
|
|
||||||
objectIds.Add(clientObjectId);
|
objectId.InitializeFromName(CERTENROLLLib.CERTENROLL_OBJECTID.XCN_OID_PKIX_KP_SERVER_AUTH);
|
||||||
serverObjectId.InitializeFromValue("1.3.6.1.5.5.7.3.1");
|
objectIds.Add(objectId);
|
||||||
objectIds.Add(serverObjectId);
|
|
||||||
x509ExtensionEnhancedKeyUsage.InitializeEncode(objectIds);
|
x509ExtensionEnhancedKeyUsage.InitializeEncode(objectIds);
|
||||||
pkcs10.X509Extensions.Add((CX509Extension)x509ExtensionEnhancedKeyUsage);
|
pkcs10.X509Extensions.Add((CX509Extension)x509ExtensionEnhancedKeyUsage);
|
||||||
|
|
||||||
|
@ -108,6 +109,9 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
string request = String.Format(@"CN={0}, O={1}, OU={2}, L={3}, S={4}, C={5}", cert.Hostname, cert.Organisation, cert.OrganisationUnit, cert.City, cert.State, cert.Country);
|
string request = String.Format(@"CN={0}, O={1}, OU={2}, L={3}, S={4}, C={5}", cert.Hostname, cert.Organisation, cert.OrganisationUnit, cert.City, cert.State, cert.Country);
|
||||||
dn.Encode(request, X500NameFlags.XCN_CERT_NAME_STR_NONE);
|
dn.Encode(request, X500NameFlags.XCN_CERT_NAME_STR_NONE);
|
||||||
|
|
||||||
|
// enable SMIME capabilities
|
||||||
|
pkcs10.SmimeCapabilities = true;
|
||||||
|
|
||||||
// Assing the subject name by using the Distinguished Name object initialized above
|
// Assing the subject name by using the Distinguished Name object initialized above
|
||||||
pkcs10.Subject = dn;
|
pkcs10.Subject = dn;
|
||||||
|
|
||||||
|
@ -335,7 +339,7 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
|
|
||||||
public void AddBinding(SSLCertificate certificate, WebSite website)
|
public void AddBinding(SSLCertificate certificate, WebSite website)
|
||||||
{
|
{
|
||||||
using (ServerManager sm = GetServerManager())
|
using (ServerManager srvman = GetServerManager())
|
||||||
{
|
{
|
||||||
// Not sure why do we need to work with X.509 store here, so commented it out and lets see what happens
|
// Not sure why do we need to work with X.509 store here, so commented it out and lets see what happens
|
||||||
X509Store store = new X509Store(StoreName.My, StoreLocation.LocalMachine);
|
X509Store store = new X509Store(StoreName.My, StoreLocation.LocalMachine);
|
||||||
|
@ -344,7 +348,7 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
List<ServerBinding> bindings = new List<ServerBinding>();
|
List<ServerBinding> bindings = new List<ServerBinding>();
|
||||||
// Retrieve existing site bindings to figure out what do we have here
|
// Retrieve existing site bindings to figure out what do we have here
|
||||||
WebObjectsModuleService webObjSvc = new WebObjectsModuleService();
|
WebObjectsModuleService webObjSvc = new WebObjectsModuleService();
|
||||||
bindings.AddRange(webObjSvc.GetSiteBindings(website.SiteId));
|
bindings.AddRange(webObjSvc.GetSiteBindings(srvman, website.SiteId));
|
||||||
// Look for dedicated ip
|
// Look for dedicated ip
|
||||||
bool dedicatedIp = bindings.Exists(binding => String.IsNullOrEmpty(binding.Host) && binding.IP != "*");
|
bool dedicatedIp = bindings.Exists(binding => String.IsNullOrEmpty(binding.Host) && binding.IP != "*");
|
||||||
//
|
//
|
||||||
|
@ -353,11 +357,11 @@ namespace WebsitePanel.Providers.Web.Iis
|
||||||
bindingInformation = dedicatedIp ? string.Format("{0}:443:", website.SiteIPAddress)
|
bindingInformation = dedicatedIp ? string.Format("{0}:443:", website.SiteIPAddress)
|
||||||
: string.Format("{0}:443:{1}", website.SiteIPAddress, certificate.Hostname);
|
: string.Format("{0}:443:{1}", website.SiteIPAddress, certificate.Hostname);
|
||||||
//
|
//
|
||||||
sm.Sites[website.SiteId].Bindings.Add(bindingInformation, certificate.Hash, store.Name);
|
srvman.Sites[website.SiteId].Bindings.Add(bindingInformation, certificate.Hash, store.Name);
|
||||||
//
|
//
|
||||||
store.Close();
|
store.Close();
|
||||||
//
|
//
|
||||||
sm.CommitChanges();
|
srvman.CommitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,31 +49,27 @@ namespace WebsitePanel.Providers.Web.Iis.WebObjects
|
||||||
public const string ResponseModeAttribute = "responseMode";
|
public const string ResponseModeAttribute = "responseMode";
|
||||||
public const string PrefixLanguageFilePath = "prefixLanguageFilePath";
|
public const string PrefixLanguageFilePath = "prefixLanguageFilePath";
|
||||||
|
|
||||||
public void GetCustomErrors(WebVirtualDirectory virtualDir)
|
public void GetCustomErrors(ServerManager srvman, WebVirtualDirectory virtualDir)
|
||||||
{
|
{
|
||||||
|
var config = srvman.GetWebConfiguration(virtualDir.FullQualifiedPath);
|
||||||
//
|
//
|
||||||
using (var srvman = GetServerManager())
|
var httpErrorsSection = config.GetSection(Constants.HttpErrorsSection);
|
||||||
|
//
|
||||||
|
var errorsCollection = httpErrorsSection.GetCollection();
|
||||||
|
//
|
||||||
|
var errors = new List<HttpError>();
|
||||||
|
//
|
||||||
|
foreach (var item in errorsCollection)
|
||||||
{
|
{
|
||||||
var config = srvman.GetWebConfiguration(virtualDir.FullQualifiedPath);
|
var item2Get = GetHttpError(item, virtualDir);
|
||||||
//
|
//
|
||||||
var httpErrorsSection = config.GetSection(Constants.HttpErrorsSection);
|
if (item2Get == null)
|
||||||
|
continue;
|
||||||
//
|
//
|
||||||
var errorsCollection = httpErrorsSection.GetCollection();
|
errors.Add(item2Get);
|
||||||
//
|
|
||||||
var errors = new List<HttpError>();
|
|
||||||
//
|
|
||||||
foreach (var item in errorsCollection)
|
|
||||||
{
|
|
||||||
var item2Get = GetHttpError(item, virtualDir);
|
|
||||||
//
|
|
||||||
if (item2Get == null)
|
|
||||||
continue;
|
|
||||||
//
|
|
||||||
errors.Add(item2Get);
|
|
||||||
}
|
|
||||||
//
|
|
||||||
virtualDir.HttpErrors = errors.ToArray();
|
|
||||||
}
|
}
|
||||||
|
//
|
||||||
|
virtualDir.HttpErrors = errors.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetCustomErrors(WebVirtualDirectory virtualDir)
|
public void SetCustomErrors(WebVirtualDirectory virtualDir)
|
||||||
|
|
|
@ -40,33 +40,30 @@ namespace WebsitePanel.Providers.Web.WebObjects
|
||||||
public const string NameAttribute = "name";
|
public const string NameAttribute = "name";
|
||||||
public const string ValueAttribute = "value";
|
public const string ValueAttribute = "value";
|
||||||
|
|
||||||
public void GetCustomHttpHeaders(WebVirtualDirectory virtualDir)
|
public void GetCustomHttpHeaders(ServerManager srvman, WebVirtualDirectory virtualDir)
|
||||||
{
|
{
|
||||||
using (var srvman = GetServerManager())
|
var config = srvman.GetApplicationHostConfiguration();
|
||||||
|
//
|
||||||
|
var httpProtocolSection = config.GetSection(Constants.HttpProtocolSection, virtualDir.FullQualifiedPath);
|
||||||
|
//
|
||||||
|
if (httpProtocolSection == null)
|
||||||
|
return;
|
||||||
|
//
|
||||||
|
var headersCollection = httpProtocolSection.GetCollection("customHeaders");
|
||||||
|
//
|
||||||
|
var headers = new List<HttpHeader>();
|
||||||
|
//
|
||||||
|
foreach (var item in headersCollection)
|
||||||
{
|
{
|
||||||
var config = srvman.GetApplicationHostConfiguration();
|
var item2Get = GetCustomHttpHeader(item);
|
||||||
//
|
//
|
||||||
var httpProtocolSection = config.GetSection(Constants.HttpProtocolSection, virtualDir.FullQualifiedPath);
|
if (item2Get == null)
|
||||||
|
continue;
|
||||||
//
|
//
|
||||||
if (httpProtocolSection == null)
|
headers.Add(item2Get);
|
||||||
return;
|
|
||||||
//
|
|
||||||
var headersCollection = httpProtocolSection.GetCollection("customHeaders");
|
|
||||||
//
|
|
||||||
var headers = new List<HttpHeader>();
|
|
||||||
//
|
|
||||||
foreach (var item in headersCollection)
|
|
||||||
{
|
|
||||||
var item2Get = GetCustomHttpHeader(item);
|
|
||||||
//
|
|
||||||
if (item2Get == null)
|
|
||||||
continue;
|
|
||||||
//
|
|
||||||
headers.Add(item2Get);
|
|
||||||
}
|
|
||||||
//
|
|
||||||
virtualDir.HttpHeaders = headers.ToArray();
|
|
||||||
}
|
}
|
||||||
|
//
|
||||||
|
virtualDir.HttpHeaders = headers.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetCustomHttpHeaders(WebVirtualDirectory virtualDir)
|
public void SetCustomHttpHeaders(WebVirtualDirectory virtualDir)
|
||||||
|
|
|
@ -133,7 +133,7 @@ namespace WebsitePanel.Providers.Web.Iis.WebObjects
|
||||||
//
|
//
|
||||||
if (virtualDir.DedicatedApplicationPool)
|
if (virtualDir.DedicatedApplicationPool)
|
||||||
{
|
{
|
||||||
var appPool = GetApplicationPool(virtualDir);
|
var appPool = GetApplicationPool(srvman, virtualDir);
|
||||||
vdir.UserName = appPool.ProcessModel.UserName;
|
vdir.UserName = appPool.ProcessModel.UserName;
|
||||||
vdir.Password = appPool.ProcessModel.Password;
|
vdir.Password = appPool.ProcessModel.Password;
|
||||||
}
|
}
|
||||||
|
@ -150,20 +150,17 @@ namespace WebsitePanel.Providers.Web.Iis.WebObjects
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ApplicationPool GetApplicationPool(WebVirtualDirectory virtualDir)
|
public ApplicationPool GetApplicationPool(ServerManager srvman, WebVirtualDirectory virtualDir)
|
||||||
{
|
{
|
||||||
if (virtualDir == null)
|
if (virtualDir == null)
|
||||||
throw new ArgumentNullException("vdir");
|
throw new ArgumentNullException("vdir");
|
||||||
// read app pool
|
// read app pool
|
||||||
using (var srvman = GetServerManager())
|
var appPool = srvman.ApplicationPools[virtualDir.ApplicationPool];
|
||||||
{
|
//
|
||||||
var appPool = srvman.ApplicationPools[virtualDir.ApplicationPool];
|
if (appPool == null)
|
||||||
//
|
throw new ApplicationException("ApplicationPoolNotFound");
|
||||||
if (appPool == null)
|
//
|
||||||
throw new ApplicationException("ApplicationPoolNotFound");
|
return appPool;
|
||||||
//
|
|
||||||
return appPool;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CreateApplicationPool(string appPoolName, string appPoolUsername,
|
public void CreateApplicationPool(string appPoolName, string appPoolUsername,
|
||||||
|
@ -324,126 +321,105 @@ namespace WebsitePanel.Providers.Web.Iis.WebObjects
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ServerState GetSiteState(string siteId)
|
public ServerState GetSiteState(ServerManager srvman, string siteId)
|
||||||
{
|
{
|
||||||
using (var srvman = GetServerManager())
|
// ensure website exists
|
||||||
|
if (srvman.Sites[siteId] == null)
|
||||||
|
return ServerState.Unknown;
|
||||||
|
//
|
||||||
|
var siteState = ServerState.Unknown;
|
||||||
|
//
|
||||||
|
switch (srvman.Sites[siteId].State)
|
||||||
{
|
{
|
||||||
// ensure website exists
|
case ObjectState.Started:
|
||||||
if (srvman.Sites[siteId] == null)
|
siteState = ServerState.Started;
|
||||||
return ServerState.Unknown;
|
break;
|
||||||
//
|
case ObjectState.Starting:
|
||||||
var siteState = ServerState.Unknown;
|
siteState = ServerState.Starting;
|
||||||
//
|
break;
|
||||||
switch (srvman.Sites[siteId].State)
|
case ObjectState.Stopped:
|
||||||
{
|
siteState = ServerState.Stopped;
|
||||||
case ObjectState.Started:
|
break;
|
||||||
siteState = ServerState.Started;
|
case ObjectState.Stopping:
|
||||||
break;
|
siteState = ServerState.Stopping;
|
||||||
case ObjectState.Starting:
|
break;
|
||||||
siteState = ServerState.Starting;
|
|
||||||
break;
|
|
||||||
case ObjectState.Stopped:
|
|
||||||
siteState = ServerState.Stopped;
|
|
||||||
break;
|
|
||||||
case ObjectState.Stopping:
|
|
||||||
siteState = ServerState.Stopping;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
//
|
|
||||||
return siteState;
|
|
||||||
}
|
}
|
||||||
|
//
|
||||||
|
return siteState;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool SiteExists(string siteId)
|
public bool SiteExists(ServerManager srvman, string siteId)
|
||||||
{
|
{
|
||||||
using (var srvman = GetServerManager())
|
return (srvman.Sites[siteId] != null);
|
||||||
{
|
|
||||||
return (srvman.Sites[siteId] != null);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public string[] GetSites()
|
public string[] GetSites(ServerManager srvman)
|
||||||
{
|
{
|
||||||
using (var srvman = GetServerManager())
|
var iisObjects = new List<string>();
|
||||||
{
|
//
|
||||||
var iisObjects = new List<string>();
|
foreach (var item in srvman.Sites)
|
||||||
//
|
iisObjects.Add(item.Name);
|
||||||
foreach (var item in srvman.Sites)
|
//
|
||||||
iisObjects.Add(item.Name);
|
return iisObjects.ToArray();
|
||||||
//
|
|
||||||
return iisObjects.ToArray();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetWebSiteNameFromIIS(string siteName)
|
public string GetWebSiteNameFromIIS(ServerManager srvman, string siteName)
|
||||||
{
|
{
|
||||||
using (var srvman = GetServerManager())
|
if (srvman.Sites[siteName] != null)
|
||||||
{
|
return srvman.Sites[siteName].Name;
|
||||||
if (srvman.Sites[siteName] != null)
|
//
|
||||||
return srvman.Sites[siteName].Name;
|
return null;
|
||||||
//
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetWebSiteIdFromIIS(string siteId, string format)
|
public string GetWebSiteIdFromIIS(ServerManager srvman, string siteId, string format)
|
||||||
{
|
{
|
||||||
using (var srvman = GetServerManager())
|
var iisObject = srvman.Sites[siteId];
|
||||||
{
|
// Format string is empty
|
||||||
var iisObject = srvman.Sites[siteId];
|
if (String.IsNullOrEmpty(format))
|
||||||
// Format string is empty
|
return Convert.ToString(iisObject.Id);
|
||||||
if (String.IsNullOrEmpty(format))
|
//
|
||||||
return Convert.ToString(iisObject.Id);
|
return String.Format(format, iisObject.Id);
|
||||||
//
|
|
||||||
return String.Format(format, iisObject.Id);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public WebSite GetWebSiteFromIIS(string siteId)
|
public WebSite GetWebSiteFromIIS(ServerManager srvman, string siteId)
|
||||||
{
|
{
|
||||||
using (var srvman = GetServerManager())
|
var webSite = new WebSite();
|
||||||
|
//
|
||||||
|
var iisObject = srvman.Sites[siteId];
|
||||||
|
//
|
||||||
|
webSite.SiteId = webSite.Name = iisObject.Name;
|
||||||
|
//
|
||||||
|
if (iisObject.LogFile.Enabled)
|
||||||
{
|
{
|
||||||
var webSite = new WebSite();
|
webSite.LogsPath = iisObject.LogFile.Directory;
|
||||||
//
|
webSite[WebSite.IIS7_LOG_EXT_FILE_FIELDS] = iisObject.LogFile.LogExtFileFlags.ToString();
|
||||||
var iisObject = srvman.Sites[siteId];
|
|
||||||
//
|
|
||||||
webSite.SiteId = webSite.Name = iisObject.Name;
|
|
||||||
//
|
|
||||||
if (iisObject.LogFile.Enabled)
|
|
||||||
{
|
|
||||||
webSite.LogsPath = iisObject.LogFile.Directory;
|
|
||||||
webSite[WebSite.IIS7_LOG_EXT_FILE_FIELDS] = iisObject.LogFile.LogExtFileFlags.ToString();
|
|
||||||
}
|
|
||||||
// Read instant website id
|
|
||||||
webSite[WebSite.IIS7_SITE_ID] = GetWebSiteIdFromIIS(siteId, "W3SVC{0}");
|
|
||||||
// Read web site iisAppObject pool name
|
|
||||||
webSite.ApplicationPool = iisObject.Applications["/"].ApplicationPoolName;
|
|
||||||
//
|
|
||||||
return webSite;
|
|
||||||
}
|
}
|
||||||
|
// Read instant website id
|
||||||
|
webSite[WebSite.IIS7_SITE_ID] = GetWebSiteIdFromIIS(srvman, siteId, "W3SVC{0}");
|
||||||
|
// Read web site iisAppObject pool name
|
||||||
|
webSite.ApplicationPool = iisObject.Applications["/"].ApplicationPoolName;
|
||||||
|
//
|
||||||
|
return webSite;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ServerBinding[] GetSiteBindings(string siteId)
|
public ServerBinding[] GetSiteBindings(ServerManager srvman, string siteId)
|
||||||
{
|
{
|
||||||
using (var srvman = GetServerManager())
|
var iisObject = srvman.Sites[siteId];
|
||||||
|
// get server bingings
|
||||||
|
var bindings = new List<ServerBinding>();
|
||||||
|
//
|
||||||
|
foreach (var bindingObj in iisObject.Bindings)
|
||||||
{
|
{
|
||||||
var iisObject = srvman.Sites[siteId];
|
// return only "http" bindings
|
||||||
// get server bingings
|
if (String.Equals(bindingObj.Protocol, Uri.UriSchemeHttp, StringComparison.InvariantCultureIgnoreCase))
|
||||||
var bindings = new List<ServerBinding>();
|
{
|
||||||
//
|
string[] parts = bindingObj.BindingInformation.Split(':');
|
||||||
foreach (var bindingObj in iisObject.Bindings)
|
// append binding
|
||||||
{
|
bindings.Add(new ServerBinding(bindingObj.Protocol, parts[0], parts[1], parts[2]));
|
||||||
// return only "http" bindings
|
}
|
||||||
if (String.Equals(bindingObj.Protocol, Uri.UriSchemeHttp, StringComparison.InvariantCultureIgnoreCase))
|
|
||||||
{
|
|
||||||
string[] parts = bindingObj.BindingInformation.Split(':');
|
|
||||||
// append binding
|
|
||||||
bindings.Add(new ServerBinding(bindingObj.Protocol, parts[0], parts[1], parts[2]));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//
|
|
||||||
return bindings.ToArray();
|
|
||||||
}
|
}
|
||||||
|
//
|
||||||
|
return bindings.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SyncWebSiteBindingsChanges(string siteId, ServerBinding[] bindings)
|
private void SyncWebSiteBindingsChanges(string siteId, ServerBinding[] bindings)
|
||||||
|
@ -487,40 +463,40 @@ namespace WebsitePanel.Providers.Web.Iis.WebObjects
|
||||||
|
|
||||||
public void UpdateSiteBindings(string siteId, ServerBinding[] bindings)
|
public void UpdateSiteBindings(string siteId, ServerBinding[] bindings)
|
||||||
{
|
{
|
||||||
// Ensure web site exists
|
using (ServerManager srvman = GetServerManager())
|
||||||
if (!SiteExists(siteId))
|
{
|
||||||
return;
|
// Ensure web site exists
|
||||||
|
if (!SiteExists(srvman, siteId))
|
||||||
|
return;
|
||||||
|
}
|
||||||
//
|
//
|
||||||
SyncWebSiteBindingsChanges(siteId, bindings);
|
SyncWebSiteBindingsChanges(siteId, bindings);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetPhysicalPath(WebVirtualDirectory virtualDir)
|
public string GetPhysicalPath(ServerManager srvman, WebVirtualDirectory virtualDir)
|
||||||
{
|
{
|
||||||
using (var srvman = GetServerManager())
|
string siteId = (virtualDir.ParentSiteName == null)
|
||||||
{
|
? virtualDir.Name : virtualDir.ParentSiteName;
|
||||||
string siteId = (virtualDir.ParentSiteName == null)
|
//
|
||||||
? virtualDir.Name : virtualDir.ParentSiteName;
|
var iisObject = srvman.Sites[siteId];
|
||||||
//
|
|
||||||
var iisObject = srvman.Sites[siteId];
|
|
||||||
|
|
||||||
if (iisObject == null)
|
if (iisObject == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
//
|
//
|
||||||
var iisAppObject = iisObject.Applications[virtualDir.VirtualPath];
|
var iisAppObject = iisObject.Applications[virtualDir.VirtualPath];
|
||||||
|
|
||||||
if (iisAppObject == null)
|
if (iisAppObject == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
//
|
//
|
||||||
var iisDirObject = iisAppObject.VirtualDirectories["/"];
|
var iisDirObject = iisAppObject.VirtualDirectories["/"];
|
||||||
|
|
||||||
if (iisDirObject == null)
|
if (iisDirObject == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
//
|
//
|
||||||
return iisDirObject.PhysicalPath;
|
return iisDirObject.PhysicalPath;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DeleteApplicationPool(params string[] appPoolNames)
|
public void DeleteApplicationPool(params string[] appPoolNames)
|
||||||
|
@ -552,11 +528,11 @@ namespace WebsitePanel.Providers.Web.Iis.WebObjects
|
||||||
|
|
||||||
public void DeleteSite(string siteId)
|
public void DeleteSite(string siteId)
|
||||||
{
|
{
|
||||||
if (!SiteExists(siteId))
|
|
||||||
return;
|
|
||||||
//
|
|
||||||
using (var srvman = GetServerManager())
|
using (var srvman = GetServerManager())
|
||||||
{
|
{
|
||||||
|
if (!SiteExists(srvman, siteId))
|
||||||
|
return;
|
||||||
|
|
||||||
//
|
//
|
||||||
var indexOf = srvman.Sites.IndexOf(srvman.Sites[siteId]);
|
var indexOf = srvman.Sites.IndexOf(srvman.Sites[siteId]);
|
||||||
srvman.Sites.RemoveAt(indexOf);
|
srvman.Sites.RemoveAt(indexOf);
|
||||||
|
@ -565,31 +541,28 @@ namespace WebsitePanel.Providers.Web.Iis.WebObjects
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public WebVirtualDirectory[] GetVirtualDirectories(string siteId)
|
public WebVirtualDirectory[] GetVirtualDirectories(ServerManager srvman, string siteId)
|
||||||
{
|
{
|
||||||
if (!SiteExists(siteId))
|
if (!SiteExists(srvman, siteId))
|
||||||
return new WebVirtualDirectory[] { };
|
return new WebVirtualDirectory[] { };
|
||||||
|
|
||||||
using (var srvman = GetServerManager())
|
var vdirs = new List<WebVirtualDirectory>();
|
||||||
|
var iisObject = srvman.Sites[siteId];
|
||||||
|
//
|
||||||
|
foreach (var item in iisObject.Applications)
|
||||||
{
|
{
|
||||||
var vdirs = new List<WebVirtualDirectory>();
|
// Skip root application which is web site itself
|
||||||
var iisObject = srvman.Sites[siteId];
|
if (item.Path == "/")
|
||||||
|
continue;
|
||||||
//
|
//
|
||||||
foreach (var item in iisObject.Applications)
|
vdirs.Add(new WebVirtualDirectory
|
||||||
{
|
{
|
||||||
// Skip root application which is web site itself
|
Name = ConfigurationUtility.GetNonQualifiedVirtualPath(item.Path),
|
||||||
if (item.Path == "/")
|
ContentPath = item.VirtualDirectories[0].PhysicalPath
|
||||||
continue;
|
});
|
||||||
//
|
|
||||||
vdirs.Add(new WebVirtualDirectory
|
|
||||||
{
|
|
||||||
Name = ConfigurationUtility.GetNonQualifiedVirtualPath(item.Path),
|
|
||||||
ContentPath = item.VirtualDirectories[0].PhysicalPath
|
|
||||||
});
|
|
||||||
}
|
|
||||||
//
|
|
||||||
return vdirs.ToArray();
|
|
||||||
}
|
}
|
||||||
|
//
|
||||||
|
return vdirs.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
public WebVirtualDirectory GetVirtualDirectory(string siteId, string directoryName)
|
public WebVirtualDirectory GetVirtualDirectory(string siteId, string directoryName)
|
||||||
|
@ -601,11 +574,11 @@ namespace WebsitePanel.Providers.Web.Iis.WebObjects
|
||||||
if (String.IsNullOrEmpty(directoryName))
|
if (String.IsNullOrEmpty(directoryName))
|
||||||
throw new ArgumentNullException("directoryName");
|
throw new ArgumentNullException("directoryName");
|
||||||
//
|
//
|
||||||
if (!SiteExists(siteId))
|
|
||||||
return null;
|
|
||||||
//
|
|
||||||
using (var srvman = GetServerManager())
|
using (var srvman = GetServerManager())
|
||||||
{
|
{
|
||||||
|
if (!SiteExists(srvman, siteId))
|
||||||
|
return null;
|
||||||
|
|
||||||
var site = srvman.Sites[siteId];
|
var site = srvman.Sites[siteId];
|
||||||
//
|
//
|
||||||
var vdir = new WebVirtualDirectory
|
var vdir = new WebVirtualDirectory
|
||||||
|
@ -622,11 +595,11 @@ namespace WebsitePanel.Providers.Web.Iis.WebObjects
|
||||||
|
|
||||||
public void CreateVirtualDirectory(string siteId, string directoryName, string physicalPath)
|
public void CreateVirtualDirectory(string siteId, string directoryName, string physicalPath)
|
||||||
{
|
{
|
||||||
if (!SiteExists(siteId))
|
|
||||||
throw new ApplicationException();
|
|
||||||
//
|
|
||||||
using (var srvman = GetServerManager())
|
using (var srvman = GetServerManager())
|
||||||
{
|
{
|
||||||
|
if (!SiteExists(srvman, siteId))
|
||||||
|
throw new ApplicationException();
|
||||||
|
|
||||||
var iisSiteObject = srvman.Sites[siteId];
|
var iisSiteObject = srvman.Sites[siteId];
|
||||||
var iisAppObject = iisSiteObject.Applications.Add(directoryName, physicalPath);
|
var iisAppObject = iisSiteObject.Applications.Add(directoryName, physicalPath);
|
||||||
//
|
//
|
||||||
|
@ -636,11 +609,11 @@ namespace WebsitePanel.Providers.Web.Iis.WebObjects
|
||||||
|
|
||||||
public bool VirtualDirectoryExists(string siteId, string directoryName)
|
public bool VirtualDirectoryExists(string siteId, string directoryName)
|
||||||
{
|
{
|
||||||
if (!SiteExists(siteId))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
using (var srvman = GetServerManager())
|
using (var srvman = GetServerManager())
|
||||||
{
|
{
|
||||||
|
if (!SiteExists(srvman, siteId))
|
||||||
|
return false;
|
||||||
|
|
||||||
var vdir = new WebVirtualDirectory
|
var vdir = new WebVirtualDirectory
|
||||||
{
|
{
|
||||||
Name = directoryName,
|
Name = directoryName,
|
||||||
|
@ -653,11 +626,11 @@ namespace WebsitePanel.Providers.Web.Iis.WebObjects
|
||||||
|
|
||||||
public void DeleteVirtualDirectory(WebVirtualDirectory virtualDir)
|
public void DeleteVirtualDirectory(WebVirtualDirectory virtualDir)
|
||||||
{
|
{
|
||||||
if (!SiteExists(virtualDir.ParentSiteName))
|
|
||||||
return;
|
|
||||||
//
|
|
||||||
using (var srvman = GetServerManager())
|
using (var srvman = GetServerManager())
|
||||||
{
|
{
|
||||||
|
if (!SiteExists(srvman, virtualDir.ParentSiteName))
|
||||||
|
return;
|
||||||
|
|
||||||
var iisSiteObject = srvman.Sites[virtualDir.ParentSiteName];
|
var iisSiteObject = srvman.Sites[virtualDir.ParentSiteName];
|
||||||
var iisAppObject = iisSiteObject.Applications[virtualDir.VirtualPath];
|
var iisAppObject = iisSiteObject.Applications[virtualDir.VirtualPath];
|
||||||
//
|
//
|
||||||
|
|
|
@ -71,6 +71,7 @@
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.DirectoryServices" />
|
<Reference Include="System.DirectoryServices" />
|
||||||
<Reference Include="System.Management" />
|
<Reference Include="System.Management" />
|
||||||
|
<Reference Include="System.Web" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -2392,37 +2392,37 @@ namespace WebsitePanel.Providers.Web
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<HtaccessUser> GetHeliconApeUsers(string siteId)
|
public virtual List<HtaccessUser> GetHeliconApeUsers(string siteId)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public HtaccessUser GetHeliconApeUser(string siteId, string userName)
|
public virtual HtaccessUser GetHeliconApeUser(string siteId, string userName)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateHeliconApeUser(string siteId, HtaccessUser user)
|
public virtual void UpdateHeliconApeUser(string siteId, HtaccessUser user)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DeleteHeliconApeUser(string siteId, string userName)
|
public virtual void DeleteHeliconApeUser(string siteId, string userName)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<WebGroup> GetHeliconApeGroups(string siteId)
|
public virtual List<WebGroup> GetHeliconApeGroups(string siteId)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public WebGroup GetHeliconApeGroup(string siteId, string groupName)
|
public virtual WebGroup GetHeliconApeGroup(string siteId, string groupName)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateHeliconApeGroup(string siteId, WebGroup group)
|
public virtual void UpdateHeliconApeGroup(string siteId, WebGroup group)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
@ -2437,7 +2437,7 @@ namespace WebsitePanel.Providers.Web
|
||||||
throw new NotSupportedException();
|
throw new NotSupportedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DeleteHeliconApeGroup(string siteId, string groupName)
|
public virtual void DeleteHeliconApeGroup(string siteId, string groupName)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
@ -3630,27 +3630,27 @@ namespace WebsitePanel.Providers.Web
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Remote Management Access
|
#region Remote Management Access
|
||||||
public void GrantWebManagementAccess(string siteName, string accountName, string accountPassword)
|
public virtual void GrantWebManagementAccess(string siteName, string accountName, string accountPassword)
|
||||||
{
|
{
|
||||||
throw new NotSupportedException();
|
throw new NotSupportedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RevokeWebManagementAccess(string siteName, string accountName)
|
public virtual void RevokeWebManagementAccess(string siteName, string accountName)
|
||||||
{
|
{
|
||||||
throw new NotSupportedException();
|
throw new NotSupportedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ChangeWebManagementAccessPassword(string accountName, string accountPassword)
|
public virtual void ChangeWebManagementAccessPassword(string accountName, string accountPassword)
|
||||||
{
|
{
|
||||||
throw new NotSupportedException();
|
throw new NotSupportedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool CheckWebManagementAccountExists(string accountName)
|
public virtual bool CheckWebManagementAccountExists(string accountName)
|
||||||
{
|
{
|
||||||
throw new NotSupportedException();
|
throw new NotSupportedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ResultObject CheckWebManagementPasswordComplexity(string accountPassword)
|
public virtual ResultObject CheckWebManagementPasswordComplexity(string accountPassword)
|
||||||
{
|
{
|
||||||
throw new NotSupportedException();
|
throw new NotSupportedException();
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,8 +11,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
||||||
..\..\LICENSE.txt = ..\..\LICENSE.txt
|
..\..\LICENSE.txt = ..\..\LICENSE.txt
|
||||||
..\..\Readme.htm = ..\..\Readme.htm
|
..\..\Readme.htm = ..\..\Readme.htm
|
||||||
..\..\ReleaseNotes.htm = ..\..\ReleaseNotes.htm
|
..\..\ReleaseNotes.htm = ..\..\ReleaseNotes.htm
|
||||||
VersionInfo.cs = VersionInfo.cs
|
|
||||||
VersionInfo.vb = VersionInfo.vb
|
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Server", "WebsitePanel.Server\WebsitePanel.Server.csproj", "{38C6047C-E447-4CC2-891F-ABE54D4659F3}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Server", "WebsitePanel.Server\WebsitePanel.Server.csproj", "{38C6047C-E447-4CC2-891F-ABE54D4659F3}"
|
||||||
|
|
|
@ -154,7 +154,7 @@ namespace WebsitePanel.Server
|
||||||
Log.WriteEnd("'{0}' CreateVMFromVM", ProviderSettings.ProviderName);
|
Log.WriteEnd("'{0}' CreateVMFromVM", ProviderSettings.ProviderName);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
catch (System.TimeoutException ex)
|
catch (System.TimeoutException)
|
||||||
{
|
{
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
<!-- Perform security check -->
|
<!-- Perform security check -->
|
||||||
<enabled value="true"/>
|
<enabled value="true"/>
|
||||||
<!-- Server password -->
|
<!-- Server password -->
|
||||||
<password value="${installer.server.password}"/>
|
<password value="Z6JYIY9o9rX3FCWTz0sffYdiLdg="/>
|
||||||
</security>
|
</security>
|
||||||
</websitepanel.server>
|
</websitepanel.server>
|
||||||
<system.web>
|
<system.web>
|
||||||
|
|
|
@ -121,7 +121,7 @@
|
||||||
<value><p>When you grant <b>Full Access</b> permission to a user, that user can open this mailbox and access all of its content.</p> <br><p>When you grant <b>Send As</b> permission to a user, that user can send messages as this mailbox. </p><br><p>We do not recommend to use this setting together “Send on behalf” (“Send as”) – it may work unpredictable.</p></value>
|
<value><p>When you grant <b>Full Access</b> permission to a user, that user can open this mailbox and access all of its content.</p> <br><p>When you grant <b>Send As</b> permission to a user, that user can send messages as this mailbox. </p><br><p>We do not recommend to use this setting together “Send on behalf” (“Send as”) – it may work unpredictable.</p></value>
|
||||||
</data>
|
</data>
|
||||||
<data name="lblGrandPermissions.Text" xml:space="preserve">
|
<data name="lblGrandPermissions.Text" xml:space="preserve">
|
||||||
<value>Grand this permission to:</value>
|
<value>Grant this permission to:</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="secSendAs.Text" xml:space="preserve">
|
<data name="secSendAs.Text" xml:space="preserve">
|
||||||
<value>Send As</value>
|
<value>Send As</value>
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
function HighlightRow(chkB)
|
function HighlightRow(chkB)
|
||||||
{
|
{
|
||||||
var xState=chkB.checked;
|
var xState=chkB.checked;
|
||||||
var row = chkB.parentElement.parentElement;
|
var row = chkB.parentNode.parentNode;
|
||||||
if(xState)
|
if(xState)
|
||||||
{
|
{
|
||||||
row.setAttribute("temp_class", row.className);
|
row.setAttribute("temp_class", row.className);
|
||||||
|
|
|
@ -68,7 +68,7 @@ namespace WebsitePanel.Portal.ProviderControls
|
||||||
hosts = ES.Services.VPSPC.GetClusters(PanelRequest.ServiceId);
|
hosts = ES.Services.VPSPC.GetClusters(PanelRequest.ServiceId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch
|
||||||
{
|
{
|
||||||
hosts = null;
|
hosts = null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,7 +130,7 @@ namespace WebsitePanel.Portal.VPSForPC
|
||||||
btn.Enabled = false;
|
btn.Enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
messageBox.ShowErrorMessage("VPS_ERROR_CREATE", new Exception("no templates"));
|
messageBox.ShowErrorMessage("VPS_ERROR_CREATE", new Exception("no templates", ex));
|
||||||
}
|
}
|
||||||
// summary letter e-mail
|
// summary letter e-mail
|
||||||
PackageInfo package = ES.Services.Packages.GetPackage(PanelSecurity.PackageId);
|
PackageInfo package = ES.Services.Packages.GetPackage(PanelSecurity.PackageId);
|
||||||
|
|
|
@ -85,7 +85,7 @@ namespace WebsitePanel.Portal.VPSForPC
|
||||||
listOperatingSystems.Enabled = false;
|
listOperatingSystems.Enabled = false;
|
||||||
txtVmName.Enabled = false;
|
txtVmName.Enabled = false;
|
||||||
btnCreate.Enabled = false;
|
btnCreate.Enabled = false;
|
||||||
messageBox.ShowErrorMessage("VPS_ERROR_CREATE", new Exception("no VM"));
|
messageBox.ShowErrorMessage("VPS_ERROR_CREATE", new Exception("no VM", ex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,12 +67,7 @@ namespace WebsitePanel.Portal.VPSForPC
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
vm = null;
|
messageBox.ShowErrorMessage("VPS_LOAD_VM_META_ITEM", ex);
|
||||||
}
|
|
||||||
|
|
||||||
if (vm == null)
|
|
||||||
{
|
|
||||||
messageBox.ShowErrorMessage("VPS_LOAD_VM_META_ITEM");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,15 +107,23 @@ namespace WebsitePanel.Portal
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BindListOfAvailableSslDomains(ServerBinding[] siteBindings, SSLCertificate[] siteCertificates)
|
private void BindListOfAvailableSslDomains(ServerBinding[] siteBindings, SSLCertificate[] siteCertificates, string websiteName = "")
|
||||||
{
|
{
|
||||||
lstDomains.Items.Clear();
|
lstDomains.Items.Clear();
|
||||||
//
|
//
|
||||||
foreach (ServerBinding binding in siteBindings)
|
foreach (ServerBinding binding in siteBindings)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
lstDomains.Items.Add(new ListItem(binding.Host, binding.Host));
|
if (binding.IP.ToString().Length > 0 && binding.Host.Length == 0)
|
||||||
}
|
{
|
||||||
|
lstDomains.Items.Add(new ListItem(websiteName, websiteName));
|
||||||
|
lstDomains.Items.Add(new ListItem(String.Format("www.{0}", websiteName), String.Format("www.{0}", websiteName)));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lstDomains.Items.Add(new ListItem(binding.Host, binding.Host));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void BindWebItem(WebVirtualDirectory item)
|
public void BindWebItem(WebVirtualDirectory item)
|
||||||
|
@ -137,7 +145,7 @@ namespace WebsitePanel.Portal
|
||||||
|
|
||||||
SSLNotInstalled.Visible = true;
|
SSLNotInstalled.Visible = true;
|
||||||
//
|
//
|
||||||
BindListOfAvailableSslDomains(webSite.Bindings, certificates);
|
BindListOfAvailableSslDomains(webSite.Bindings, certificates, webSite.Name);
|
||||||
|
|
||||||
if (certificates.Length > 0)
|
if (certificates.Length > 0)
|
||||||
{
|
{
|
||||||
|
@ -560,7 +568,7 @@ namespace WebsitePanel.Portal
|
||||||
|
|
||||||
SSLNotInstalled.Visible = true;
|
SSLNotInstalled.Visible = true;
|
||||||
//
|
//
|
||||||
BindListOfAvailableSslDomains(item.Bindings, certificates);
|
BindListOfAvailableSslDomains(item.Bindings, certificates, item.Name);
|
||||||
|
|
||||||
if (certificates.Length > 0)
|
if (certificates.Length > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe build.xml /target:Build /property:BuildConfiguration=Debug /v:d /fileLogger
|
%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe build.xml /target:Build /property:BuildConfiguration=Debug /v:n /fileLogger
|
|
@ -1 +1 @@
|
||||||
%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe build.xml /target:Build /property:BuildConfiguration=Release /v:d /fileLogger
|
%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe build.xml /target:Build /property:BuildConfiguration=Release /v:n /fileLogger
|
|
@ -1,10 +1,10 @@
|
||||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="C:\Program Files (x86)\MSBuild\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>
|
<Import Project="C:\Program Files (x86)\MSBuild\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>1.2.0.0</Version>
|
<Version>1.2.1.0</Version>
|
||||||
<FileVersion>1.2.0.38</FileVersion>
|
<FileVersion>1.2.1.0</FileVersion>
|
||||||
<VersionLabel>1.2.0</VersionLabel>
|
<VersionLabel>1.2.1</VersionLabel>
|
||||||
<ReleaseDate>2011-07-13</ReleaseDate>
|
<ReleaseDate>2012-01-19</ReleaseDate>
|
||||||
<BuildConfiguration>Release</BuildConfiguration>
|
<BuildConfiguration>Release</BuildConfiguration>
|
||||||
<RootFolder>..</RootFolder>
|
<RootFolder>..</RootFolder>
|
||||||
<TrunkFolder>$(RootFolder)\WebsitePanel</TrunkFolder>
|
<TrunkFolder>$(RootFolder)\WebsitePanel</TrunkFolder>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe build.xml /target:Deploy /property:BuildConfiguration=Debug /v:d /fileLogger
|
%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe build.xml /target:Deploy /property:BuildConfiguration=Debug /v:n /fileLogger
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe build.xml /target:Deploy /property:BuildConfiguration=Release /v:d /fileLogger
|
%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe build.xml /target:Deploy /property:BuildConfiguration=Release /v:n /fileLogger
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue