Merge
This commit is contained in:
commit
ec10aa7f0c
328 changed files with 70724 additions and 2992 deletions
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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) [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
|
@ -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,7 +14,7 @@
|
||||||
<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>
|
||||||
|
@ -26,23 +26,38 @@
|
||||||
<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)" />
|
||||||
<!--
|
<!--
|
||||||
|
|
|
@ -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>
|
BIN
WebsitePanel.Installer/Sources/Setup.WIXInstaller/failmark.ico
Normal file
BIN
WebsitePanel.Installer/Sources/Setup.WIXInstaller/failmark.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
WebsitePanel.Installer/Sources/Setup.WIXInstaller/passmark.ico
Normal file
BIN
WebsitePanel.Installer/Sources/Setup.WIXInstaller/passmark.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
|
@ -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.
|
||||||
|
|
|
@ -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
|
||||||
|
|
Binary file not shown.
|
@ -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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,5 +170,7 @@ namespace WebsitePanel.Setup
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static TraceListenerCollection Listeners { get { return Trace.Listeners; } }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -339,7 +339,7 @@ namespace WebsitePanel.Setup
|
||||||
/// <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
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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
|
@ -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" />
|
||||||
|
|
|
@ -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())
|
||||||
|
|
|
@ -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));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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";
|
||||||
|
}
|
||||||
|
}
|
|
@ -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)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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 }));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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"; } }
|
||||||
|
}
|
||||||
|
}
|
|
@ -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))
|
||||||
{
|
{
|
||||||
|
@ -138,6 +331,52 @@ namespace WebsitePanel.WIXInstaller
|
||||||
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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)" />
|
||||||
|
|
|
@ -10031,6 +10031,37 @@ UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordResetLetterTextBo
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
DECLARE @UserPasswordResetSMSBody nvarchar(2500)
|
||||||
|
|
||||||
|
Set @UserPasswordResetSMSBody = N'Password reset link:
|
||||||
|
#passwordResetLink#
|
||||||
|
'
|
||||||
|
|
||||||
|
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetLetter' AND [PropertyName]= N'PasswordResetLinkSmsBody' )
|
||||||
|
BEGIN
|
||||||
|
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetLetter', N'PasswordResetLinkSmsBody', @UserPasswordResetSMSBody)
|
||||||
|
END
|
||||||
|
ELSE
|
||||||
|
UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordResetSMSBody WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetLetter' AND [PropertyName]= N'PasswordResetLinkSmsBody'
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
DECLARE @UserPasswordPincodeSMSBody nvarchar(2500)
|
||||||
|
|
||||||
|
Set @UserPasswordPincodeSMSBody = N'
|
||||||
|
Your password reset pincode:
|
||||||
|
#passwordResetPincode#'
|
||||||
|
|
||||||
|
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetLetter' AND [PropertyName]= N'PasswordResetPincodeSmsBody' )
|
||||||
|
BEGIN
|
||||||
|
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetLetter', N'PasswordResetPincodeSmsBody', @UserPasswordPincodeSMSBody)
|
||||||
|
END
|
||||||
|
ELSE
|
||||||
|
UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordPincodeSMSBody WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetLetter' AND [PropertyName]= N'PasswordResetPincodeSmsBody'
|
||||||
|
GO
|
||||||
|
|
||||||
-- Exchange setup EMAIL TEMPLATE
|
-- Exchange setup EMAIL TEMPLATE
|
||||||
|
|
||||||
|
|
||||||
|
@ -10685,3 +10716,229 @@ 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) = ''
|
||||||
|
)
|
||||||
|
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;
|
||||||
|
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 + ' ) ';
|
||||||
|
|
||||||
|
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
|
||||||
|
|
45307
WebsitePanel/Database/wix_install_db.sql
Normal file
45307
WebsitePanel/Database/wix_install_db.sql
Normal file
File diff suppressed because it is too large
Load diff
10676
WebsitePanel/Database/wix_update_db.sql
Normal file
10676
WebsitePanel/Database/wix_update_db.sql
Normal file
File diff suppressed because it is too large
Load diff
6
WebsitePanel/Sources/Tools/.nuget/NuGet.Config
Normal file
6
WebsitePanel/Sources/Tools/.nuget/NuGet.Config
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<solution>
|
||||||
|
<add key="disableSourceControlIntegration" value="true" />
|
||||||
|
</solution>
|
||||||
|
</configuration>
|
BIN
WebsitePanel/Sources/Tools/.nuget/NuGet.exe
Normal file
BIN
WebsitePanel/Sources/Tools/.nuget/NuGet.exe
Normal file
Binary file not shown.
144
WebsitePanel/Sources/Tools/.nuget/NuGet.targets
Normal file
144
WebsitePanel/Sources/Tools/.nuget/NuGet.targets
Normal file
|
@ -0,0 +1,144 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
|
||||||
|
|
||||||
|
<!-- Enable the restore command to run before builds -->
|
||||||
|
<RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>
|
||||||
|
|
||||||
|
<!-- Property that enables building a package from a project -->
|
||||||
|
<BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>
|
||||||
|
|
||||||
|
<!-- Determines if package restore consent is required to restore packages -->
|
||||||
|
<RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent>
|
||||||
|
|
||||||
|
<!-- Download NuGet.exe if it does not already exist -->
|
||||||
|
<DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition=" '$(PackageSources)' == '' ">
|
||||||
|
<!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
|
||||||
|
<!-- The official NuGet package source (https://www.nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->
|
||||||
|
<!--
|
||||||
|
<PackageSource Include="https://www.nuget.org/api/v2/" />
|
||||||
|
<PackageSource Include="https://my-nuget-source/nuget/" />
|
||||||
|
-->
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
|
||||||
|
<!-- Windows specific commands -->
|
||||||
|
<NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
|
||||||
|
<!-- We need to launch nuget.exe with the mono command if we're not on windows -->
|
||||||
|
<NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<PackagesProjectConfig Condition=" '$(OS)' == 'Windows_NT'">$(MSBuildProjectDirectory)\packages.$(MSBuildProjectName.Replace(' ', '_')).config</PackagesProjectConfig>
|
||||||
|
<PackagesProjectConfig Condition=" '$(OS)' != 'Windows_NT'">$(MSBuildProjectDirectory)\packages.$(MSBuildProjectName).config</PackagesProjectConfig>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<PackagesConfig Condition="Exists('$(MSBuildProjectDirectory)\packages.config')">$(MSBuildProjectDirectory)\packages.config</PackagesConfig>
|
||||||
|
<PackagesConfig Condition="Exists('$(PackagesProjectConfig)')">$(PackagesProjectConfig)</PackagesConfig>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<!-- NuGet command -->
|
||||||
|
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\NuGet.exe</NuGetExePath>
|
||||||
|
<PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>
|
||||||
|
|
||||||
|
<NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
|
||||||
|
<NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 "$(NuGetExePath)"</NuGetCommand>
|
||||||
|
|
||||||
|
<PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
|
||||||
|
|
||||||
|
<RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
|
||||||
|
<NonInteractiveSwitch Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' ">-NonInteractive</NonInteractiveSwitch>
|
||||||
|
|
||||||
|
<PaddedSolutionDir Condition=" '$(OS)' == 'Windows_NT'">"$(SolutionDir) "</PaddedSolutionDir>
|
||||||
|
<PaddedSolutionDir Condition=" '$(OS)' != 'Windows_NT' ">"$(SolutionDir)"</PaddedSolutionDir>
|
||||||
|
|
||||||
|
<!-- Commands -->
|
||||||
|
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)</RestoreCommand>
|
||||||
|
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand>
|
||||||
|
|
||||||
|
<!-- We need to ensure packages are restored prior to assembly resolve -->
|
||||||
|
<BuildDependsOn Condition="$(RestorePackages) == 'true'">
|
||||||
|
RestorePackages;
|
||||||
|
$(BuildDependsOn);
|
||||||
|
</BuildDependsOn>
|
||||||
|
|
||||||
|
<!-- Make the build depend on restore packages -->
|
||||||
|
<BuildDependsOn Condition="$(BuildPackage) == 'true'">
|
||||||
|
$(BuildDependsOn);
|
||||||
|
BuildPackage;
|
||||||
|
</BuildDependsOn>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<Target Name="CheckPrerequisites">
|
||||||
|
<!-- Raise an error if we're unable to locate nuget.exe -->
|
||||||
|
<Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
|
||||||
|
<!--
|
||||||
|
Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.
|
||||||
|
This effectively acts as a lock that makes sure that the download operation will only happen once and all
|
||||||
|
parallel builds will have to wait for it to complete.
|
||||||
|
-->
|
||||||
|
<MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)" />
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
<Target Name="_DownloadNuGet">
|
||||||
|
<DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
|
||||||
|
<Exec Command="$(RestoreCommand)"
|
||||||
|
Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />
|
||||||
|
|
||||||
|
<Exec Command="$(RestoreCommand)"
|
||||||
|
LogStandardErrorAsError="true"
|
||||||
|
Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
<Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
|
||||||
|
<Exec Command="$(BuildCommand)"
|
||||||
|
Condition=" '$(OS)' != 'Windows_NT' " />
|
||||||
|
|
||||||
|
<Exec Command="$(BuildCommand)"
|
||||||
|
LogStandardErrorAsError="true"
|
||||||
|
Condition=" '$(OS)' == 'Windows_NT' " />
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
<UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
|
||||||
|
<ParameterGroup>
|
||||||
|
<OutputFilename ParameterType="System.String" Required="true" />
|
||||||
|
</ParameterGroup>
|
||||||
|
<Task>
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Using Namespace="System" />
|
||||||
|
<Using Namespace="System.IO" />
|
||||||
|
<Using Namespace="System.Net" />
|
||||||
|
<Using Namespace="Microsoft.Build.Framework" />
|
||||||
|
<Using Namespace="Microsoft.Build.Utilities" />
|
||||||
|
<Code Type="Fragment" Language="cs">
|
||||||
|
<![CDATA[
|
||||||
|
try {
|
||||||
|
OutputFilename = Path.GetFullPath(OutputFilename);
|
||||||
|
|
||||||
|
Log.LogMessage("Downloading latest version of NuGet.exe...");
|
||||||
|
WebClient webClient = new WebClient();
|
||||||
|
webClient.DownloadFile("https://www.nuget.org/nuget.exe", OutputFilename);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
catch (Exception ex) {
|
||||||
|
Log.LogErrorFromException(ex);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
]]>
|
||||||
|
</Code>
|
||||||
|
</Task>
|
||||||
|
</UsingTask>
|
||||||
|
</Project>
|
|
@ -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>
|
||||||
|
|
|
@ -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.
|
||||||
|
|
|
@ -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.
|
||||||
|
|
|
@ -47,6 +47,14 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
public const string PACKAGE_DISPLAY_SETTINGS = "PackageDisplaySettings";
|
public const string PACKAGE_DISPLAY_SETTINGS = "PackageDisplaySettings";
|
||||||
public const string RDS_SETTINGS = "RdsSettings";
|
public const string RDS_SETTINGS = "RdsSettings";
|
||||||
public const string WEBDAV_PORTAL_SETTINGS = "WebdavPortalSettings";
|
public const string WEBDAV_PORTAL_SETTINGS = "WebdavPortalSettings";
|
||||||
|
public const string TWILIO_SETTINGS = "TwilioSettings";
|
||||||
|
|
||||||
|
|
||||||
|
//Keys
|
||||||
|
public const string TWILIO_ACCOUNTSID_KEY = "TwilioAccountSid";
|
||||||
|
public const string TWILIO_AUTHTOKEN_KEY = "TwilioAuthToken";
|
||||||
|
public const string TWILIO_PHONEFROM_KEY = "TwilioPhoneFrom";
|
||||||
|
|
||||||
public const string WEBDAV_PASSWORD_RESET_ENABLED_KEY = "WebdavPswResetEnabled";
|
public const string WEBDAV_PASSWORD_RESET_ENABLED_KEY = "WebdavPswResetEnabled";
|
||||||
|
|
||||||
// key to access to wpi main & custom feed in wpi settings
|
// key to access to wpi main & custom feed in wpi settings
|
||||||
|
|
|
@ -11,6 +11,12 @@
|
||||||
//
|
//
|
||||||
// This source code was auto-generated by wsdl, Version=2.0.50727.3038.
|
// This source code was auto-generated by wsdl, Version=2.0.50727.3038.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
using WebsitePanel.Providers;
|
||||||
|
using WebsitePanel.Providers.Common;
|
||||||
|
using WebsitePanel.Providers.HostedSolution;
|
||||||
|
using WebsitePanel.Providers.ResultObjects;
|
||||||
|
|
||||||
namespace WebsitePanel.EnterpriseServer {
|
namespace WebsitePanel.EnterpriseServer {
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
using System.Web.Services;
|
using System.Web.Services;
|
||||||
|
@ -19,10 +25,6 @@ namespace WebsitePanel.EnterpriseServer {
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using WebsitePanel.Providers.HostedSolution;
|
|
||||||
using WebsitePanel.Providers.Common;
|
|
||||||
using WebsitePanel.Providers.ResultObjects;
|
|
||||||
using WebsitePanel.Providers;
|
|
||||||
|
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
|
@ -4311,24 +4313,26 @@ namespace WebsitePanel.EnterpriseServer {
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxSetupInstructions", 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/GetMailboxSetupInstructions", 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 string GetMailboxSetupInstructions(int itemId, int accountId, bool pmm, bool emailMode, bool signup) {
|
public string GetMailboxSetupInstructions(int itemId, int accountId, bool pmm, bool emailMode, bool signup, string passwordResetUrl) {
|
||||||
object[] results = this.Invoke("GetMailboxSetupInstructions", new object[] {
|
object[] results = this.Invoke("GetMailboxSetupInstructions", new object[] {
|
||||||
itemId,
|
itemId,
|
||||||
accountId,
|
accountId,
|
||||||
pmm,
|
pmm,
|
||||||
emailMode,
|
emailMode,
|
||||||
signup});
|
signup,
|
||||||
|
passwordResetUrl});
|
||||||
return ((string)(results[0]));
|
return ((string)(results[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public System.IAsyncResult BeginGetMailboxSetupInstructions(int itemId, int accountId, bool pmm, bool emailMode, bool signup, System.AsyncCallback callback, object asyncState) {
|
public System.IAsyncResult BeginGetMailboxSetupInstructions(int itemId, int accountId, bool pmm, bool emailMode, bool signup, string passwordResetUrl, System.AsyncCallback callback, object asyncState) {
|
||||||
return this.BeginInvoke("GetMailboxSetupInstructions", new object[] {
|
return this.BeginInvoke("GetMailboxSetupInstructions", new object[] {
|
||||||
itemId,
|
itemId,
|
||||||
accountId,
|
accountId,
|
||||||
pmm,
|
pmm,
|
||||||
emailMode,
|
emailMode,
|
||||||
signup}, callback, asyncState);
|
signup,
|
||||||
|
passwordResetUrl}, callback, asyncState);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
|
@ -4338,12 +4342,12 @@ namespace WebsitePanel.EnterpriseServer {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public void GetMailboxSetupInstructionsAsync(int itemId, int accountId, bool pmm, bool emailMode, bool signup) {
|
public void GetMailboxSetupInstructionsAsync(int itemId, int accountId, bool pmm, bool emailMode, bool signup, string passwordResetUrl) {
|
||||||
this.GetMailboxSetupInstructionsAsync(itemId, accountId, pmm, emailMode, signup, null);
|
this.GetMailboxSetupInstructionsAsync(itemId, accountId, pmm, emailMode, signup, passwordResetUrl, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public void GetMailboxSetupInstructionsAsync(int itemId, int accountId, bool pmm, bool emailMode, bool signup, object userState) {
|
public void GetMailboxSetupInstructionsAsync(int itemId, int accountId, bool pmm, bool emailMode, bool signup, string passwordResetUrl, object userState) {
|
||||||
if ((this.GetMailboxSetupInstructionsOperationCompleted == null)) {
|
if ((this.GetMailboxSetupInstructionsOperationCompleted == null)) {
|
||||||
this.GetMailboxSetupInstructionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMailboxSetupInstructionsOperationCompleted);
|
this.GetMailboxSetupInstructionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMailboxSetupInstructionsOperationCompleted);
|
||||||
}
|
}
|
||||||
|
@ -4352,7 +4356,8 @@ namespace WebsitePanel.EnterpriseServer {
|
||||||
accountId,
|
accountId,
|
||||||
pmm,
|
pmm,
|
||||||
emailMode,
|
emailMode,
|
||||||
signup}, this.GetMailboxSetupInstructionsOperationCompleted, userState);
|
signup,
|
||||||
|
passwordResetUrl}, this.GetMailboxSetupInstructionsOperationCompleted, userState);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnGetMailboxSetupInstructionsOperationCompleted(object arg) {
|
private void OnGetMailboxSetupInstructionsOperationCompleted(object arg) {
|
||||||
|
|
|
@ -80,6 +80,12 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
||||||
|
|
||||||
private System.Threading.SendOrPostCallback SetDefaultOrganizationOperationCompleted;
|
private System.Threading.SendOrPostCallback SetDefaultOrganizationOperationCompleted;
|
||||||
|
|
||||||
|
private System.Threading.SendOrPostCallback GetUserGeneralSettingsWithExtraDataOperationCompleted;
|
||||||
|
|
||||||
|
private System.Threading.SendOrPostCallback SendResetUserPasswordLinkSmsOperationCompleted;
|
||||||
|
|
||||||
|
private System.Threading.SendOrPostCallback SendResetUserPasswordPincodeSmsOperationCompleted;
|
||||||
|
|
||||||
private System.Threading.SendOrPostCallback AddOrganizationDomainOperationCompleted;
|
private System.Threading.SendOrPostCallback AddOrganizationDomainOperationCompleted;
|
||||||
|
|
||||||
private System.Threading.SendOrPostCallback ChangeOrganizationDomainTypeOperationCompleted;
|
private System.Threading.SendOrPostCallback ChangeOrganizationDomainTypeOperationCompleted;
|
||||||
|
@ -229,6 +235,15 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public event SetDefaultOrganizationCompletedEventHandler SetDefaultOrganizationCompleted;
|
public event SetDefaultOrganizationCompletedEventHandler SetDefaultOrganizationCompleted;
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public event GetUserGeneralSettingsWithExtraDataCompletedEventHandler GetUserGeneralSettingsWithExtraDataCompleted;
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public event SendResetUserPasswordLinkSmsCompletedEventHandler SendResetUserPasswordLinkSmsCompleted;
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public event SendResetUserPasswordPincodeSmsCompletedEventHandler SendResetUserPasswordPincodeSmsCompleted;
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public event AddOrganizationDomainCompletedEventHandler AddOrganizationDomainCompleted;
|
public event AddOrganizationDomainCompletedEventHandler AddOrganizationDomainCompleted;
|
||||||
|
|
||||||
|
@ -1310,6 +1325,144 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetUserGeneralSettingsWithExtraData", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||||
|
public OrganizationUser GetUserGeneralSettingsWithExtraData(int itemId, int accountId) {
|
||||||
|
object[] results = this.Invoke("GetUserGeneralSettingsWithExtraData", new object[] {
|
||||||
|
itemId,
|
||||||
|
accountId});
|
||||||
|
return ((OrganizationUser)(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public System.IAsyncResult BeginGetUserGeneralSettingsWithExtraData(int itemId, int accountId, System.AsyncCallback callback, object asyncState) {
|
||||||
|
return this.BeginInvoke("GetUserGeneralSettingsWithExtraData", new object[] {
|
||||||
|
itemId,
|
||||||
|
accountId}, callback, asyncState);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public OrganizationUser EndGetUserGeneralSettingsWithExtraData(System.IAsyncResult asyncResult) {
|
||||||
|
object[] results = this.EndInvoke(asyncResult);
|
||||||
|
return ((OrganizationUser)(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void GetUserGeneralSettingsWithExtraDataAsync(int itemId, int accountId) {
|
||||||
|
this.GetUserGeneralSettingsWithExtraDataAsync(itemId, accountId, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void GetUserGeneralSettingsWithExtraDataAsync(int itemId, int accountId, object userState) {
|
||||||
|
if ((this.GetUserGeneralSettingsWithExtraDataOperationCompleted == null)) {
|
||||||
|
this.GetUserGeneralSettingsWithExtraDataOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetUserGeneralSettingsWithExtraDataOperationCompleted);
|
||||||
|
}
|
||||||
|
this.InvokeAsync("GetUserGeneralSettingsWithExtraData", new object[] {
|
||||||
|
itemId,
|
||||||
|
accountId}, this.GetUserGeneralSettingsWithExtraDataOperationCompleted, userState);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnGetUserGeneralSettingsWithExtraDataOperationCompleted(object arg) {
|
||||||
|
if ((this.GetUserGeneralSettingsWithExtraDataCompleted != null)) {
|
||||||
|
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||||
|
this.GetUserGeneralSettingsWithExtraDataCompleted(this, new GetUserGeneralSettingsWithExtraDataCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SendResetUserPasswordLinkSms", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||||
|
public ResultObject SendResetUserPasswordLinkSms(int itemId, int accountId, string reason, string phoneTo) {
|
||||||
|
object[] results = this.Invoke("SendResetUserPasswordLinkSms", new object[] {
|
||||||
|
itemId,
|
||||||
|
accountId,
|
||||||
|
reason,
|
||||||
|
phoneTo});
|
||||||
|
return ((ResultObject)(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public System.IAsyncResult BeginSendResetUserPasswordLinkSms(int itemId, int accountId, string reason, string phoneTo, System.AsyncCallback callback, object asyncState) {
|
||||||
|
return this.BeginInvoke("SendResetUserPasswordLinkSms", new object[] {
|
||||||
|
itemId,
|
||||||
|
accountId,
|
||||||
|
reason,
|
||||||
|
phoneTo}, callback, asyncState);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public ResultObject EndSendResetUserPasswordLinkSms(System.IAsyncResult asyncResult) {
|
||||||
|
object[] results = this.EndInvoke(asyncResult);
|
||||||
|
return ((ResultObject)(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void SendResetUserPasswordLinkSmsAsync(int itemId, int accountId, string reason, string phoneTo) {
|
||||||
|
this.SendResetUserPasswordLinkSmsAsync(itemId, accountId, reason, phoneTo, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void SendResetUserPasswordLinkSmsAsync(int itemId, int accountId, string reason, string phoneTo, object userState) {
|
||||||
|
if ((this.SendResetUserPasswordLinkSmsOperationCompleted == null)) {
|
||||||
|
this.SendResetUserPasswordLinkSmsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSendResetUserPasswordLinkSmsOperationCompleted);
|
||||||
|
}
|
||||||
|
this.InvokeAsync("SendResetUserPasswordLinkSms", new object[] {
|
||||||
|
itemId,
|
||||||
|
accountId,
|
||||||
|
reason,
|
||||||
|
phoneTo}, this.SendResetUserPasswordLinkSmsOperationCompleted, userState);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnSendResetUserPasswordLinkSmsOperationCompleted(object arg) {
|
||||||
|
if ((this.SendResetUserPasswordLinkSmsCompleted != null)) {
|
||||||
|
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||||
|
this.SendResetUserPasswordLinkSmsCompleted(this, new SendResetUserPasswordLinkSmsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SendResetUserPasswordPincodeSms", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||||
|
public ResultObject SendResetUserPasswordPincodeSms(System.Guid token, string phoneTo) {
|
||||||
|
object[] results = this.Invoke("SendResetUserPasswordPincodeSms", new object[] {
|
||||||
|
token,
|
||||||
|
phoneTo});
|
||||||
|
return ((ResultObject)(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public System.IAsyncResult BeginSendResetUserPasswordPincodeSms(System.Guid token, string phoneTo, System.AsyncCallback callback, object asyncState) {
|
||||||
|
return this.BeginInvoke("SendResetUserPasswordPincodeSms", new object[] {
|
||||||
|
token,
|
||||||
|
phoneTo}, callback, asyncState);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public ResultObject EndSendResetUserPasswordPincodeSms(System.IAsyncResult asyncResult) {
|
||||||
|
object[] results = this.EndInvoke(asyncResult);
|
||||||
|
return ((ResultObject)(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void SendResetUserPasswordPincodeSmsAsync(System.Guid token, string phoneTo) {
|
||||||
|
this.SendResetUserPasswordPincodeSmsAsync(token, phoneTo, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void SendResetUserPasswordPincodeSmsAsync(System.Guid token, string phoneTo, object userState) {
|
||||||
|
if ((this.SendResetUserPasswordPincodeSmsOperationCompleted == null)) {
|
||||||
|
this.SendResetUserPasswordPincodeSmsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSendResetUserPasswordPincodeSmsOperationCompleted);
|
||||||
|
}
|
||||||
|
this.InvokeAsync("SendResetUserPasswordPincodeSms", new object[] {
|
||||||
|
token,
|
||||||
|
phoneTo}, this.SendResetUserPasswordPincodeSmsOperationCompleted, userState);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnSendResetUserPasswordPincodeSmsOperationCompleted(object arg) {
|
||||||
|
if ((this.SendResetUserPasswordPincodeSmsCompleted != null)) {
|
||||||
|
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||||
|
this.SendResetUserPasswordPincodeSmsCompleted(this, new SendResetUserPasswordPincodeSmsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddOrganizationDomain", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddOrganizationDomain", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||||
public int AddOrganizationDomain(int itemId, string domainName) {
|
public int AddOrganizationDomain(int itemId, string domainName) {
|
||||||
|
@ -2495,21 +2648,23 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SendResetUserPasswordEmail", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SendResetUserPasswordEmail", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||||
public void SendResetUserPasswordEmail(int itemId, int accountId, string reason, string mailTo) {
|
public void SendResetUserPasswordEmail(int itemId, int accountId, string reason, string mailTo, bool finalStep) {
|
||||||
this.Invoke("SendResetUserPasswordEmail", new object[] {
|
this.Invoke("SendResetUserPasswordEmail", new object[] {
|
||||||
itemId,
|
itemId,
|
||||||
accountId,
|
accountId,
|
||||||
reason,
|
reason,
|
||||||
mailTo});
|
mailTo,
|
||||||
|
finalStep});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public System.IAsyncResult BeginSendResetUserPasswordEmail(int itemId, int accountId, string reason, string mailTo, System.AsyncCallback callback, object asyncState) {
|
public System.IAsyncResult BeginSendResetUserPasswordEmail(int itemId, int accountId, string reason, string mailTo, bool finalStep, System.AsyncCallback callback, object asyncState) {
|
||||||
return this.BeginInvoke("SendResetUserPasswordEmail", new object[] {
|
return this.BeginInvoke("SendResetUserPasswordEmail", new object[] {
|
||||||
itemId,
|
itemId,
|
||||||
accountId,
|
accountId,
|
||||||
reason,
|
reason,
|
||||||
mailTo}, callback, asyncState);
|
mailTo,
|
||||||
|
finalStep}, callback, asyncState);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
|
@ -2518,12 +2673,12 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public void SendResetUserPasswordEmailAsync(int itemId, int accountId, string reason, string mailTo) {
|
public void SendResetUserPasswordEmailAsync(int itemId, int accountId, string reason, string mailTo, bool finalStep) {
|
||||||
this.SendResetUserPasswordEmailAsync(itemId, accountId, reason, mailTo, null);
|
this.SendResetUserPasswordEmailAsync(itemId, accountId, reason, mailTo, finalStep, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public void SendResetUserPasswordEmailAsync(int itemId, int accountId, string reason, string mailTo, object userState) {
|
public void SendResetUserPasswordEmailAsync(int itemId, int accountId, string reason, string mailTo, bool finalStep, object userState) {
|
||||||
if ((this.SendResetUserPasswordEmailOperationCompleted == null)) {
|
if ((this.SendResetUserPasswordEmailOperationCompleted == null)) {
|
||||||
this.SendResetUserPasswordEmailOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSendResetUserPasswordEmailOperationCompleted);
|
this.SendResetUserPasswordEmailOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSendResetUserPasswordEmailOperationCompleted);
|
||||||
}
|
}
|
||||||
|
@ -2531,7 +2686,8 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
||||||
itemId,
|
itemId,
|
||||||
accountId,
|
accountId,
|
||||||
reason,
|
reason,
|
||||||
mailTo}, this.SendResetUserPasswordEmailOperationCompleted, userState);
|
mailTo,
|
||||||
|
finalStep}, this.SendResetUserPasswordEmailOperationCompleted, userState);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnSendResetUserPasswordEmailOperationCompleted(object arg) {
|
private void OnSendResetUserPasswordEmailOperationCompleted(object arg) {
|
||||||
|
@ -3816,6 +3972,84 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
||||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
public delegate void SetDefaultOrganizationCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
public delegate void SetDefaultOrganizationCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
|
public delegate void GetUserGeneralSettingsWithExtraDataCompletedEventHandler(object sender, GetUserGeneralSettingsWithExtraDataCompletedEventArgs e);
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||||
|
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||||
|
public partial class GetUserGeneralSettingsWithExtraDataCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||||
|
|
||||||
|
private object[] results;
|
||||||
|
|
||||||
|
internal GetUserGeneralSettingsWithExtraDataCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||||
|
base(exception, cancelled, userState) {
|
||||||
|
this.results = results;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public OrganizationUser Result {
|
||||||
|
get {
|
||||||
|
this.RaiseExceptionIfNecessary();
|
||||||
|
return ((OrganizationUser)(this.results[0]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
|
public delegate void SendResetUserPasswordLinkSmsCompletedEventHandler(object sender, SendResetUserPasswordLinkSmsCompletedEventArgs e);
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||||
|
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||||
|
public partial class SendResetUserPasswordLinkSmsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||||
|
|
||||||
|
private object[] results;
|
||||||
|
|
||||||
|
internal SendResetUserPasswordLinkSmsCompletedEventArgs(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.3038")]
|
||||||
|
public delegate void SendResetUserPasswordPincodeSmsCompletedEventHandler(object sender, SendResetUserPasswordPincodeSmsCompletedEventArgs e);
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||||
|
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||||
|
public partial class SendResetUserPasswordPincodeSmsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||||
|
|
||||||
|
private object[] results;
|
||||||
|
|
||||||
|
internal SendResetUserPasswordPincodeSmsCompletedEventArgs(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/>
|
/// <remarks/>
|
||||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
public delegate void AddOrganizationDomainCompletedEventHandler(object sender, AddOrganizationDomainCompletedEventArgs e);
|
public delegate void AddOrganizationDomainCompletedEventHandler(object sender, AddOrganizationDomainCompletedEventArgs e);
|
||||||
|
|
|
@ -907,6 +907,27 @@ namespace WebsitePanel.EnterpriseServer {
|
||||||
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)
|
||||||
|
{
|
||||||
|
object[] results = this.Invoke("GetSearchObject", new object[] {
|
||||||
|
userId,
|
||||||
|
filterColumn,
|
||||||
|
filterValue,
|
||||||
|
statusId,
|
||||||
|
roleId,
|
||||||
|
sortColumn,
|
||||||
|
startRow,
|
||||||
|
maximumRows,
|
||||||
|
colType
|
||||||
|
});
|
||||||
|
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);
|
||||||
|
|
|
@ -139,6 +139,27 @@ 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, 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));
|
||||||
|
}
|
||||||
|
|
||||||
|
//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,
|
||||||
|
|
|
@ -2564,7 +2564,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetMailboxSetupInstructions(int itemId, int accountId, bool pmm, bool emailMode, bool signup)
|
public static string GetMailboxSetupInstructions(int itemId, int accountId, bool pmm, bool emailMode, bool signup, string passwordResetUrl)
|
||||||
{
|
{
|
||||||
#region Demo Mode
|
#region Demo Mode
|
||||||
if (IsDemoMode)
|
if (IsDemoMode)
|
||||||
|
@ -2589,12 +2589,11 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
if (String.IsNullOrEmpty(body))
|
if (String.IsNullOrEmpty(body))
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
string result = EvaluateMailboxTemplate(itemId, accountId, pmm, false, false, body);
|
string result = EvaluateMailboxTemplate(itemId, accountId, pmm, false, false, body, passwordResetUrl);
|
||||||
return user.HtmlMail ? result : result.Replace("\n", "<br/>");
|
return user.HtmlMail ? result : result.Replace("\n", "<br/>");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string EvaluateMailboxTemplate(int itemId, int accountId,
|
private static string EvaluateMailboxTemplate(int itemId, int accountId, bool pmm, bool emailMode, bool signup, string template, string passwordResetUrl)
|
||||||
bool pmm, bool emailMode, bool signup, string template)
|
|
||||||
{
|
{
|
||||||
Hashtable items = new Hashtable();
|
Hashtable items = new Hashtable();
|
||||||
|
|
||||||
|
@ -2616,7 +2615,10 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
items["AccountDomain"] = account.PrimaryEmailAddress.Substring(account.PrimaryEmailAddress.IndexOf("@") + 1);
|
items["AccountDomain"] = account.PrimaryEmailAddress.Substring(account.PrimaryEmailAddress.IndexOf("@") + 1);
|
||||||
items["DefaultDomain"] = org.DefaultDomain;
|
items["DefaultDomain"] = org.DefaultDomain;
|
||||||
|
|
||||||
var passwordResetUrl = OrganizationController.GenerateUserPasswordResetLink(account.ItemId, account.AccountId);
|
Guid token;
|
||||||
|
|
||||||
|
passwordResetUrl = OrganizationController.GenerateUserPasswordResetLink(account.ItemId, account.AccountId, out token, string.Empty, passwordResetUrl);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(passwordResetUrl))
|
if (!string.IsNullOrEmpty(passwordResetUrl))
|
||||||
{
|
{
|
||||||
items["PswResetUrl"] = passwordResetUrl;
|
items["PswResetUrl"] = passwordResetUrl;
|
||||||
|
@ -2694,8 +2696,8 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
if (to == null)
|
if (to == null)
|
||||||
to = user.Email;
|
to = user.Email;
|
||||||
|
|
||||||
subject = EvaluateMailboxTemplate(itemId, accountId, false, true, signup, subject);
|
subject = EvaluateMailboxTemplate(itemId, accountId, false, true, signup, subject, string.Empty);
|
||||||
body = EvaluateMailboxTemplate(itemId, accountId, false, true, signup, body);
|
body = EvaluateMailboxTemplate(itemId, accountId, false, true, signup, body, string.Empty);
|
||||||
|
|
||||||
// send message
|
// send message
|
||||||
return MailHelper.SendMessage(from, to, cc, subject, body, priority, isHtml);
|
return MailHelper.SendMessage(from, to, cc, subject, body, priority, isHtml);
|
||||||
|
|
|
@ -30,10 +30,13 @@ using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
|
using System.Configuration;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
using System.Globalization;
|
||||||
using System.Net.Mail;
|
using System.Net.Mail;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Twilio;
|
||||||
using WebsitePanel.EnterpriseServer.Code.HostedSolution;
|
using WebsitePanel.EnterpriseServer.Code.HostedSolution;
|
||||||
using WebsitePanel.EnterpriseServer.Code.SharePoint;
|
using WebsitePanel.EnterpriseServer.Code.SharePoint;
|
||||||
using WebsitePanel.EnterpriseServer.Extensions;
|
using WebsitePanel.EnterpriseServer.Extensions;
|
||||||
|
@ -1560,6 +1563,173 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return expiredUsersDb;
|
return expiredUsersDb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ResultObject SendResetUserPasswordLinkSms(int itemId, int accountId, string reason,
|
||||||
|
string phoneTo = null)
|
||||||
|
{
|
||||||
|
var result = TaskManager.StartResultTask<ResultObject>("ORGANIZATION", "SEND_USER_PASSWORD_RESET_SMS",
|
||||||
|
itemId);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
// load organization
|
||||||
|
Organization org = GetOrganization(itemId);
|
||||||
|
|
||||||
|
if (org == null)
|
||||||
|
{
|
||||||
|
throw new Exception(string.Format("Organization not found (ItemId = {0})", itemId));
|
||||||
|
}
|
||||||
|
|
||||||
|
UserInfo owner = PackageController.GetPackageOwner(org.PackageId);
|
||||||
|
OrganizationUser user = OrganizationController.GetUserGeneralSettingsWithExtraData(itemId, accountId);
|
||||||
|
|
||||||
|
user.ItemId = itemId;
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(phoneTo))
|
||||||
|
{
|
||||||
|
phoneTo = user.MobilePhone;
|
||||||
|
}
|
||||||
|
|
||||||
|
UserSettings settings = UserController.GetUserSettings(owner.UserId,
|
||||||
|
UserSettings.USER_PASSWORD_RESET_LETTER);
|
||||||
|
|
||||||
|
|
||||||
|
string body = settings["PasswordResetLinkSmsBody"];
|
||||||
|
|
||||||
|
var pincode = GeneratePincode();
|
||||||
|
Guid token;
|
||||||
|
|
||||||
|
var items = new Hashtable();
|
||||||
|
|
||||||
|
items["passwordResetLink"] = GenerateUserPasswordResetLink(user.ItemId, user.AccountId, out token, pincode);
|
||||||
|
|
||||||
|
body = PackageController.EvaluateTemplate(body, items);
|
||||||
|
|
||||||
|
TaskManager.Write("Organization ID : " + user.ItemId);
|
||||||
|
TaskManager.Write("Account : " + user.DisplayName);
|
||||||
|
TaskManager.Write("Reason : " + reason);
|
||||||
|
TaskManager.Write("SmsTo : " + phoneTo);
|
||||||
|
|
||||||
|
// send Sms message
|
||||||
|
var response = SendSms(phoneTo, body);
|
||||||
|
|
||||||
|
if (response.RestException != null)
|
||||||
|
{
|
||||||
|
throw new Exception(response.RestException.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
SetAccessTokenResponse(token, pincode);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
TaskManager.WriteError(ex);
|
||||||
|
TaskManager.CompleteResultTask(result);
|
||||||
|
result.AddError("", ex);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
TaskManager.CompleteResultTask();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ResultObject SendResetUserPasswordPincodeSms(Guid token, string phoneTo = null)
|
||||||
|
{
|
||||||
|
var result = TaskManager.StartResultTask<ResultObject>("ORGANIZATION", "SEND_USER_PASSWORD_RESET_SMS_PINCODE");
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var accessToken = OrganizationController.GetAccessToken(token, AccessTokenTypes.PasswrodReset);
|
||||||
|
|
||||||
|
if (accessToken == null)
|
||||||
|
{
|
||||||
|
throw new Exception(string.Format("Access token not found"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// load organization
|
||||||
|
Organization org = GetOrganization(accessToken.ItemId);
|
||||||
|
|
||||||
|
if (org == null)
|
||||||
|
{
|
||||||
|
throw new Exception(string.Format("Organization not found"));
|
||||||
|
}
|
||||||
|
|
||||||
|
UserInfo owner = PackageController.GetPackageOwner(org.PackageId);
|
||||||
|
OrganizationUser user = OrganizationController.GetUserGeneralSettingsWithExtraData(accessToken.ItemId,
|
||||||
|
accessToken.AccountId);
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(phoneTo))
|
||||||
|
{
|
||||||
|
phoneTo = user.MobilePhone;
|
||||||
|
}
|
||||||
|
|
||||||
|
UserSettings settings = UserController.GetUserSettings(owner.UserId, UserSettings.USER_PASSWORD_RESET_LETTER);
|
||||||
|
|
||||||
|
string body = settings["PasswordResetPincodeSmsBody"];
|
||||||
|
|
||||||
|
var items = new Hashtable();
|
||||||
|
|
||||||
|
var pincode = GeneratePincode();
|
||||||
|
|
||||||
|
items["passwordResetPincode"] = pincode;
|
||||||
|
|
||||||
|
body = PackageController.EvaluateTemplate(body, items);
|
||||||
|
|
||||||
|
TaskManager.Write("Organization ID : " + user.ItemId);
|
||||||
|
TaskManager.Write("Account : " + user.DisplayName);
|
||||||
|
TaskManager.Write("SmsTo : " + phoneTo);
|
||||||
|
|
||||||
|
// send Sms message
|
||||||
|
var response = SendSms(phoneTo, body);
|
||||||
|
|
||||||
|
if (response.RestException != null)
|
||||||
|
{
|
||||||
|
throw new Exception(response.RestException.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
SetAccessTokenResponse(token, pincode);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
TaskManager.WriteError(ex);
|
||||||
|
TaskManager.CompleteResultTask(result);
|
||||||
|
result.AddError("", ex);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
TaskManager.CompleteResultTask();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string GeneratePincode()
|
||||||
|
{
|
||||||
|
var random = new Random(Guid.NewGuid().GetHashCode());
|
||||||
|
|
||||||
|
return random.Next(10000, 99999).ToString(CultureInfo.InvariantCulture);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static SMSMessage SendSms(string to, string body)
|
||||||
|
{
|
||||||
|
SystemSettings settings = SystemController.GetSystemSettingsInternal(SystemSettings.TWILIO_SETTINGS, false);
|
||||||
|
|
||||||
|
if (settings == null)
|
||||||
|
{
|
||||||
|
throw new Exception("Twilio settings are not set");
|
||||||
|
}
|
||||||
|
|
||||||
|
string accountSid = settings.GetValueOrDefault(SystemSettings.TWILIO_ACCOUNTSID_KEY, string.Empty);
|
||||||
|
string authToken = settings.GetValueOrDefault(SystemSettings.TWILIO_AUTHTOKEN_KEY, string.Empty);
|
||||||
|
string phoneFrom = settings.GetValueOrDefault(SystemSettings.TWILIO_PHONEFROM_KEY, string.Empty);
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(accountSid) || string.IsNullOrEmpty(accountSid) || string.IsNullOrEmpty(accountSid))
|
||||||
|
{
|
||||||
|
throw new Exception("Twilio settings are not set (System settings)");
|
||||||
|
}
|
||||||
|
|
||||||
|
var client = new TwilioRestClient(accountSid, authToken);
|
||||||
|
|
||||||
|
return client.SendSmsMessage(phoneFrom, to, body);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Send reset user password email
|
/// Send reset user password email
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1567,7 +1737,8 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
/// <param name="accountId">User Id</param>
|
/// <param name="accountId">User Id</param>
|
||||||
/// <param name="reason">Reason why reset email is sent.</param>
|
/// <param name="reason">Reason why reset email is sent.</param>
|
||||||
/// <param name="mailTo">Optional, if null accountID user PrimaryEmailAddress will be used</param>
|
/// <param name="mailTo">Optional, if null accountID user PrimaryEmailAddress will be used</param>
|
||||||
public static void SendResetUserPasswordEmail(int itemId, int accountId, string reason, string mailTo = null)
|
/// <param name="finalStep">Url direction</param>
|
||||||
|
public static void SendResetUserPasswordEmail(int itemId, int accountId, string reason, string mailTo, bool finalStep)
|
||||||
{
|
{
|
||||||
// load organization
|
// load organization
|
||||||
Organization org = GetOrganization(itemId);
|
Organization org = GetOrganization(itemId);
|
||||||
|
@ -1581,11 +1752,9 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
|
|
||||||
UserInfo owner = PackageController.GetPackageOwner(org.PackageId);
|
UserInfo owner = PackageController.GetPackageOwner(org.PackageId);
|
||||||
OrganizationUser user = OrganizationController.GetAccount(itemId, accountId);
|
OrganizationUser user = OrganizationController.GetUserGeneralSettingsWithExtraData(itemId, accountId);
|
||||||
|
|
||||||
OrganizationUser settings = orgProxy.GetUserGeneralSettings(user.AccountName, org.OrganizationId);
|
user.ItemId = itemId;
|
||||||
|
|
||||||
user.PasswordExpirationDateTime = settings.PasswordExpirationDateTime;
|
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(mailTo))
|
if (string.IsNullOrEmpty(mailTo))
|
||||||
{
|
{
|
||||||
|
@ -1596,16 +1765,16 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
var logoUrl = generalSettings != null ? generalSettings.OrganizationLogoUrl : string.Empty;
|
var logoUrl = generalSettings != null ? generalSettings.OrganizationLogoUrl : string.Empty;
|
||||||
|
|
||||||
SendUserPasswordEmail(owner, user, reason, mailTo, logoUrl, UserSettings.USER_PASSWORD_RESET_LETTER, "USER_PASSWORD_RESET_LETTER");
|
SendUserPasswordEmail(owner, user, reason, mailTo, logoUrl, UserSettings.USER_PASSWORD_RESET_LETTER, "USER_PASSWORD_RESET_LETTER", finalStep);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SendUserExpirationPasswordEmail(UserInfo owner, OrganizationUser user, string reason,
|
public static void SendUserExpirationPasswordEmail(UserInfo owner, OrganizationUser user, string reason,
|
||||||
string mailTo, string logoUrl)
|
string mailTo, string logoUrl)
|
||||||
{
|
{
|
||||||
SendUserPasswordEmail(owner, user, reason, user.PrimaryEmailAddress, logoUrl, UserSettings.USER_PASSWORD_EXPIRATION_LETTER, "USER_PASSWORD_EXPIRATION_LETTER");
|
SendUserPasswordEmail(owner, user, reason, user.PrimaryEmailAddress, logoUrl, UserSettings.USER_PASSWORD_EXPIRATION_LETTER, "USER_PASSWORD_EXPIRATION_LETTER", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SendUserPasswordEmail(UserInfo owner, OrganizationUser user, string reason, string mailTo, string logoUrl, string settingsName, string taskName)
|
public static void SendUserPasswordEmail(UserInfo owner, OrganizationUser user, string reason, string mailTo, string logoUrl, string settingsName, string taskName, bool finalStep)
|
||||||
{
|
{
|
||||||
UserSettings settings = UserController.GetUserSettings(owner.UserId,
|
UserSettings settings = UserController.GetUserSettings(owner.UserId,
|
||||||
settingsName);
|
settingsName);
|
||||||
|
@ -1632,14 +1801,23 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
priority = (MailPriority) Enum.Parse(typeof (MailPriority), settings["Priority"], true);
|
priority = (MailPriority) Enum.Parse(typeof (MailPriority), settings["Priority"], true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Guid token;
|
||||||
|
|
||||||
|
string pincode = finalStep ? GeneratePincode() : null;
|
||||||
|
|
||||||
Hashtable items = new Hashtable();
|
Hashtable items = new Hashtable();
|
||||||
|
|
||||||
items["user"] = user;
|
items["user"] = user;
|
||||||
items["logoUrl"] = logoUrl;
|
items["logoUrl"] = logoUrl;
|
||||||
items["passwordResetLink"] = GenerateUserPasswordResetLink(user.ItemId, user.AccountId);
|
items["passwordResetLink"] = GenerateUserPasswordResetLink(user.ItemId, user.AccountId, out token, pincode);
|
||||||
|
|
||||||
body = PackageController.EvaluateTemplate(body, items);
|
body = PackageController.EvaluateTemplate(body, items);
|
||||||
|
|
||||||
|
if (finalStep)
|
||||||
|
{
|
||||||
|
SetAccessTokenResponse(token, pincode);
|
||||||
|
}
|
||||||
|
|
||||||
TaskManager.Write("Organization ID : " + user.ItemId);
|
TaskManager.Write("Organization ID : " + user.ItemId);
|
||||||
TaskManager.Write("Account : " + user.DisplayName);
|
TaskManager.Write("Account : " + user.DisplayName);
|
||||||
TaskManager.Write("Reason : " + reason);
|
TaskManager.Write("Reason : " + reason);
|
||||||
|
@ -1658,6 +1836,8 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static AccessToken GetAccessToken(Guid accessToken, AccessTokenTypes type)
|
public static AccessToken GetAccessToken(Guid accessToken, AccessTokenTypes type)
|
||||||
{
|
{
|
||||||
return ObjectUtils.FillObjectFromDataReader<AccessToken>(DataProvider.GetAccessTokenByAccessToken(accessToken, type));
|
return ObjectUtils.FillObjectFromDataReader<AccessToken>(DataProvider.GetAccessTokenByAccessToken(accessToken, type));
|
||||||
|
@ -1678,23 +1858,38 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return SystemController.GetSystemSettingsInternal(SystemSettings.WEBDAV_PORTAL_SETTINGS, false);
|
return SystemController.GetSystemSettingsInternal(SystemSettings.WEBDAV_PORTAL_SETTINGS, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GenerateUserPasswordResetLink(int itemId, int accountId)
|
public static string GenerateUserPasswordResetLink(int itemId, int accountId, out Guid tokenGuid, string pincode = null, string resetUrl = null)
|
||||||
{
|
{
|
||||||
string passwordResetUrlFormat = "account/password-reset/step-2";
|
|
||||||
|
|
||||||
var settings = GetWebDavSystemSettings();
|
var settings = GetWebDavSystemSettings();
|
||||||
|
tokenGuid = new Guid();
|
||||||
|
|
||||||
if (settings == null || !settings.GetValueOrDefault(SystemSettings.WEBDAV_PASSWORD_RESET_ENABLED_KEY, false) ||!settings.Contains("WebdavPortalUrl"))
|
if (settings == null || !settings.GetValueOrDefault(SystemSettings.WEBDAV_PASSWORD_RESET_ENABLED_KEY, false) || !settings.Contains("WebdavPortalUrl"))
|
||||||
{
|
{
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(resetUrl) == false)
|
||||||
|
{
|
||||||
|
return resetUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
string passwordResetUrlFormat = string.IsNullOrEmpty(pincode) ? "account/password-reset/step-2" : "account/password-reset/step-final";
|
||||||
|
|
||||||
var webdavPortalUrl = new Uri(settings["WebdavPortalUrl"]);
|
var webdavPortalUrl = new Uri(settings["WebdavPortalUrl"]);
|
||||||
|
|
||||||
var token = CreateAccessToken(itemId, accountId, AccessTokenTypes.PasswrodReset);
|
var token = CreateAccessToken(itemId, accountId, AccessTokenTypes.PasswrodReset);
|
||||||
|
|
||||||
return webdavPortalUrl.Append(passwordResetUrlFormat)
|
tokenGuid = token.AccessTokenGuid;
|
||||||
.Append(token.AccessTokenGuid.ToString("n")).ToString();
|
|
||||||
|
var resultUrl = webdavPortalUrl.Append(passwordResetUrlFormat)
|
||||||
|
.Append(token.AccessTokenGuid.ToString("n"));
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(pincode) == false)
|
||||||
|
{
|
||||||
|
resultUrl = resultUrl.Append(pincode);
|
||||||
|
}
|
||||||
|
|
||||||
|
return resultUrl.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static AccessToken CreateAccessToken(int itemId, int accountId, AccessTokenTypes type)
|
private static AccessToken CreateAccessToken(int itemId, int accountId, AccessTokenTypes type)
|
||||||
|
@ -1804,7 +1999,8 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
AccountLockoutDuration = GetValueSafe(parts, 9, 0),
|
AccountLockoutDuration = GetValueSafe(parts, 9, 0),
|
||||||
ResetAccountLockoutCounterAfter = GetValueSafe(parts, 10, 0),
|
ResetAccountLockoutCounterAfter = GetValueSafe(parts, 10, 0),
|
||||||
LockoutSettingsEnabled = GetValueSafe(parts, 11, false),
|
LockoutSettingsEnabled = GetValueSafe(parts, 11, false),
|
||||||
PasswordComplexityEnabled = GetValueSafe(parts, 11, true),
|
PasswordComplexityEnabled = GetValueSafe(parts, 12, true),
|
||||||
|
MaxPasswordAge = GetValueSafe(parts, 13, 42),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -2668,6 +2864,50 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return (account);
|
return (account);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static OrganizationUser GetUserGeneralSettingsWithExtraData(int itemId, int accountId)
|
||||||
|
{
|
||||||
|
OrganizationUser account = null;
|
||||||
|
Organization org = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// load organization
|
||||||
|
org = GetOrganization(itemId);
|
||||||
|
if (org == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
// load account
|
||||||
|
account = GetAccount(itemId, accountId);
|
||||||
|
}
|
||||||
|
catch (Exception) { }
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// get mailbox settings
|
||||||
|
Organizations orgProxy = GetOrganizationProxy(org.ServiceId);
|
||||||
|
string accountName = GetAccountName(account.AccountName);
|
||||||
|
|
||||||
|
|
||||||
|
OrganizationUser retUser = orgProxy.GetOrganizationUserWithExtraData(accountName, org.OrganizationId);
|
||||||
|
retUser.AccountId = accountId;
|
||||||
|
retUser.AccountName = account.AccountName;
|
||||||
|
retUser.PrimaryEmailAddress = account.PrimaryEmailAddress;
|
||||||
|
retUser.AccountType = account.AccountType;
|
||||||
|
retUser.CrmUserId = CRMController.GetCrmUserId(accountId);
|
||||||
|
retUser.IsOCSUser = DataProvider.CheckOCSUserExists(accountId);
|
||||||
|
retUser.IsLyncUser = DataProvider.CheckLyncUserExists(accountId);
|
||||||
|
retUser.IsBlackBerryUser = BlackBerryController.CheckBlackBerryUserExists(accountId);
|
||||||
|
retUser.SubscriberNumber = account.SubscriberNumber;
|
||||||
|
retUser.LevelId = account.LevelId;
|
||||||
|
retUser.IsVIP = account.IsVIP;
|
||||||
|
|
||||||
|
return retUser;
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
|
||||||
|
return (account);
|
||||||
|
}
|
||||||
|
|
||||||
public static int SetUserGeneralSettings(int itemId, int accountId, string displayName,
|
public static int SetUserGeneralSettings(int itemId, int accountId, string displayName,
|
||||||
string password, bool hideAddressBook, bool disabled, bool locked, string firstName, string initials,
|
string password, bool hideAddressBook, bool disabled, bool locked, string firstName, string initials,
|
||||||
string lastName, string address, string city, string state, string zip, string country,
|
string lastName, string address, string city, string state, string zip, string country,
|
||||||
|
|
|
@ -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)
|
||||||
|
{
|
||||||
|
return DataProvider.GetSearchObject(SecurityContext.User.UserId, userId,
|
||||||
|
filterColumn, filterValue, statusId, roleId, sortColumn, startRow, maximumRows, colType, 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);
|
||||||
|
|
|
@ -57,11 +57,6 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// send mail message
|
|
||||||
// MailHelper.SendMessage(mailFrom, mailTo, mailSubject, mailBody, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -12,6 +12,8 @@
|
||||||
<AssemblyName>WebsitePanel.EnterpriseServer.Code</AssemblyName>
|
<AssemblyName>WebsitePanel.EnterpriseServer.Code</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||||
|
<RestorePackages>true</RestorePackages>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
@ -42,6 +44,9 @@
|
||||||
<HintPath>..\..\Lib\Microsoft.Web.Services3.dll</HintPath>
|
<HintPath>..\..\Lib\Microsoft.Web.Services3.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="RestSharp">
|
||||||
|
<HintPath>..\packages\RestSharp.105.0.1\lib\net4\RestSharp.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
|
@ -55,6 +60,9 @@
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
|
<Reference Include="Twilio.Api">
|
||||||
|
<HintPath>..\packages\Twilio.3.6.29\lib\3.5\Twilio.Api.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="WebsitePanel.EnterpriseServer.Base, Version=2.1.0.1, Culture=neutral, PublicKeyToken=da8782a6fc4d0081, processorArchitecture=MSIL">
|
<Reference Include="WebsitePanel.EnterpriseServer.Base, Version=2.1.0.1, Culture=neutral, PublicKeyToken=da8782a6fc4d0081, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\Bin\WebsitePanel.EnterpriseServer.Base.dll</HintPath>
|
<HintPath>..\..\Bin\WebsitePanel.EnterpriseServer.Base.dll</HintPath>
|
||||||
|
@ -202,8 +210,17 @@
|
||||||
<Name>WebsitePanel.Whois</Name>
|
<Name>WebsitePanel.Whois</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup />
|
<ItemGroup>
|
||||||
|
<None Include="packages.config" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
|
||||||
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
|
||||||
|
</Target>
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="RestSharp" version="105.0.1" targetFramework="net40" />
|
||||||
|
<package id="Twilio" version="3.6.29" targetFramework="net40" />
|
||||||
|
</packages>
|
|
@ -315,9 +315,9 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
}
|
}
|
||||||
|
|
||||||
[WebMethod]
|
[WebMethod]
|
||||||
public string GetMailboxSetupInstructions(int itemId, int accountId, bool pmm, bool emailMode, bool signup)
|
public string GetMailboxSetupInstructions(int itemId, int accountId, bool pmm, bool emailMode, bool signup, string passwordResetUrl)
|
||||||
{
|
{
|
||||||
return ExchangeServerController.GetMailboxSetupInstructions(itemId, accountId, pmm, emailMode, signup);
|
return ExchangeServerController.GetMailboxSetupInstructions(itemId, accountId, pmm, emailMode, signup, passwordResetUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
[WebMethod]
|
[WebMethod]
|
||||||
|
|
|
@ -93,7 +93,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
[WebMethod]
|
[WebMethod]
|
||||||
public SystemSettings GetWebDavSystemSettings()
|
public SystemSettings GetWebDavSystemSettings()
|
||||||
{
|
{
|
||||||
return OrganizationController.GetWebDavSystemSettings();
|
return OrganizationController.GetWebDavSystemSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
[WebMethod]
|
[WebMethod]
|
||||||
|
@ -185,7 +185,27 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
OrganizationController.SetDefaultOrganization(newDefaultOrganizationId, currentDefaultOrganizationId);
|
OrganizationController.SetDefaultOrganization(newDefaultOrganizationId, currentDefaultOrganizationId);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
[WebMethod]
|
||||||
|
public OrganizationUser GetUserGeneralSettingsWithExtraData(int itemId, int accountId)
|
||||||
|
{
|
||||||
|
return OrganizationController.GetUserGeneralSettingsWithExtraData(itemId, accountId);
|
||||||
|
}
|
||||||
|
|
||||||
|
[WebMethod]
|
||||||
|
public ResultObject SendResetUserPasswordLinkSms(int itemId, int accountId, string reason, string phoneTo = null)
|
||||||
|
{
|
||||||
|
return OrganizationController.SendResetUserPasswordLinkSms(itemId, accountId, reason, phoneTo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[WebMethod]
|
||||||
|
public ResultObject SendResetUserPasswordPincodeSms(Guid token, string phoneTo = null)
|
||||||
|
{
|
||||||
|
return OrganizationController.SendResetUserPasswordPincodeSms(token, phoneTo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region Domains
|
#region Domains
|
||||||
|
|
||||||
|
@ -336,9 +356,9 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
}
|
}
|
||||||
|
|
||||||
[WebMethod]
|
[WebMethod]
|
||||||
public void SendResetUserPasswordEmail(int itemId, int accountId, string reason, string mailTo = null)
|
public void SendResetUserPasswordEmail(int itemId, int accountId, string reason, string mailTo, bool finalStep)
|
||||||
{
|
{
|
||||||
OrganizationController.SendResetUserPasswordEmail(itemId, accountId, reason, mailTo);
|
OrganizationController.SendResetUserPasswordEmail(itemId, accountId, reason, mailTo, finalStep);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -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)
|
||||||
|
{
|
||||||
|
return PackageController.GetSearchObject(userId, filterColumn, filterValue, statusId, roleId, sortColumn, startRow, maximumRows, colType);
|
||||||
|
}
|
||||||
|
//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)
|
||||||
|
|
|
@ -102,5 +102,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
void ApplyPasswordSettings(string organizationId, OrganizationPasswordSettings passwordSettings);
|
void ApplyPasswordSettings(string organizationId, OrganizationPasswordSettings passwordSettings);
|
||||||
|
|
||||||
bool CheckPhoneNumberIsInUse(string phoneNumber, string userSamAccountName = null);
|
bool CheckPhoneNumberIsInUse(string phoneNumber, string userSamAccountName = null);
|
||||||
|
|
||||||
|
OrganizationUser GetOrganizationUserWithExtraData(string loginName, string organizationId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
public int MinimumLength { get; set; }
|
public int MinimumLength { get; set; }
|
||||||
public int MaximumLength { get; set; }
|
public int MaximumLength { get; set; }
|
||||||
public int EnforcePasswordHistory { get; set; }
|
public int EnforcePasswordHistory { get; set; }
|
||||||
|
public int MaxPasswordAge { get; set; }
|
||||||
|
|
||||||
public bool LockoutSettingsEnabled { get; set; }
|
public bool LockoutSettingsEnabled { get; set; }
|
||||||
public int AccountLockoutDuration { get; set; }
|
public int AccountLockoutDuration { get; set; }
|
||||||
|
|
|
@ -741,6 +741,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
cmd.Parameters.Add("PasswordHistoryCount", settings.EnforcePasswordHistory);
|
cmd.Parameters.Add("PasswordHistoryCount", settings.EnforcePasswordHistory);
|
||||||
cmd.Parameters.Add("ComplexityEnabled", false);
|
cmd.Parameters.Add("ComplexityEnabled", false);
|
||||||
cmd.Parameters.Add("ReversibleEncryptionEnabled", false);
|
cmd.Parameters.Add("ReversibleEncryptionEnabled", false);
|
||||||
|
cmd.Parameters.Add("MaxPasswordAge", new TimeSpan(settings.MaxPasswordAge * 24, 0, 0));
|
||||||
|
|
||||||
if (settings.LockoutSettingsEnabled)
|
if (settings.LockoutSettingsEnabled)
|
||||||
{
|
{
|
||||||
|
@ -777,6 +778,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
cmd.Parameters.Add("PasswordHistoryCount", settings.EnforcePasswordHistory);
|
cmd.Parameters.Add("PasswordHistoryCount", settings.EnforcePasswordHistory);
|
||||||
cmd.Parameters.Add("ComplexityEnabled", false);
|
cmd.Parameters.Add("ComplexityEnabled", false);
|
||||||
cmd.Parameters.Add("ReversibleEncryptionEnabled", false);
|
cmd.Parameters.Add("ReversibleEncryptionEnabled", false);
|
||||||
|
cmd.Parameters.Add("MaxPasswordAge", new TimeSpan(settings.MaxPasswordAge*24, 0, 0));
|
||||||
|
|
||||||
if (settings.LockoutSettingsEnabled)
|
if (settings.LockoutSettingsEnabled)
|
||||||
{
|
{
|
||||||
|
@ -1008,10 +1010,30 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
retUser.UserPrincipalName = (string)entry.InvokeGet(ADAttributes.UserPrincipalName);
|
retUser.UserPrincipalName = (string)entry.InvokeGet(ADAttributes.UserPrincipalName);
|
||||||
retUser.UserMustChangePassword = GetUserMustChangePassword(entry);
|
retUser.UserMustChangePassword = GetUserMustChangePassword(entry);
|
||||||
|
|
||||||
|
return retUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OrganizationUser GetOrganizationUserWithExtraData(string loginName, string organizationId)
|
||||||
|
{
|
||||||
|
HostedSolutionLog.LogStart("GetOrganizationUserWithExtraData");
|
||||||
|
HostedSolutionLog.DebugInfo("loginName : {0}", loginName);
|
||||||
|
HostedSolutionLog.DebugInfo("organizationId : {0}", organizationId);
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(loginName))
|
||||||
|
throw new ArgumentNullException("loginName");
|
||||||
|
|
||||||
var psoName = FormOrganizationPSOName(organizationId);
|
var psoName = FormOrganizationPSOName(organizationId);
|
||||||
|
|
||||||
|
string path = GetUserPath(organizationId, loginName);
|
||||||
|
|
||||||
|
OrganizationUser retUser = GetUser(organizationId, path);
|
||||||
|
|
||||||
|
DirectoryEntry entry = ActiveDirectoryUtils.GetADObject(path);
|
||||||
|
|
||||||
retUser.PasswordExpirationDateTime = GetPasswordExpirationDate(psoName, entry);
|
retUser.PasswordExpirationDateTime = GetPasswordExpirationDate(psoName, entry);
|
||||||
|
|
||||||
|
HostedSolutionLog.LogEnd("GetOrganizationUserWithExtraData");
|
||||||
|
|
||||||
return retUser;
|
return retUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -98,6 +98,8 @@ namespace WebsitePanel.Providers.HostedSolution {
|
||||||
|
|
||||||
private System.Threading.SendOrPostCallback CheckPhoneNumberIsInUseOperationCompleted;
|
private System.Threading.SendOrPostCallback CheckPhoneNumberIsInUseOperationCompleted;
|
||||||
|
|
||||||
|
private System.Threading.SendOrPostCallback GetOrganizationUserWithExtraDataOperationCompleted;
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public Organizations() {
|
public Organizations() {
|
||||||
this.Url = "http://localhost:9003/Organizations.asmx";
|
this.Url = "http://localhost:9003/Organizations.asmx";
|
||||||
|
@ -196,6 +198,9 @@ namespace WebsitePanel.Providers.HostedSolution {
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public event CheckPhoneNumberIsInUseCompletedEventHandler CheckPhoneNumberIsInUseCompleted;
|
public event CheckPhoneNumberIsInUseCompletedEventHandler CheckPhoneNumberIsInUseCompleted;
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public event GetOrganizationUserWithExtraDataCompletedEventHandler GetOrganizationUserWithExtraDataCompleted;
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/OrganizationExists", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/OrganizationExists", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||||
|
@ -1773,6 +1778,51 @@ namespace WebsitePanel.Providers.HostedSolution {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
|
||||||
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizationUserWithExtraData", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||||
|
public OrganizationUser GetOrganizationUserWithExtraData(string loginName, string organizationId) {
|
||||||
|
object[] results = this.Invoke("GetOrganizationUserWithExtraData", new object[] {
|
||||||
|
loginName,
|
||||||
|
organizationId});
|
||||||
|
return ((OrganizationUser)(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public System.IAsyncResult BeginGetOrganizationUserWithExtraData(string loginName, string organizationId, System.AsyncCallback callback, object asyncState) {
|
||||||
|
return this.BeginInvoke("GetOrganizationUserWithExtraData", new object[] {
|
||||||
|
loginName,
|
||||||
|
organizationId}, callback, asyncState);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public OrganizationUser EndGetOrganizationUserWithExtraData(System.IAsyncResult asyncResult) {
|
||||||
|
object[] results = this.EndInvoke(asyncResult);
|
||||||
|
return ((OrganizationUser)(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void GetOrganizationUserWithExtraDataAsync(string loginName, string organizationId) {
|
||||||
|
this.GetOrganizationUserWithExtraDataAsync(loginName, organizationId, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void GetOrganizationUserWithExtraDataAsync(string loginName, string organizationId, object userState) {
|
||||||
|
if ((this.GetOrganizationUserWithExtraDataOperationCompleted == null)) {
|
||||||
|
this.GetOrganizationUserWithExtraDataOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationUserWithExtraDataOperationCompleted);
|
||||||
|
}
|
||||||
|
this.InvokeAsync("GetOrganizationUserWithExtraData", new object[] {
|
||||||
|
loginName,
|
||||||
|
organizationId}, this.GetOrganizationUserWithExtraDataOperationCompleted, userState);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnGetOrganizationUserWithExtraDataOperationCompleted(object arg) {
|
||||||
|
if ((this.GetOrganizationUserWithExtraDataCompleted != null)) {
|
||||||
|
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||||
|
this.GetOrganizationUserWithExtraDataCompleted(this, new GetOrganizationUserWithExtraDataCompletedEventArgs(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);
|
||||||
|
@ -2188,4 +2238,30 @@ namespace WebsitePanel.Providers.HostedSolution {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
|
public delegate void GetOrganizationUserWithExtraDataCompletedEventHandler(object sender, GetOrganizationUserWithExtraDataCompletedEventArgs e);
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||||
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||||
|
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||||
|
public partial class GetOrganizationUserWithExtraDataCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||||
|
|
||||||
|
private object[] results;
|
||||||
|
|
||||||
|
internal GetOrganizationUserWithExtraDataCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||||
|
base(exception, cancelled, userState) {
|
||||||
|
this.results = results;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public OrganizationUser Result {
|
||||||
|
get {
|
||||||
|
this.RaiseExceptionIfNecessary();
|
||||||
|
return ((OrganizationUser)(this.results[0]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -273,5 +273,11 @@ namespace WebsitePanel.Server
|
||||||
{
|
{
|
||||||
return Organization.CheckPhoneNumberIsInUse(phoneNumber, userSamAccountName);
|
return Organization.CheckPhoneNumberIsInUse(phoneNumber, userSamAccountName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[WebMethod, SoapHeader("settings")]
|
||||||
|
public OrganizationUser GetOrganizationUserWithExtraData(string loginName, string organizationId)
|
||||||
|
{
|
||||||
|
return Organization.GetOrganizationUserWithExtraData(loginName, organizationId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>
|
|
@ -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" />
|
||||||
|
@ -433,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>
|
||||||
|
|
|
@ -70,7 +70,7 @@ namespace WebsitePanel.WebDav.Core.Config.Entities
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
SessionKeysElement sessionKey =
|
SessionKeysElement sessionKey =
|
||||||
_sessionKeys.FirstOrDefault(x => x.Key == SessionKeysElement.PassswordResetSmsKey);
|
_sessionKeys.FirstOrDefault(x => x.Key == SessionKeysElement.PasswordResetSmsKey);
|
||||||
return sessionKey != null ? sessionKey.Value : null;
|
return sessionKey != null ? sessionKey.Value : null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
|
||||||
public const string WebDavManagerKey = "WebDavManagerSessionKey";
|
public const string WebDavManagerKey = "WebDavManagerSessionKey";
|
||||||
public const string UserGroupsKey = "UserGroupsKey";
|
public const string UserGroupsKey = "UserGroupsKey";
|
||||||
public const string WebDavRootFolderPermissionsKey = "WebDavRootFolderPermissionsKey";
|
public const string WebDavRootFolderPermissionsKey = "WebDavRootFolderPermissionsKey";
|
||||||
public const string PassswordResetSmsKey = "PassswordResetSmsKey";
|
public const string PasswordResetSmsKey = "PasswordResetSmsKey";
|
||||||
public const string ResourseRenderCountKey = "ResourseRenderCountSessionKey";
|
public const string ResourseRenderCountKey = "ResourseRenderCountSessionKey";
|
||||||
public const string ItemIdSessionKey = "ItemId";
|
public const string ItemIdSessionKey = "ItemId";
|
||||||
public const string OwaEditFoldersSessionKey = "OwaEditFoldersSession";
|
public const string OwaEditFoldersSessionKey = "OwaEditFoldersSession";
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using log4net;
|
||||||
using WebsitePanel.WebDav.Core.Config;
|
using WebsitePanel.WebDav.Core.Config;
|
||||||
using WebsitePanel.WebDav.Core.Interfaces.Security;
|
using WebsitePanel.WebDav.Core.Interfaces.Security;
|
||||||
using WebsitePanel.WebDav.Core.Interfaces.Services;
|
using WebsitePanel.WebDav.Core.Interfaces.Services;
|
||||||
|
@ -9,10 +10,12 @@ namespace WebsitePanel.WebDav.Core.Security.Authentication
|
||||||
public class SmsAuthenticationService : ISmsAuthenticationService
|
public class SmsAuthenticationService : ISmsAuthenticationService
|
||||||
{
|
{
|
||||||
private ISmsDistributionService _smsService;
|
private ISmsDistributionService _smsService;
|
||||||
|
private readonly ILog Log;
|
||||||
|
|
||||||
public SmsAuthenticationService(ISmsDistributionService smsService)
|
public SmsAuthenticationService(ISmsDistributionService smsService)
|
||||||
{
|
{
|
||||||
_smsService = smsService;
|
_smsService = smsService;
|
||||||
|
Log = LogManager.GetLogger(this.GetType());
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool VerifyResponse( Guid token, string response)
|
public bool VerifyResponse( Guid token, string response)
|
||||||
|
|
|
@ -38,14 +38,20 @@ namespace WebsitePanel.WebDavPortal
|
||||||
|
|
||||||
routes.MapRoute(
|
routes.MapRoute(
|
||||||
name: AccountRouteNames.PasswordResetSendSms,
|
name: AccountRouteNames.PasswordResetSendSms,
|
||||||
url: "account/password-reset/step-final/{token}",
|
url: "account/password-reset/send-new-sms/{token}",
|
||||||
defaults: new { controller = "Account", action = "PasswordResetSendSms" }
|
defaults: new { controller = "Account", action = "PasswordResetSendSms" }
|
||||||
);
|
);
|
||||||
|
|
||||||
routes.MapRoute(
|
routes.MapRoute(
|
||||||
name: AccountRouteNames.PasswordResetFinalStep,
|
name: AccountRouteNames.PasswordResetFinalStep,
|
||||||
url: "account/password-reset/send-new-sms/{token}",
|
url: "account/password-reset/step-final/{token}/{pincode}",
|
||||||
defaults: new { controller = "Account", action = "PasswordResetFinalStep" }
|
defaults: new { controller = "Account", action = "PasswordResetFinalStep", pincode = UrlParameter.Optional }
|
||||||
|
);
|
||||||
|
|
||||||
|
routes.MapRoute(
|
||||||
|
name: AccountRouteNames.PasswordResetSuccess,
|
||||||
|
url: "account/password-reset/success",
|
||||||
|
defaults: new { controller = "Account", action = "PasswordSuccessfullyChanged" }
|
||||||
);
|
);
|
||||||
|
|
||||||
routes.MapRoute(
|
routes.MapRoute(
|
||||||
|
|
|
@ -16,6 +16,7 @@ namespace WebsitePanel.WebDavPortal.UI.Routes
|
||||||
public const string PasswordResetSms = "PasswordResetSmsRoute";
|
public const string PasswordResetSms = "PasswordResetSmsRoute";
|
||||||
public const string PasswordResetSendSms = "PasswordResetSendSmsRoute";
|
public const string PasswordResetSendSms = "PasswordResetSendSmsRoute";
|
||||||
public const string PasswordResetFinalStep = "PasswordResetFinalStepRoute";
|
public const string PasswordResetFinalStep = "PasswordResetFinalStepRoute";
|
||||||
|
public const string PasswordResetSuccess = "PasswordResetSuccess";
|
||||||
|
|
||||||
public const string PhoneNumberIsAvailible = "PhoneNumberIsAvailibleRoute";
|
public const string PhoneNumberIsAvailible = "PhoneNumberIsAvailibleRoute";
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,8 @@ using System.Net;
|
||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using System.Web.Routing;
|
using System.Web.Routing;
|
||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
|
using log4net;
|
||||||
|
using Microsoft.Web.Services3.Addressing;
|
||||||
using WebsitePanel.Providers.HostedSolution;
|
using WebsitePanel.Providers.HostedSolution;
|
||||||
using WebsitePanel.WebDav.Core.Config;
|
using WebsitePanel.WebDav.Core.Config;
|
||||||
using WebsitePanel.WebDav.Core.Security.Authentication;
|
using WebsitePanel.WebDav.Core.Security.Authentication;
|
||||||
|
@ -27,12 +29,15 @@ namespace WebsitePanel.WebDavPortal.Controllers
|
||||||
private readonly ICryptography _cryptography;
|
private readonly ICryptography _cryptography;
|
||||||
private readonly IAuthenticationService _authenticationService;
|
private readonly IAuthenticationService _authenticationService;
|
||||||
private readonly ISmsAuthenticationService _smsAuthService;
|
private readonly ISmsAuthenticationService _smsAuthService;
|
||||||
|
private readonly ILog Log;
|
||||||
|
|
||||||
public AccountController(ICryptography cryptography, IAuthenticationService authenticationService, ISmsAuthenticationService smsAuthService)
|
public AccountController(ICryptography cryptography, IAuthenticationService authenticationService, ISmsAuthenticationService smsAuthService)
|
||||||
{
|
{
|
||||||
_cryptography = cryptography;
|
_cryptography = cryptography;
|
||||||
_authenticationService = authenticationService;
|
_authenticationService = authenticationService;
|
||||||
_smsAuthService = smsAuthService;
|
_smsAuthService = smsAuthService;
|
||||||
|
|
||||||
|
Log = LogManager.GetLogger(this.GetType());
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
|
@ -182,7 +187,7 @@ namespace WebsitePanel.WebDavPortal.Controllers
|
||||||
return View(model);
|
return View(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
WspContext.Services.Organizations.SendResetUserPasswordEmail(exchangeAccount.ItemId, exchangeAccount.AccountId, Resources.Messages.PasswordResetUserReason, exchangeAccount.PrimaryEmailAddress);
|
WspContext.Services.Organizations.SendResetUserPasswordEmail(exchangeAccount.ItemId, exchangeAccount.AccountId, Resources.Messages.PasswordResetUserReason, exchangeAccount.PrimaryEmailAddress, false);
|
||||||
|
|
||||||
return View("PasswordResetEmailSent");
|
return View("PasswordResetEmailSent");
|
||||||
}
|
}
|
||||||
|
@ -205,11 +210,15 @@ namespace WebsitePanel.WebDavPortal.Controllers
|
||||||
return View(model);
|
return View(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (accessToken.IsSmsSent == false)
|
|
||||||
{
|
|
||||||
var user = WspContext.Services.Organizations.GetUserGeneralSettings(accessToken.ItemId, accessToken.AccountId);
|
|
||||||
|
|
||||||
if (SendPasswordResetSms(accessToken.AccessTokenGuid, user.MobilePhone))
|
if (accessToken != null && accessToken.IsSmsSent == false)
|
||||||
|
{
|
||||||
|
var user = WspContext.Services.Organizations.GetUserGeneralSettings(accessToken.ItemId,
|
||||||
|
accessToken.AccountId);
|
||||||
|
|
||||||
|
var result = WspContext.Services.Organizations.SendResetUserPasswordPincodeSms(token, user.MobilePhone);
|
||||||
|
|
||||||
|
if (result.IsSuccess)
|
||||||
{
|
{
|
||||||
AddMessage(MessageType.Success, Resources.Messages.SmsWasSent);
|
AddMessage(MessageType.Success, Resources.Messages.SmsWasSent);
|
||||||
}
|
}
|
||||||
|
@ -249,15 +258,16 @@ namespace WebsitePanel.WebDavPortal.Controllers
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
public ActionResult PasswordResetFinalStep(Guid token)
|
public ActionResult PasswordResetFinalStep(Guid token, string pincode)
|
||||||
{
|
{
|
||||||
var smsResponse = Session[WebDavAppConfigManager.Instance.SessionKeys.PasswordResetSmsKey] as string;
|
var result = VerifyPincode(token, pincode);
|
||||||
|
|
||||||
if (_smsAuthService.VerifyResponse(token, smsResponse) == false)
|
if (result != null)
|
||||||
{
|
{
|
||||||
return RedirectToRoute(AccountRouteNames.PasswordResetSms);
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var model = new PasswordEditor();
|
var model = new PasswordEditor();
|
||||||
|
|
||||||
return View(model);
|
return View(model);
|
||||||
|
@ -265,20 +275,18 @@ namespace WebsitePanel.WebDavPortal.Controllers
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
public ActionResult PasswordResetFinalStep(Guid token, PasswordEditor model)
|
public ActionResult PasswordResetFinalStep(Guid token, string pincode, PasswordEditor model)
|
||||||
{
|
{
|
||||||
if (!ModelState.IsValid)
|
if (!ModelState.IsValid)
|
||||||
{
|
{
|
||||||
return View(model);
|
return View(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
var smsResponse = Session[WebDavAppConfigManager.Instance.SessionKeys.PasswordResetSmsKey] as string;
|
var result = VerifyPincode(token, pincode);
|
||||||
|
|
||||||
if (_smsAuthService.VerifyResponse(token, smsResponse) == false)
|
if (result != null)
|
||||||
{
|
{
|
||||||
AddMessage(MessageType.Error, Resources.Messages.IncorrectSmsResponse);
|
return result;
|
||||||
|
|
||||||
return RedirectToRoute(AccountRouteNames.PasswordResetSms);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var tokenEntity = WspContext.Services.Organizations.GetPasswordresetAccessToken(token);
|
var tokenEntity = WspContext.Services.Organizations.GetPasswordresetAccessToken(token);
|
||||||
|
@ -291,7 +299,14 @@ namespace WebsitePanel.WebDavPortal.Controllers
|
||||||
|
|
||||||
AddMessage(MessageType.Success, Resources.Messages.PasswordSuccessfullyChanged);
|
AddMessage(MessageType.Success, Resources.Messages.PasswordSuccessfullyChanged);
|
||||||
|
|
||||||
return RedirectToRoute(AccountRouteNames.Login);
|
return RedirectToRoute(AccountRouteNames.PasswordResetSuccess);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
[AllowAnonymous]
|
||||||
|
public ActionResult PasswordSuccessfullyChanged()
|
||||||
|
{
|
||||||
|
return View();
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
|
@ -308,8 +323,10 @@ namespace WebsitePanel.WebDavPortal.Controllers
|
||||||
var user = WspContext.Services.Organizations.GetUserGeneralSettings(accessToken.ItemId,
|
var user = WspContext.Services.Organizations.GetUserGeneralSettings(accessToken.ItemId,
|
||||||
accessToken.AccountId);
|
accessToken.AccountId);
|
||||||
|
|
||||||
|
var result = WspContext.Services.Organizations.SendResetUserPasswordPincodeSms(accessToken.AccessTokenGuid,
|
||||||
|
user.MobilePhone);
|
||||||
|
|
||||||
if (SendPasswordResetSms(accessToken.AccessTokenGuid, user.MobilePhone))
|
if (result.IsSuccess)
|
||||||
{
|
{
|
||||||
AddMessage(MessageType.Success, Resources.Messages.SmsWasSent);
|
AddMessage(MessageType.Success, Resources.Messages.SmsWasSent);
|
||||||
}
|
}
|
||||||
|
@ -323,22 +340,37 @@ namespace WebsitePanel.WebDavPortal.Controllers
|
||||||
|
|
||||||
#region Helpers
|
#region Helpers
|
||||||
|
|
||||||
private bool SendPasswordResetSms(Guid token, string mobilePhone)
|
/// <summary>
|
||||||
|
/// Verify pincode, if it's absent - verifying pincode from session
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="token">Password reset token</param>
|
||||||
|
/// <param name="pincode">Pincode to verify if session pincode is absent</param>
|
||||||
|
private ActionResult VerifyPincode(Guid token, string pincode)
|
||||||
{
|
{
|
||||||
var response = _smsAuthService.SendRequestMessage(mobilePhone);
|
var smsResponse = Session[WebDavAppConfigManager.Instance.SessionKeys.PasswordResetSmsKey] as string;
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(response))
|
if (string.IsNullOrEmpty(pincode) == false)
|
||||||
{
|
{
|
||||||
return false;
|
smsResponse = pincode;
|
||||||
}
|
}
|
||||||
WspContext.Services.Organizations.SetAccessTokenResponse(token, response);
|
|
||||||
|
|
||||||
return true;
|
if (_smsAuthService.VerifyResponse(token, smsResponse) == false)
|
||||||
|
{
|
||||||
|
AddMessage(MessageType.Error, Resources.Messages.IncorrectSmsResponse);
|
||||||
|
|
||||||
|
return RedirectToRoute(AccountRouteNames.PasswordResetSms);
|
||||||
|
}
|
||||||
|
|
||||||
|
var tokenEntity = WspContext.Services.Organizations.GetPasswordresetAccessToken(token);
|
||||||
|
|
||||||
|
Session[WebDavAppConfigManager.Instance.SessionKeys.ItemId] = tokenEntity.ItemId;
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private UserProfile GetUserProfileModel(int itemId, int accountId)
|
private UserProfile GetUserProfileModel(int itemId, int accountId)
|
||||||
{
|
{
|
||||||
var user = WspContext.Services.Organizations.GetUserGeneralSettings(itemId, accountId);
|
var user = WspContext.Services.Organizations.GetUserGeneralSettingsWithExtraData(itemId, accountId);
|
||||||
|
|
||||||
return Mapper.Map<OrganizationUser, UserProfile>(user);
|
return Mapper.Map<OrganizationUser, UserProfile>(user);
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,15 @@ namespace WebsitePanel.WebDavPortal.Resources {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Account.
|
||||||
|
/// </summary>
|
||||||
|
public static string Account {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Account", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Actions.
|
/// Looks up a localized string similar to Actions.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -123,6 +132,15 @@ namespace WebsitePanel.WebDavPortal.Resources {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to You can now access your {0}..
|
||||||
|
/// </summary>
|
||||||
|
public static string CanAccessYourFormat {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("CanAccessYourFormat", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Cancel.
|
/// Looks up a localized string similar to Cancel.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -537,6 +555,15 @@ namespace WebsitePanel.WebDavPortal.Resources {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Your new password has been set..
|
||||||
|
/// </summary>
|
||||||
|
public static string NewPasswordBeenSet {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("NewPasswordBeenSet", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Confirm password.
|
/// Looks up a localized string similar to Confirm password.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -627,6 +654,15 @@ namespace WebsitePanel.WebDavPortal.Resources {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Password never expires. If you want to change password then please click {0}..
|
||||||
|
/// </summary>
|
||||||
|
public static string PasswordNeverExpiresFormat {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("PasswordNeverExpiresFormat", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Password reset.
|
/// Looks up a localized string similar to Password reset.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -393,4 +393,16 @@
|
||||||
<data name="Login" xml:space="preserve">
|
<data name="Login" xml:space="preserve">
|
||||||
<value>Login</value>
|
<value>Login</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="PasswordNeverExpiresFormat" xml:space="preserve">
|
||||||
|
<value>Password never expires. If you want to change password then please click {0}.</value>
|
||||||
|
</data>
|
||||||
|
<data name="Account" xml:space="preserve">
|
||||||
|
<value>Account</value>
|
||||||
|
</data>
|
||||||
|
<data name="CanAccessYourFormat" xml:space="preserve">
|
||||||
|
<value>You can now access your {0}.</value>
|
||||||
|
</data>
|
||||||
|
<data name="NewPasswordBeenSet" xml:space="preserve">
|
||||||
|
<value>Your new password has been set.</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -0,0 +1,18 @@
|
||||||
|
@using WebsitePanel.WebDavPortal.Resources
|
||||||
|
@using WebsitePanel.WebDavPortal.UI.Routes
|
||||||
|
|
||||||
|
@{
|
||||||
|
string message = string.Format(UI.CanAccessYourFormat, Html.RouteLink(UI.Account,AccountRouteNames.Login));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
<div class="container row">
|
||||||
|
<div class="form-group">
|
||||||
|
<h3>@Messages.PasswordSuccessfullyChanged</h3>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<div>
|
||||||
|
@UI.NewPasswordBeenSet @Html.Raw(message)
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -6,7 +6,16 @@
|
||||||
@{
|
@{
|
||||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||||
|
|
||||||
var passwordExpriationText = string.Format(UI.PasswordExpirationFormat, Model.PasswordExpirationDateTime.ToString(Formats.DateFormatWithTime), Html.RouteLink(UI.Here.ToLowerInvariant(), AccountRouteNames.PasswordChange));
|
var passwordExpriationText = string.Empty;
|
||||||
|
|
||||||
|
if (Model.PasswordExpirationDateTime == DateTime.MaxValue)
|
||||||
|
{
|
||||||
|
passwordExpriationText = string.Format(UI.PasswordNeverExpiresFormat, Html.RouteLink(UI.Here.ToLowerInvariant(), AccountRouteNames.PasswordChange));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
passwordExpriationText = string.Format(UI.PasswordExpirationFormat, Model.PasswordExpirationDateTime.ToString(Formats.DateFormatWithTime), Html.RouteLink(UI.Here.ToLowerInvariant(), AccountRouteNames.PasswordChange));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
<div class="container row">
|
<div class="container row">
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
<add key="ItemIdSessionKey" value="ItemId" />
|
<add key="ItemIdSessionKey" value="ItemId" />
|
||||||
<add key="UserGroupsKey" value="UserGroups" />
|
<add key="UserGroupsKey" value="UserGroups" />
|
||||||
<add key="OwaEditFoldersSession" value="OwaEditFolders" />
|
<add key="OwaEditFoldersSession" value="OwaEditFolders" />
|
||||||
<add key="PassswordResetSmsKey" value="PassswordResetSms" />
|
<add key="PasswordResetSmsKey" value="PasswordResetSms" />
|
||||||
</sessionKeys>
|
</sessionKeys>
|
||||||
<fileIcons defaultPath="~/Content/Images/other-icon.png" folderPath="~/Content/Images/folder_100x100.png">
|
<fileIcons defaultPath="~/Content/Images/other-icon.png" folderPath="~/Content/Images/folder_100x100.png">
|
||||||
<add extension=".txt" path="~/Content/Images/txt-icon.png" />
|
<add extension=".txt" path="~/Content/Images/txt-icon.png" />
|
||||||
|
@ -101,7 +101,6 @@
|
||||||
<add extension=".txt" mimeType="text/plain" isTargetBlank="true" />
|
<add extension=".txt" mimeType="text/plain" isTargetBlank="true" />
|
||||||
<add extension=".pdf" mimeType="application/pdf" isTargetBlank="true" />
|
<add extension=".pdf" mimeType="application/pdf" isTargetBlank="true" />
|
||||||
</typeOpener>
|
</typeOpener>
|
||||||
<twilio accountSid="s" authorizationToken="s" phoneFrom="s"/>
|
|
||||||
</webDavExplorerConfigurationSettings>
|
</webDavExplorerConfigurationSettings>
|
||||||
<!--
|
<!--
|
||||||
For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367.
|
For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367.
|
||||||
|
|
|
@ -489,6 +489,7 @@
|
||||||
<Content Include="Views\Account\PasswordResetEmailSent.cshtml" />
|
<Content Include="Views\Account\PasswordResetEmailSent.cshtml" />
|
||||||
<Content Include="Views\Account\PasswordResetSms.cshtml" />
|
<Content Include="Views\Account\PasswordResetSms.cshtml" />
|
||||||
<Content Include="Views\Account\PasswordResetFinalStep.cshtml" />
|
<Content Include="Views\Account\PasswordResetFinalStep.cshtml" />
|
||||||
|
<Content Include="Views\Account\PasswordSuccessfullyChanged.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Models\FileSystem\Enums\" />
|
<Folder Include="Models\FileSystem\Enums\" />
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
<%@ WebHandler Language="C#" Class="WebsitePanel.WebPortal.WebsitePanelAjaxHandler,WebsitePanel.Portal.Modules" %>
|
|
@ -29,6 +29,9 @@
|
||||||
<NestedSpacesPage>NestedSpaces</NestedSpacesPage>
|
<NestedSpacesPage>NestedSpaces</NestedSpacesPage>
|
||||||
<UsersSearchPage>SearchUsers</UsersSearchPage>
|
<UsersSearchPage>SearchUsers</UsersSearchPage>
|
||||||
<SpacesSearchPage>SearchSpaces</SpacesSearchPage>
|
<SpacesSearchPage>SearchSpaces</SpacesSearchPage>
|
||||||
|
<!--TODO START-->
|
||||||
|
<SearchObjectPage>SearchObject</SearchObjectPage>
|
||||||
|
<!--TODO END-->
|
||||||
<LoggedUserAccountPage>LoggedUserDetails</LoggedUserAccountPage>
|
<LoggedUserAccountPage>LoggedUserDetails</LoggedUserAccountPage>
|
||||||
<!-- Skins and Containers -->
|
<!-- Skins and Containers -->
|
||||||
<PortalSkin>Browse2.ascx</PortalSkin>
|
<PortalSkin>Browse2.ascx</PortalSkin>
|
||||||
|
|
|
@ -25,6 +25,14 @@
|
||||||
</Controls>
|
</Controls>
|
||||||
</ModuleDefinition>
|
</ModuleDefinition>
|
||||||
|
|
||||||
|
<!--TODO START-->
|
||||||
|
<ModuleDefinition id="SearchObject">
|
||||||
|
<Controls>
|
||||||
|
<Control key="" src="WebsitePanel/SearchObject.ascx" title="SearchObject" type="View" />
|
||||||
|
</Controls>
|
||||||
|
</ModuleDefinition>
|
||||||
|
<!--TODO END-->
|
||||||
|
|
||||||
<!-- User Account -->
|
<!-- User Account -->
|
||||||
<ModuleDefinition id="LoggedUserDetails">
|
<ModuleDefinition id="LoggedUserDetails">
|
||||||
<Controls>
|
<Controls>
|
||||||
|
|
|
@ -32,6 +32,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="Home" roles="Administrator,Reseller,PlatformCSR,ResellerCSR,PlatformHelpdesk,ResellerHelpdesk,User" skin="Browse3.ascx" align="right">
|
<Page name="Home" roles="Administrator,Reseller,PlatformCSR,ResellerCSR,PlatformHelpdesk,ResellerHelpdesk,User" skin="Browse3.ascx" align="right">
|
||||||
<Content id="LeftPane">
|
<Content id="LeftPane">
|
||||||
<Module moduleDefinitionID="UserAccountMenu" title="UserMenu" container="Clear.ascx">
|
<Module moduleDefinitionID="UserAccountMenu" title="UserMenu" container="Clear.ascx">
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -5178,7 +5178,6 @@
|
||||||
<data name="Quota.VPSForPC.StartShutdownAllowed" xml:space="preserve">
|
<data name="Quota.VPSForPC.StartShutdownAllowed" xml:space="preserve">
|
||||||
<value>Allow user to Start, Turn off VPS</value>
|
<value>Allow user to Start, Turn off VPS</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<data name="ResourceGroup.VPS2012" xml:space="preserve">
|
<data name="ResourceGroup.VPS2012" xml:space="preserve">
|
||||||
<value>Virtual Private Servers 2012</value>
|
<value>Virtual Private Servers 2012</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -5245,7 +5244,6 @@
|
||||||
<data name="Quota.VPS2012.StartShutdownAllowed" xml:space="preserve">
|
<data name="Quota.VPS2012.StartShutdownAllowed" xml:space="preserve">
|
||||||
<value>Allow user to Start, Turn off VPS</value>
|
<value>Allow user to Start, Turn off VPS</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<data name="Error.CreateCheckPointError" xml:space="preserve">
|
<data name="Error.CreateCheckPointError" xml:space="preserve">
|
||||||
<value>Error creating CheckPoint</value>
|
<value>Error creating CheckPoint</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -5831,7 +5829,7 @@
|
||||||
<data name="ERROR.REMOTE_DESKTOP_SERVICES_VIEW_SESSION" xml:space="preserve">
|
<data name="ERROR.REMOTE_DESKTOP_SERVICES_VIEW_SESSION" xml:space="preserve">
|
||||||
<value>View session error</value>
|
<value>View session error</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ERROR.REMOTE_DESKTOP_SERVICES_CONTROL_SESSION" xml:space="preserve">
|
<data name="ERROR.REMOTE_DESKTOP_SERVICES_CONTROL_SESSION" xml:space="preserve">
|
||||||
<value>Control session error</value>
|
<value>Control session error</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ERROR.REMOTE_DESKTOP_SERVICES_USER_SESSIONS" xml:space="preserve">
|
<data name="ERROR.REMOTE_DESKTOP_SERVICES_USER_SESSIONS" xml:space="preserve">
|
||||||
|
@ -5852,4 +5850,7 @@
|
||||||
<data name="Error.UNABLETOLOADPASSWORDSETTINGS" xml:space="preserve">
|
<data name="Error.UNABLETOLOADPASSWORDSETTINGS" xml:space="preserve">
|
||||||
<value>Unable to load password settings</value>
|
<value>Unable to load password settings</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Error.SEND_USER_PASSWORD_RESET_SMS" xml:space="preserve">
|
||||||
|
<value>Sms was not sent.</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -308,3 +308,75 @@ p.warningText {font-size:14px; color:Red; text-align:center;}
|
||||||
.LinkText {color:#428bca;}
|
.LinkText {color:#428bca;}
|
||||||
.WrapText { white-space: normal;}
|
.WrapText { white-space: normal;}
|
||||||
.chosen-container { margin-top: -30px; }
|
.chosen-container { margin-top: -30px; }
|
||||||
|
|
||||||
|
.ui-autocomplete {z-index: 200 !important; }
|
||||||
|
|
||||||
|
.ui-button {
|
||||||
|
padding: 5px 5px;
|
||||||
|
margin: 3px;
|
||||||
|
background: #20A0D0;
|
||||||
|
color: white;
|
||||||
|
border: 1px solid #2080A0;
|
||||||
|
float: left;
|
||||||
|
cursor: pointer;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-button:hover {
|
||||||
|
background: #20B0E0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-popupdialog {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
background-color: #FFF;
|
||||||
|
border: 1px solid #C0C0C0;
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||||
|
box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.176);
|
||||||
|
background-clip: padding-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-popupdialog .title {
|
||||||
|
padding: 5px;
|
||||||
|
background: #F8F8F8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-popupdialog .content {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-popupdialog .actions {
|
||||||
|
padding: 5px;
|
||||||
|
border-top: 1px solid #C0C0C0;
|
||||||
|
background: #F0F0F0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-menu {
|
||||||
|
background-color: #FFF;
|
||||||
|
border: 1px solid #C0C0C0;
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||||
|
box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.176);
|
||||||
|
background-clip: padding-box;
|
||||||
|
}
|
||||||
|
.ui-menu-item {
|
||||||
|
}
|
||||||
|
.ui-widget-content {
|
||||||
|
background: #FFF;
|
||||||
|
}
|
||||||
|
.ui-corner-all {
|
||||||
|
border-radius: 0px;
|
||||||
|
-moz-border-radius: 0px;
|
||||||
|
-webkit-border-radius: 0px;
|
||||||
|
}
|
||||||
|
.ui-menu-item .ui-state-hover
|
||||||
|
{
|
||||||
|
background: #f0f0f0;
|
||||||
|
border-radius: 0px;
|
||||||
|
-moz-border-radius: 0px;
|
||||||
|
-webkit-border-radius: 0px;
|
||||||
|
border-color: #f0f0f0;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
.ui-menu-item:hover {
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
}
|
|
@ -842,6 +842,13 @@ namespace WebsitePanel.Portal
|
||||||
return PortalConfiguration.SiteSettings["SpacesSearchPage"];
|
return PortalConfiguration.SiteSettings["SpacesSearchPage"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO START
|
||||||
|
public static string GetObjectSearchPageId()
|
||||||
|
{
|
||||||
|
return PortalConfiguration.SiteSettings["SearchObjectPage"];
|
||||||
|
}
|
||||||
|
//TODO END
|
||||||
|
|
||||||
public static string GetNestedSpacesPageId()
|
public static string GetNestedSpacesPageId()
|
||||||
{
|
{
|
||||||
return PortalConfiguration.SiteSettings["NestedSpacesPage"];
|
return PortalConfiguration.SiteSettings["NestedSpacesPage"];
|
||||||
|
|
|
@ -0,0 +1,110 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 1.3
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">1.3</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1">this is my long string</data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
[base64 mime encoded serialized .NET Framework object]
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>1.3</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="gvType.Header" xml:space="preserve">
|
||||||
|
<value>Type</value>
|
||||||
|
</data>
|
||||||
|
<data name="gvText.Header" xml:space="preserve">
|
||||||
|
<value>Search text</value>
|
||||||
|
</data>
|
||||||
|
<data name="gvFullType.Header" xml:space="preserve">
|
||||||
|
<value>Full Type</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
|
@ -141,6 +141,12 @@
|
||||||
<data name="lblNoChangesTextBody.Text" xml:space="preserve">
|
<data name="lblNoChangesTextBody.Text" xml:space="preserve">
|
||||||
<value>No Changes Text Body:</value>
|
<value>No Changes Text Body:</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="lblPasswordResetLinkSmsBody.Text" xml:space="preserve">
|
||||||
|
<value>Password Reset Link Sms Body:</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblPasswordResetPincodeSmsBody.Text" xml:space="preserve">
|
||||||
|
<value>Password Reset Link Pincode Body:</value>
|
||||||
|
</data>
|
||||||
<data name="lblPriority.Text" xml:space="preserve">
|
<data name="lblPriority.Text" xml:space="preserve">
|
||||||
<value>Priority:</value>
|
<value>Priority:</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -180,4 +180,16 @@
|
||||||
<data name="locEnablePasswordReset.Text" xml:space="preserve">
|
<data name="locEnablePasswordReset.Text" xml:space="preserve">
|
||||||
<value>Enable password reset:</value>
|
<value>Enable password reset:</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="lblAccountSid.Text" xml:space="preserve">
|
||||||
|
<value>AccountSID</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblAuthToken.Text" xml:space="preserve">
|
||||||
|
<value>AuthToken</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblPhoneFrom.Text" xml:space="preserve">
|
||||||
|
<value>Phone From</value>
|
||||||
|
</data>
|
||||||
|
<data name="TwilioSettings.Text" xml:space="preserve">
|
||||||
|
<value>Twilio</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -0,0 +1,68 @@
|
||||||
|
using System;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.Script.Serialization;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using WebsitePanel.Portal;
|
||||||
|
|
||||||
|
namespace WebsitePanel.WebPortal
|
||||||
|
{
|
||||||
|
public class WebsitePanelAjaxHandler : IHttpHandler
|
||||||
|
{
|
||||||
|
public bool IsReusable { get { return true; } }
|
||||||
|
|
||||||
|
public void ProcessRequest(HttpContext context)
|
||||||
|
{
|
||||||
|
String filterValue = context.Request.Params["term"];
|
||||||
|
String fullType = context.Request.Params["fullType"];
|
||||||
|
String columnType = context.Request.Params["columnType"];
|
||||||
|
|
||||||
|
if (fullType == "Spaces")
|
||||||
|
{
|
||||||
|
String strItemType = context.Request.Params["itemType"];
|
||||||
|
int itemType = Int32.Parse(strItemType);
|
||||||
|
DataSet dsObjectItems = ES.Services.Packages.SearchServiceItemsPaged(PanelSecurity.EffectiveUserId, itemType,
|
||||||
|
String.Format("%{0}%", filterValue),
|
||||||
|
"",0, 100);
|
||||||
|
DataTable dt = dsObjectItems.Tables[1];
|
||||||
|
List<Dictionary<string, string>> dataList = new List<Dictionary<string, string>>();
|
||||||
|
for (int i = 0; i < dt.Rows.Count; ++i)
|
||||||
|
{
|
||||||
|
DataRow row = dt.Rows[i];
|
||||||
|
Dictionary<string, string> obj = new Dictionary<string, string>();
|
||||||
|
obj["ColumnType"] = "PackageName";
|
||||||
|
obj["TextSearch"] = row["PackageName"].ToString();
|
||||||
|
obj["FullType"] = "Space";
|
||||||
|
dataList.Add(obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
var jsonSerialiser = new JavaScriptSerializer();
|
||||||
|
var json = jsonSerialiser.Serialize(dataList);
|
||||||
|
context.Response.ContentType = "text/plain";
|
||||||
|
context.Response.Write(json);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DataSet dsObjectItems = ES.Services.Packages.GetSearchObject(PanelSecurity.EffectiveUserId, null,
|
||||||
|
String.Format("%{0}%", filterValue),
|
||||||
|
0, 0, "", 0, 100, columnType);
|
||||||
|
DataTable dt = dsObjectItems.Tables[2];
|
||||||
|
List<Dictionary<string, string>> dataList = new List<Dictionary<string, string>>();
|
||||||
|
for (int i = 0; i < dt.Rows.Count; ++i)
|
||||||
|
{
|
||||||
|
DataRow row = dt.Rows[i];
|
||||||
|
Dictionary<string, string> obj = new Dictionary<string, string>();
|
||||||
|
obj["ColumnType"] = row["ColumnType"].ToString();
|
||||||
|
obj["TextSearch"] = row["TextSearch"].ToString();
|
||||||
|
obj["FullType"] = row["FullType"].ToString();
|
||||||
|
dataList.Add(obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
var jsonSerialiser = new JavaScriptSerializer();
|
||||||
|
var json = jsonSerialiser.Serialize(dataList);
|
||||||
|
context.Response.ContentType = "text/plain";
|
||||||
|
context.Response.Write(json);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
|
@ -36,6 +36,7 @@ using System.Web.Caching;
|
||||||
|
|
||||||
using WebsitePanel.EnterpriseServer;
|
using WebsitePanel.EnterpriseServer;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace WebsitePanel.Portal
|
namespace WebsitePanel.Portal
|
||||||
{
|
{
|
||||||
|
@ -244,5 +245,33 @@ namespace WebsitePanel.Portal
|
||||||
return dsServiceItemsPaged.Tables[1];
|
return dsServiceItemsPaged.Tables[1];
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
//TODO START
|
||||||
|
#region Service Items Paged Search
|
||||||
|
DataSet dsObjectItemsPaged;
|
||||||
|
|
||||||
|
public int SearchObjectItemsPagedCount(string filterColumn, string filterValue, string colType)
|
||||||
|
{
|
||||||
|
return (int)dsObjectItemsPaged.Tables[0].Rows[0][0];
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataTable SearchObjectItemsPaged(int maximumRows, int startRowIndex, string sortColumn,
|
||||||
|
string filterColumn, string filterValue, string colType)
|
||||||
|
{
|
||||||
|
dsObjectItemsPaged = ES.Services.Packages.GetSearchObject(PanelSecurity.EffectiveUserId, filterColumn,
|
||||||
|
String.Format("%{0}%", filterValue),
|
||||||
|
0, 0, sortColumn, startRowIndex, maximumRows, colType);
|
||||||
|
return dsObjectItemsPaged.Tables[2];
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataTable SearchObjectTypes(string filterColumn, string filterValue, string sortColumn)
|
||||||
|
{
|
||||||
|
dsObjectItemsPaged = ES.Services.Packages.GetSearchObject(PanelSecurity.EffectiveUserId, filterColumn,
|
||||||
|
String.Format("%{0}%", filterValue),
|
||||||
|
0, 0, sortColumn, 0, 0, "");
|
||||||
|
return dsObjectItemsPaged.Tables[1];
|
||||||
|
}
|
||||||
|
//TODO END
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -219,4 +219,13 @@
|
||||||
<data name="valResetAccountLockout.Text" xml:space="preserve">
|
<data name="valResetAccountLockout.Text" xml:space="preserve">
|
||||||
<value>*</value>
|
<value>*</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="lblMaxPasswordAge.Text" xml:space="preserve">
|
||||||
|
<value>Max Password Age (days):</value>
|
||||||
|
</data>
|
||||||
|
<data name="valCorrectMaxPasswordAge.Text" xml:space="preserve">
|
||||||
|
<value>*</value>
|
||||||
|
</data>
|
||||||
|
<data name="valRequireMaxPasswordAge.Text" xml:space="preserve">
|
||||||
|
<value>*</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -123,10 +123,22 @@
|
||||||
<data name="locEmailAddress.Text" xml:space="preserve">
|
<data name="locEmailAddress.Text" xml:space="preserve">
|
||||||
<value>Email:</value>
|
<value>Email:</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="locMobile.Text" xml:space="preserve">
|
||||||
|
<value>Mobile</value>
|
||||||
|
</data>
|
||||||
<data name="locReason.Text" xml:space="preserve">
|
<data name="locReason.Text" xml:space="preserve">
|
||||||
<value>Reason:</value>
|
<value>Reason:</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="locSendTo.Text" xml:space="preserve">
|
||||||
|
<value>Send to:</value>
|
||||||
|
</data>
|
||||||
<data name="locTitle.Text" xml:space="preserve">
|
<data name="locTitle.Text" xml:space="preserve">
|
||||||
<value>Reset Password</value>
|
<value>Reset Password</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="rbtnEmail.Text" xml:space="preserve">
|
||||||
|
<value>Email</value>
|
||||||
|
</data>
|
||||||
|
<data name="rbtnMobile.Text" xml:space="preserve">
|
||||||
|
<value>Mobile</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -51,7 +51,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
{
|
{
|
||||||
BindPasswordSettings();
|
BindPasswordSettings();
|
||||||
|
|
||||||
string instructions = ES.Services.ExchangeServer.GetMailboxSetupInstructions(PanelRequest.ItemID, PanelRequest.AccountID, false, false, false);
|
string instructions = ES.Services.ExchangeServer.GetMailboxSetupInstructions(PanelRequest.ItemID, PanelRequest.AccountID, false, false, false, " ");
|
||||||
if (!string.IsNullOrEmpty(instructions))
|
if (!string.IsNullOrEmpty(instructions))
|
||||||
{
|
{
|
||||||
chkSendInstructions.Checked = chkSendInstructions.Visible = sendInstructionEmail.Visible = true;
|
chkSendInstructions.Checked = chkSendInstructions.Visible = sendInstructionEmail.Visible = true;
|
||||||
|
|
|
@ -47,7 +47,12 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
// load content
|
// load content
|
||||||
litContent.Text = ES.Services.ExchangeServer.GetMailboxSetupInstructions(
|
litContent.Text = ES.Services.ExchangeServer.GetMailboxSetupInstructions(
|
||||||
PanelRequest.ItemID, PanelRequest.AccountID,
|
PanelRequest.ItemID, PanelRequest.AccountID,
|
||||||
false, false, false);
|
false, false, false,
|
||||||
|
PortalUtils.EditUrl("ItemID", PanelRequest.ItemID.ToString(),
|
||||||
|
"user_reset_password",
|
||||||
|
"SpaceID=" + PanelSecurity.PackageId,
|
||||||
|
"Context=Mailbox",
|
||||||
|
"AccountID=" + PanelRequest.AccountID).Trim('~'));
|
||||||
|
|
||||||
// bind user details
|
// bind user details
|
||||||
PackageInfo package = ES.Services.Packages.GetPackage(PanelSecurity.PackageId);
|
PackageInfo package = ES.Services.Packages.GetPackage(PanelSecurity.PackageId);
|
||||||
|
|
|
@ -7,35 +7,35 @@
|
||||||
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||||
<script type="text/javascript" src="/JavaScript/jquery.min.js?v=1.4.4"></script>
|
<script type="text/javascript" src="/JavaScript/jquery.min.js?v=1.4.4"></script>
|
||||||
|
|
||||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
<wsp:EnableAsyncTasksSupport ID="asyncTasks" runat="server" />
|
||||||
|
|
||||||
<div id="ExchangeContainer">
|
<div id="ExchangeContainer">
|
||||||
<div class="Module">
|
<div class="Module">
|
||||||
<div class="Left">
|
<div class="Left">
|
||||||
</div>
|
</div>
|
||||||
<div class="Content">
|
<div class="Content">
|
||||||
<div class="Center">
|
<div class="Center">
|
||||||
<div class="Title">
|
<div class="Title">
|
||||||
<asp:Image ID="Image1" SkinID="ExchangeList48" runat="server" />
|
<asp:Image ID="Image1" SkinID="ExchangeList48" runat="server" />
|
||||||
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Edit Settings"></asp:Localize>
|
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Edit Settings"></asp:Localize>
|
||||||
|
|
||||||
<asp:Literal ID="litOrganizationName" runat="server" Text="Organization" />
|
<asp:Literal ID="litOrganizationName" runat="server" Text="Organization" />
|
||||||
</div>
|
</div>
|
||||||
<div class="FormBody">
|
<div class="FormBody">
|
||||||
|
|
||||||
<wsp:CollectionTabs id="tabs" runat="server" SelectedTab="organization_settings_password_settings" />
|
<wsp:CollectionTabs ID="tabs" runat="server" SelectedTab="organization_settings_password_settings" />
|
||||||
|
|
||||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
<wsp:SimpleMessageBox ID="messageBox" runat="server" />
|
||||||
<asp:UpdatePanel runat="server" ID="PasswordPolicyPanel" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
<asp:UpdatePanel runat="server" ID="PasswordPolicyPanel" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<wsp:CollapsiblePanel id="colPasswordSettings" runat="server" TargetControlID="panelPasswordSettings" meta:resourcekey="colPasswordSettings" Text="Password settings">
|
<wsp:CollapsiblePanel ID="colPasswordSettings" runat="server" TargetControlID="panelPasswordSettings" meta:ResourceKey="colPasswordSettings" Text="Password settings"></wsp:CollapsiblePanel>
|
||||||
</wsp:CollapsiblePanel>
|
|
||||||
|
|
||||||
<asp:Panel runat="server" ID="panelPasswordSettings">
|
<asp:Panel runat="server" ID="panelPasswordSettings">
|
||||||
<table id="PolicyTable" runat="server" cellpadding="2">
|
<table id="PolicyTable" runat="server" cellpadding="2">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="Normal" style="width:150px;"><asp:Label ID="lblMinimumLength" runat="server"
|
<td class="Normal" style="width: 150px;">
|
||||||
meta:resourcekey="lblMinimumLength" Text="Minimum length:"></asp:Label></td>
|
<asp:Label ID="lblMinimumLength" runat="server"
|
||||||
|
meta:resourcekey="lblMinimumLength" Text="Minimum length:"></asp:Label></td>
|
||||||
<td class="Normal">
|
<td class="Normal">
|
||||||
<asp:TextBox ID="txtMinimumLength" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
|
<asp:TextBox ID="txtMinimumLength" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="valRequireMinLength" runat="server" ControlToValidate="txtMinimumLength" meta:resourcekey="valRequireMinLength"
|
<asp:RequiredFieldValidator ID="valRequireMinLength" runat="server" ControlToValidate="txtMinimumLength" meta:resourcekey="valRequireMinLength"
|
||||||
|
@ -44,19 +44,21 @@
|
||||||
Display="Dynamic" ErrorMessage="*" ValidationExpression="\d{1,3}" ValidationGroup="SettingsEditor"></asp:RegularExpressionValidator></td>
|
Display="Dynamic" ErrorMessage="*" ValidationExpression="\d{1,3}" ValidationGroup="SettingsEditor"></asp:RegularExpressionValidator></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="Normal"><asp:Label ID="lblMaximumLength" runat="server"
|
<td class="Normal">
|
||||||
meta:resourcekey="lblMaximumLength" Text="Maximum length:"></asp:Label></td>
|
<asp:Label ID="lblMaximumLength" runat="server"
|
||||||
|
meta:resourcekey="lblMaximumLength" Text="Maximum length:"></asp:Label></td>
|
||||||
<td class="Normal">
|
<td class="Normal">
|
||||||
<asp:TextBox ID="txtMaximumLength" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
|
<asp:TextBox ID="txtMaximumLength" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="valRequireMaxLength" runat="server" ControlToValidate="txtMaximumLength" meta:resourcekey="valRequireMaxLength"
|
<asp:RequiredFieldValidator ID="valRequireMaxLength" runat="server" ControlToValidate="txtMaximumLength" meta:resourcekey="valRequireMaxLength"
|
||||||
ErrorMessage="*" ValidationGroup="SettingsEditor" Display="Dynamic"></asp:RequiredFieldValidator>
|
ErrorMessage="*" ValidationGroup="SettingsEditor" Display="Dynamic"></asp:RequiredFieldValidator>
|
||||||
<asp:RegularExpressionValidator ID="valCorrectMaxLength" runat="server" ControlToValidate="txtMaximumLength" meta:resourcekey="valCorrectMaxLength"
|
<asp:RegularExpressionValidator ID="valCorrectMaxLength" runat="server" ControlToValidate="txtMaximumLength" meta:resourcekey="valCorrectMaxLength"
|
||||||
Display="Dynamic" ErrorMessage="*" ValidationExpression="\d{1,3}" ValidationGroup="SettingsEditor"></asp:RegularExpressionValidator>
|
Display="Dynamic" ErrorMessage="*" ValidationExpression="\d{1,3}" ValidationGroup="SettingsEditor"></asp:RegularExpressionValidator>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="Normal" style="width:150px;"><asp:Label ID="lblEnforcePasswordHistory" runat="server"
|
<td class="Normal" style="width: 150px;">
|
||||||
meta:resourcekey="lblEnforcePasswordHistory" Text="Enforce Password History:"></asp:Label></td>
|
<asp:Label ID="lblEnforcePasswordHistory" runat="server"
|
||||||
|
meta:resourcekey="lblEnforcePasswordHistory" Text="Enforce Password History:"></asp:Label></td>
|
||||||
<td class="Normal">
|
<td class="Normal">
|
||||||
<asp:TextBox ID="txtEnforcePasswordHistory" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
|
<asp:TextBox ID="txtEnforcePasswordHistory" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="valRequireEnforcePasswordHistory" runat="server" ControlToValidate="txtEnforcePasswordHistory" meta:resourcekey="valRequireEnforcePasswordHistory"
|
<asp:RequiredFieldValidator ID="valRequireEnforcePasswordHistory" runat="server" ControlToValidate="txtEnforcePasswordHistory" meta:resourcekey="valRequireEnforcePasswordHistory"
|
||||||
|
@ -64,15 +66,27 @@
|
||||||
<asp:RegularExpressionValidator ID="valCorrectEnforcePasswordHistory" runat="server" ControlToValidate="txtEnforcePasswordHistory" meta:resourcekey="valCorrectEnforcePasswordHistory"
|
<asp:RegularExpressionValidator ID="valCorrectEnforcePasswordHistory" runat="server" ControlToValidate="txtEnforcePasswordHistory" meta:resourcekey="valCorrectEnforcePasswordHistory"
|
||||||
Display="Dynamic" ErrorMessage="*" ValidationExpression="\d{1,3}" ValidationGroup="SettingsEditor"></asp:RegularExpressionValidator></td>
|
Display="Dynamic" ErrorMessage="*" ValidationExpression="\d{1,3}" ValidationGroup="SettingsEditor"></asp:RegularExpressionValidator></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="Normal" style="width: 150px;">
|
||||||
|
<asp:Label ID="lblMaxPasswordAge" runat="server"
|
||||||
|
meta:resourcekey="lblMaxPasswordAge" Text="Max Password Age (days):"></asp:Label></td>
|
||||||
|
<td class="Normal">
|
||||||
|
<asp:TextBox ID="txtMaxPasswordAge" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="valRequireMaxPasswordAge" runat="server" ControlToValidate="txtMaxPasswordAge" meta:resourcekey="valRequireMaxPasswordAge"
|
||||||
|
ErrorMessage="*" ValidationGroup="SettingsEditor" Display="Dynamic"></asp:RequiredFieldValidator>
|
||||||
|
<asp:RegularExpressionValidator ID="valCorrectMaxPasswordAge" runat="server" ControlToValidate="txtMaxPasswordAge" meta:resourcekey="valCorrectMaxPasswordAge"
|
||||||
|
Display="Dynamic" ErrorMessage="*" ValidationExpression="\d{1,3}" ValidationGroup="SettingsEditor"></asp:RegularExpressionValidator></td>
|
||||||
|
</tr>
|
||||||
<tr id="RowChkLockOutSettigns" runat="server">
|
<tr id="RowChkLockOutSettigns" runat="server">
|
||||||
<td colspan="2" class="NormalBold">
|
<td colspan="2" class="NormalBold">
|
||||||
<asp:CheckBox id="chkLockOutSettigns" runat="server" meta:resourcekey="chkLockOutSettigns"
|
<asp:CheckBox ID="chkLockOutSettigns" runat="server" meta:resourcekey="chkLockOutSettigns"
|
||||||
Text="Enable Lockout Settings" CssClass="NormalBold" AutoPostBack="true" OnCheckedChanged="chkLockOutSettigns_CheckedChanged" />
|
Text="Enable Lockout Settings" CssClass="NormalBold" AutoPostBack="true" OnCheckedChanged="chkLockOutSettigns_CheckedChanged" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="RowAccountLockoutDuration" runat="server">
|
<tr id="RowAccountLockoutDuration" runat="server">
|
||||||
<td class="Normal" style="width:150px;"><asp:Label ID="lblAccountLockoutDuration" runat="server"
|
<td class="Normal" style="width: 150px;">
|
||||||
meta:resourcekey="lblAccountLockoutDuration" Text="Account Lockout Duration (minutes):"></asp:Label></td>
|
<asp:Label ID="lblAccountLockoutDuration" runat="server"
|
||||||
|
meta:resourcekey="lblAccountLockoutDuration" Text="Account Lockout Duration (minutes):"></asp:Label></td>
|
||||||
<td class="Normal">
|
<td class="Normal">
|
||||||
<asp:TextBox ID="txtAccountLockoutDuration" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
|
<asp:TextBox ID="txtAccountLockoutDuration" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="valRequireAccountLockoutDuration" runat="server" ControlToValidate="txtAccountLockoutDuration" meta:resourcekey="valRequireAccountLockoutDuration"
|
<asp:RequiredFieldValidator ID="valRequireAccountLockoutDuration" runat="server" ControlToValidate="txtAccountLockoutDuration" meta:resourcekey="valRequireAccountLockoutDuration"
|
||||||
|
@ -85,7 +99,8 @@
|
||||||
<asp:Label ID="lblLockedOut" runat="server"
|
<asp:Label ID="lblLockedOut" runat="server"
|
||||||
meta:resourcekey="lblLockedOut" Text="Account Lockout threshold:"></asp:Label>
|
meta:resourcekey="lblLockedOut" Text="Account Lockout threshold:"></asp:Label>
|
||||||
</td>
|
</td>
|
||||||
<td class="Normal"><asp:TextBox ID="txtLockedOut" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
|
<td class="Normal">
|
||||||
|
<asp:TextBox ID="txtLockedOut" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="valRequiredLockedOut" runat="server" ControlToValidate="txtLockedOut" meta:resourcekey="valRequiredLockedOut"
|
<asp:RequiredFieldValidator ID="valRequiredLockedOut" runat="server" ControlToValidate="txtLockedOut" meta:resourcekey="valRequiredLockedOut"
|
||||||
ErrorMessage="*" ValidationGroup="SettingsEditor" Display="Dynamic"></asp:RequiredFieldValidator>
|
ErrorMessage="*" ValidationGroup="SettingsEditor" Display="Dynamic"></asp:RequiredFieldValidator>
|
||||||
<asp:RegularExpressionValidator ID="valCorrectLockedOut" runat="server" ControlToValidate="txtLockedOut" meta:resourcekey="valCorrectLockedOut"
|
<asp:RegularExpressionValidator ID="valCorrectLockedOut" runat="server" ControlToValidate="txtLockedOut" meta:resourcekey="valCorrectLockedOut"
|
||||||
|
@ -97,7 +112,8 @@
|
||||||
<asp:Label ID="lblResetAccountLockout" runat="server"
|
<asp:Label ID="lblResetAccountLockout" runat="server"
|
||||||
meta:resourcekey="lblResetAccountLockout" Text="Reset account lockout counter after (minutes):"></asp:Label>
|
meta:resourcekey="lblResetAccountLockout" Text="Reset account lockout counter after (minutes):"></asp:Label>
|
||||||
</td>
|
</td>
|
||||||
<td class="Normal"><asp:TextBox ID="txtResetAccountLockout" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
|
<td class="Normal">
|
||||||
|
<asp:TextBox ID="txtResetAccountLockout" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="valRequireResetAccountLockout" runat="server" ControlToValidate="txtResetAccountLockout" meta:resourcekey="valRequireResetAccountLockout"
|
<asp:RequiredFieldValidator ID="valRequireResetAccountLockout" runat="server" ControlToValidate="txtResetAccountLockout" meta:resourcekey="valRequireResetAccountLockout"
|
||||||
ErrorMessage="*" ValidationGroup="SettingsEditor" Display="Dynamic"></asp:RequiredFieldValidator>
|
ErrorMessage="*" ValidationGroup="SettingsEditor" Display="Dynamic"></asp:RequiredFieldValidator>
|
||||||
<asp:RegularExpressionValidator ID="valResetAccountLockout" runat="server" ControlToValidate="txtResetAccountLockout" meta:resourcekey="valResetAccountLockout"
|
<asp:RegularExpressionValidator ID="valResetAccountLockout" runat="server" ControlToValidate="txtResetAccountLockout" meta:resourcekey="valResetAccountLockout"
|
||||||
|
@ -107,8 +123,8 @@
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" class="NormalBold">
|
<td colspan="2" class="NormalBold">
|
||||||
<asp:CheckBox id="chkPasswordComplexity" runat="server" meta:resourcekey="chkPasswordComplexity"
|
<asp:CheckBox ID="chkPasswordComplexity" runat="server" meta:resourcekey="chkPasswordComplexity"
|
||||||
Text="Enable Password Complexity" CssClass="NormalBold" AutoPostBack="true" OnCheckedChanged="chkPasswordComplexity_CheckedChanged" />
|
Text="Enable Password Complexity" CssClass="NormalBold" AutoPostBack="true" OnCheckedChanged="chkPasswordComplexity_CheckedChanged" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="RowMinimumUppercase" runat="server">
|
<tr id="RowMinimumUppercase" runat="server">
|
||||||
|
@ -116,31 +132,34 @@
|
||||||
<asp:Label ID="lblMinimumUppercase" runat="server"
|
<asp:Label ID="lblMinimumUppercase" runat="server"
|
||||||
meta:resourcekey="lblMinimumUppercase" Text="Uppercase letters:"></asp:Label>
|
meta:resourcekey="lblMinimumUppercase" Text="Uppercase letters:"></asp:Label>
|
||||||
</td>
|
</td>
|
||||||
<td class="Normal"><asp:TextBox ID="txtMinimumUppercase" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
|
<td class="Normal">
|
||||||
|
<asp:TextBox ID="txtMinimumUppercase" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="valRequireUppercase" runat="server" ControlToValidate="txtMinimumUppercase" meta:resourcekey="valRequireUppercase"
|
<asp:RequiredFieldValidator ID="valRequireUppercase" runat="server" ControlToValidate="txtMinimumUppercase" meta:resourcekey="valRequireUppercase"
|
||||||
ErrorMessage="*" ValidationGroup="SettingsEditor" Display="Dynamic"></asp:RequiredFieldValidator>
|
ErrorMessage="*" ValidationGroup="SettingsEditor" Display="Dynamic"></asp:RequiredFieldValidator>
|
||||||
<asp:RegularExpressionValidator ID="valCorrectUppercase" runat="server" ControlToValidate="txtMinimumUppercase" meta:resourcekey="valCorrectUppercase"
|
<asp:RegularExpressionValidator ID="valCorrectUppercase" runat="server" ControlToValidate="txtMinimumUppercase" meta:resourcekey="valCorrectUppercase"
|
||||||
Display="Dynamic" ErrorMessage="*" ValidationExpression="\d{1,3}" ValidationGroup="SettingsEditor"></asp:RegularExpressionValidator>
|
Display="Dynamic" ErrorMessage="*" ValidationExpression="\d{1,3}" ValidationGroup="SettingsEditor"></asp:RegularExpressionValidator>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="RowMinimumNumbers" runat="server">
|
<tr id="RowMinimumNumbers" runat="server">
|
||||||
<td class="Normal">
|
<td class="Normal">
|
||||||
<asp:Label ID="lblMinimumNumbers" runat="server"
|
<asp:Label ID="lblMinimumNumbers" runat="server"
|
||||||
meta:resourcekey="lblMinimumNumbers" Text="Numbers:"></asp:Label>
|
meta:resourcekey="lblMinimumNumbers" Text="Numbers:"></asp:Label>
|
||||||
</td>
|
</td>
|
||||||
<td class="Normal"><asp:TextBox ID="txtMinimumNumbers" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
|
<td class="Normal">
|
||||||
|
<asp:TextBox ID="txtMinimumNumbers" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="valRequireNumbers" runat="server" ControlToValidate="txtMinimumNumbers" meta:resourcekey="valRequireNumbers"
|
<asp:RequiredFieldValidator ID="valRequireNumbers" runat="server" ControlToValidate="txtMinimumNumbers" meta:resourcekey="valRequireNumbers"
|
||||||
ErrorMessage="*" ValidationGroup="SettingsEditor" Display="Dynamic"></asp:RequiredFieldValidator>
|
ErrorMessage="*" ValidationGroup="SettingsEditor" Display="Dynamic"></asp:RequiredFieldValidator>
|
||||||
<asp:RegularExpressionValidator ID="valCorrectNumbers" runat="server" ControlToValidate="txtMinimumNumbers" meta:resourcekey="valCorrectNumbers"
|
<asp:RegularExpressionValidator ID="valCorrectNumbers" runat="server" ControlToValidate="txtMinimumNumbers" meta:resourcekey="valCorrectNumbers"
|
||||||
Display="Dynamic" ErrorMessage="*" ValidationExpression="\d{1,3}" ValidationGroup="SettingsEditor"></asp:RegularExpressionValidator>
|
Display="Dynamic" ErrorMessage="*" ValidationExpression="\d{1,3}" ValidationGroup="SettingsEditor"></asp:RegularExpressionValidator>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="RowMinimumSymbols" runat="server">
|
<tr id="RowMinimumSymbols" runat="server">
|
||||||
<td class="Normal">
|
<td class="Normal">
|
||||||
<asp:Label ID="lblMinimumSymbols" runat="server"
|
<asp:Label ID="lblMinimumSymbols" runat="server"
|
||||||
meta:resourcekey="lblMinimumSymbols" Text="Non-alphanumeric symbols:"></asp:Label>
|
meta:resourcekey="lblMinimumSymbols" Text="Non-alphanumeric symbols:"></asp:Label>
|
||||||
</td>
|
</td>
|
||||||
<td class="Normal"><asp:TextBox ID="txtMinimumSymbols" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
|
<td class="Normal">
|
||||||
|
<asp:TextBox ID="txtMinimumSymbols" runat="server" CssClass="NormalTextBox" Width="40px"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="valRequireSymbols" runat="server" ControlToValidate="txtMinimumSymbols" meta:resourcekey="valRequireSymbols"
|
<asp:RequiredFieldValidator ID="valRequireSymbols" runat="server" ControlToValidate="txtMinimumSymbols" meta:resourcekey="valRequireSymbols"
|
||||||
ErrorMessage="*" ValidationGroup="SettingsEditor" Display="Dynamic"></asp:RequiredFieldValidator>
|
ErrorMessage="*" ValidationGroup="SettingsEditor" Display="Dynamic"></asp:RequiredFieldValidator>
|
||||||
<asp:RegularExpressionValidator ID="valCorrectSymbols" runat="server" ControlToValidate="txtMinimumSymbols" meta:resourcekey="valCorrectSymbols"
|
<asp:RegularExpressionValidator ID="valCorrectSymbols" runat="server" ControlToValidate="txtMinimumSymbols" meta:resourcekey="valCorrectSymbols"
|
||||||
|
@ -149,20 +168,20 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="rowEqualUsername" runat="server" visible="false">
|
<tr id="rowEqualUsername" runat="server" visible="false">
|
||||||
<td class="Normal" colspan="2">
|
<td class="Normal" colspan="2">
|
||||||
<asp:CheckBox id="chkNotEqualUsername" runat="server" meta:resourcekey="chkNotEqualUsername" Text="Should not be equal to username" />
|
<asp:CheckBox ID="chkNotEqualUsername" runat="server" meta:resourcekey="chkNotEqualUsername" Text="Should not be equal to username" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
<div class="FormFooterClean">
|
<div class="FormFooterClean">
|
||||||
<wsp:ItemButtonPanel id="buttonPanel" runat="server" ValidationGroup="SettingsEditor"
|
<wsp:ItemButtonPanel ID="buttonPanel" runat="server" ValidationGroup="SettingsEditor"
|
||||||
OnSaveClick="btnSave_Click" OnSaveExitClick="btnSaveExit_Click" />
|
OnSaveClick="btnSave_Click" OnSaveExitClick="btnSaveExit_Click" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -1,5 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
|
@ -59,6 +60,8 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
txtResetAccountLockout.Text = PasswordPolicyEditor.GetValueSafe(parts, 10, "0");
|
txtResetAccountLockout.Text = PasswordPolicyEditor.GetValueSafe(parts, 10, "0");
|
||||||
chkLockOutSettigns.Checked = PasswordPolicyEditor.GetValueSafe(parts, 11, false);
|
chkLockOutSettigns.Checked = PasswordPolicyEditor.GetValueSafe(parts, 11, false);
|
||||||
chkPasswordComplexity.Checked = PasswordPolicyEditor.GetValueSafe(parts, 12, true);
|
chkPasswordComplexity.Checked = PasswordPolicyEditor.GetValueSafe(parts, 12, true);
|
||||||
|
|
||||||
|
txtMaxPasswordAge.Text = PasswordPolicyEditor.GetValueSafe(parts, 13, "42");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BindSettings(OrganizationPasswordSettings settings)
|
private void BindSettings(OrganizationPasswordSettings settings)
|
||||||
|
@ -75,6 +78,8 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
txtResetAccountLockout.Text = settings.ResetAccountLockoutCounterAfter.ToString();
|
txtResetAccountLockout.Text = settings.ResetAccountLockoutCounterAfter.ToString();
|
||||||
chkLockOutSettigns.Checked = settings.LockoutSettingsEnabled;
|
chkLockOutSettigns.Checked = settings.LockoutSettingsEnabled;
|
||||||
chkPasswordComplexity.Checked = settings.PasswordComplexityEnabled;
|
chkPasswordComplexity.Checked = settings.PasswordComplexityEnabled;
|
||||||
|
|
||||||
|
txtMaxPasswordAge.Text = settings.MaxPasswordAge.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private OrganizationPasswordSettings GetSettings()
|
private OrganizationPasswordSettings GetSettings()
|
||||||
|
@ -94,6 +99,8 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
settings.LockoutSettingsEnabled = chkLockOutSettigns.Checked;
|
settings.LockoutSettingsEnabled = chkLockOutSettigns.Checked;
|
||||||
settings.PasswordComplexityEnabled =chkPasswordComplexity.Checked;
|
settings.PasswordComplexityEnabled =chkPasswordComplexity.Checked;
|
||||||
|
|
||||||
|
settings.MaxPasswordAge = Utils.ParseInt(txtMaxPasswordAge.Text, 42);
|
||||||
|
|
||||||
return settings;
|
return settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -210,6 +210,42 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.RegularExpressionValidator valCorrectEnforcePasswordHistory;
|
protected global::System.Web.UI.WebControls.RegularExpressionValidator valCorrectEnforcePasswordHistory;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// lblMaxPasswordAge control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Label lblMaxPasswordAge;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtMaxPasswordAge control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.TextBox txtMaxPasswordAge;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// valRequireMaxPasswordAge control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.RequiredFieldValidator valRequireMaxPasswordAge;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// valCorrectMaxPasswordAge control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.RegularExpressionValidator valCorrectMaxPasswordAge;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// RowChkLockOutSettigns control.
|
/// RowChkLockOutSettigns control.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -4,42 +4,69 @@
|
||||||
|
|
||||||
|
|
||||||
<div id="ExchangeContainer">
|
<div id="ExchangeContainer">
|
||||||
<div class="Module">
|
<div class="Module">
|
||||||
<div class="Left">
|
<div class="Left">
|
||||||
</div>
|
</div>
|
||||||
<div class="Content">
|
<div class="Content">
|
||||||
<div class="Center">
|
<div class="Center">
|
||||||
<div class="Title">
|
<div class="Title">
|
||||||
<asp:Image ID="Image1" SkinID="OrganizationUser48" runat="server" />
|
<asp:Image ID="Image1" SkinID="OrganizationUser48" runat="server" />
|
||||||
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Reset Password"></asp:Localize>
|
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Reset Password"></asp:Localize>
|
||||||
-
|
-
|
||||||
<asp:Literal ID="litDisplayName" runat="server" Text="John Smith" />
|
<asp:Literal ID="litDisplayName" runat="server" Text="John Smith" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="FormBody">
|
<div class="FormBody">
|
||||||
<table>
|
<asp:UpdatePanel ID="PasswrodResetUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||||
<tr>
|
<ContentTemplate>
|
||||||
<td class="FormLabel150" valign="top"><asp:Localize ID="locEmailAddress" runat="server" meta:resourcekey="locEmailAddress" ></asp:Localize></td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox runat="server" ID="txtEmailAddress" CssClass="TextBox200"/>
|
|
||||||
<asp:RequiredFieldValidator ID="valEmailAddress" runat="server" ErrorMessage="*" ControlToValidate="txtEmailAddress" ValidationGroup="ResetUserPassword"></asp:RequiredFieldValidator>
|
|
||||||
<asp:RegularExpressionValidator ID="regexEmailValid" runat="server" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="ResetUserPassword" ControlToValidate="txtEmailAddress" ErrorMessage="Invalid Email Format"></asp:RegularExpressionValidator>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="FormLabel150"><asp:Localize ID="locReason" runat="server" meta:resourcekey="locReason" Text="Reason:"></asp:Localize></td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="txtReason" runat="server" CssClass="TextBox200" Rows="4" TextMode="MultiLine"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="valReason" runat="server" ErrorMessage="*" ControlToValidate="txtReason" ValidationGroup="ResetUserPassword"></asp:RequiredFieldValidator>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<div class="FormFooterClean">
|
<table>
|
||||||
<asp:Button id="btnResetPassoword" runat="server" Text="Send Password Reset Email" CssClass="Button1" meta:resourcekey="btnResetPassoword" ValidationGroup="ResetUserPassword" OnClick="btnResetPassoword_Click"></asp:Button>
|
<tr>
|
||||||
</div>
|
<td class="FormLabel150">
|
||||||
</div>
|
<asp:Localize ID="locSendTo" runat="server" meta:resourcekey="locSendTo" Text="Send to:"></asp:Localize></td>
|
||||||
</div>
|
<td class="FormRBtnL">
|
||||||
</div>
|
<asp:RadioButton ID="rbtnEmail" runat="server" meta:resourcekey="rbtnEmail" Text="Email" GroupName="SendToGroup" AutoPostBack="true" Checked="true" OnCheckedChanged="SendToGroupCheckedChanged" />
|
||||||
</div>
|
<asp:RadioButton ID="rbtnMobile" runat="server" meta:resourcekey="rbtnMobile" Text="Mobile" GroupName="SendToGroup" AutoPostBack="true" OnCheckedChanged="SendToGroupCheckedChanged" />
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="EmailRow" runat="server">
|
||||||
|
<td class="FormLabel150" valign="top">
|
||||||
|
<asp:Localize ID="locEmailAddress" runat="server" meta:resourcekey="locEmailAddress"></asp:Localize></td>
|
||||||
|
<td>
|
||||||
|
<asp:TextBox runat="server" ID="txtEmailAddress" CssClass="TextBox200" />
|
||||||
|
<asp:RequiredFieldValidator ID="valEmailAddress" runat="server" ErrorMessage="*" ControlToValidate="txtEmailAddress" ValidationGroup="ResetUserPassword"></asp:RequiredFieldValidator>
|
||||||
|
<asp:RegularExpressionValidator ID="regexEmailValid" runat="server" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="ResetUserPassword" ControlToValidate="txtEmailAddress" ErrorMessage="Invalid Email Format"></asp:RegularExpressionValidator>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="MobileRow" runat="server" visible="False">
|
||||||
|
<td class="FormLabel150" valign="top">
|
||||||
|
<asp:Localize ID="locMobile" runat="server" meta:resourcekey="locMobile"></asp:Localize></td>
|
||||||
|
<td>
|
||||||
|
<asp:TextBox runat="server" ID="txtMobile" CssClass="TextBox200" />
|
||||||
|
<asp:RequiredFieldValidator ID="valMobile" runat="server" ErrorMessage="*" ControlToValidate="txtMobile" ValidationGroup="ResetUserPassword"></asp:RequiredFieldValidator>
|
||||||
|
<asp:RegularExpressionValidator ID="regexMobileValid" runat="server" ValidationExpression="^\+?\d+$" ValidationGroup="ResetUserPassword" ControlToValidate="txtMobile" ErrorMessage="Invalid Mobile Format"></asp:RegularExpressionValidator>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="FormLabel150">
|
||||||
|
<asp:Localize ID="locReason" runat="server" meta:resourcekey="locReason" Text="Reason:"></asp:Localize></td>
|
||||||
|
<td>
|
||||||
|
<asp:TextBox ID="txtReason" runat="server" CssClass="TextBox200" Rows="4" TextMode="MultiLine"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="valReason" runat="server" ErrorMessage="*" ControlToValidate="txtReason" ValidationGroup="ResetUserPassword"></asp:RequiredFieldValidator>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
<div class="FormFooterClean">
|
||||||
|
<asp:Button ID="btnResetPassoword" runat="server" Text="Send Password Reset Email" CssClass="Button1" meta:resourcekey="btnResetPassoword" ValidationGroup="ResetUserPassword" OnClick="btnResetPassoword_Click"></asp:Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -26,6 +26,8 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
litDisplayName.Text = PortalAntiXSS.Encode(user.DisplayName);
|
litDisplayName.Text = PortalAntiXSS.Encode(user.DisplayName);
|
||||||
|
|
||||||
txtEmailAddress.Text = user.PrimaryEmailAddress;
|
txtEmailAddress.Text = user.PrimaryEmailAddress;
|
||||||
|
|
||||||
|
txtMobile.Text = user.MobilePhone;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void btnResetPassoword_Click(object sender, EventArgs e)
|
protected void btnResetPassoword_Click(object sender, EventArgs e)
|
||||||
|
@ -35,11 +37,31 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ES.Services.Organizations.SendResetUserPasswordEmail(PanelRequest.ItemID,PanelRequest.AccountID, txtReason.Text, txtEmailAddress.Text);
|
if (rbtnEmail.Checked)
|
||||||
|
{
|
||||||
|
ES.Services.Organizations.SendResetUserPasswordEmail(PanelRequest.ItemID,PanelRequest.AccountID, txtReason.Text, txtEmailAddress.Text, true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var result = ES.Services.Organizations.SendResetUserPasswordLinkSms(PanelRequest.ItemID, PanelRequest.AccountID, txtReason.Text, txtMobile.Text);
|
||||||
|
|
||||||
|
if (!result.IsSuccess)
|
||||||
|
{
|
||||||
|
ShowErrorMessage("SEND_USER_PASSWORD_RESET_SMS");
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Response.Redirect(PortalUtils.EditUrl("ItemID", PanelRequest.ItemID.ToString(),
|
Response.Redirect(PortalUtils.EditUrl("ItemID", PanelRequest.ItemID.ToString(),
|
||||||
(PanelRequest.Context == "Mailbox") ? "mailboxes" : "users",
|
(PanelRequest.Context == "Mailbox") ? "mailboxes" : "users",
|
||||||
"SpaceID=" + PanelSecurity.PackageId));
|
"SpaceID=" + PanelSecurity.PackageId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void SendToGroupCheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
EmailRow.Visible = rbtnEmail.Checked;
|
||||||
|
MobileRow.Visible = !rbtnEmail.Checked;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -39,6 +39,51 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.Literal litDisplayName;
|
protected global::System.Web.UI.WebControls.Literal litDisplayName;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PasswrodResetUpdatePanel control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.UpdatePanel PasswrodResetUpdatePanel;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// locSendTo control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Localize locSendTo;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// rbtnEmail control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.RadioButton rbtnEmail;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// rbtnMobile control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.RadioButton rbtnMobile;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// EmailRow control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlTableRow EmailRow;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// locEmailAddress control.
|
/// locEmailAddress control.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -75,6 +120,51 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.RegularExpressionValidator regexEmailValid;
|
protected global::System.Web.UI.WebControls.RegularExpressionValidator regexEmailValid;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// MobileRow control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlTableRow MobileRow;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// locMobile control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Localize locMobile;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtMobile control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.TextBox txtMobile;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// valMobile control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.RequiredFieldValidator valMobile;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// regexMobileValid control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.RegularExpressionValidator regexMobileValid;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// locReason control.
|
/// locReason control.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -70,7 +70,7 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
||||||
if (!hideItems) tabsList.Add(CreateTab("mailbox_mailflow", "Tab.Mailflow"));
|
if (!hideItems) tabsList.Add(CreateTab("mailbox_mailflow", "Tab.Mailflow"));
|
||||||
if (!hideItems) tabsList.Add(CreateTab("mailbox_permissions", "Tab.Permissions"));
|
if (!hideItems) tabsList.Add(CreateTab("mailbox_permissions", "Tab.Permissions"));
|
||||||
|
|
||||||
string instructions = ES.Services.ExchangeServer.GetMailboxSetupInstructions(PanelRequest.ItemID, PanelRequest.AccountID, false, false, false);
|
string instructions = ES.Services.ExchangeServer.GetMailboxSetupInstructions(PanelRequest.ItemID, PanelRequest.AccountID, false, false, false, " ");
|
||||||
if (!string.IsNullOrEmpty(instructions))
|
if (!string.IsNullOrEmpty(instructions))
|
||||||
tabsList.Add(CreateTab("mailbox_setup", "Tab.Setup"));
|
tabsList.Add(CreateTab("mailbox_setup", "Tab.Setup"));
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue