diff --git a/WebsitePanel/Database/install_db.sql b/WebsitePanel/Database/install_db.sql index e5b39fa7..da8fcc11 100644 --- a/WebsitePanel/Database/install_db.sql +++ b/WebsitePanel/Database/install_db.sql @@ -22006,6 +22006,8 @@ INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [Property GO INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'WebPolicy', N'DefaultDocuments', N'Default.htm,Default.asp,index.htm,Default.aspx') GO +INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'WebPolicy', N'EnableParkingPageTokens', N'False') +GO INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'WebPolicy', N'EnableAnonymousAccess', N'True') GO INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'WebPolicy', N'EnableBasicAuthentication', N'False') diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql index a949fd61..8e434f71 100644 --- a/WebsitePanel/Database/update_db.sql +++ b/WebsitePanel/Database/update_db.sql @@ -9,5 +9,6 @@ SET @build_date = '${release.date}T00:00:00' -- ISO 8601 Format (YYYY-MM-DDTHH:M IF NOT EXISTS (SELECT * FROM [dbo].[Versions] WHERE [DatabaseVersion] = @build_version) BEGIN INSERT [dbo].[Versions] ([DatabaseVersion], [BuildDate]) VALUES (@build_version, @build_date) + INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'WebPolicy', N'EnableParkingPageTokens', N'False') END -GO +GO \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebServers/WebServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebServers/WebServerController.cs index 28089a6e..1d7504cd 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebServers/WebServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebServers/WebServerController.cs @@ -404,6 +404,13 @@ namespace WebsitePanel.EnterpriseServer if (!String.IsNullOrEmpty(pageName) && pageContent != null) { + + if (Utils.ParseBool(webPolicy["EnableParkingPageTokens"], false)) + { + pageContent = pageContent.Replace("[DOMAIN_NAME]", site.Name); + pageContent = pageContent.Replace("[SITE_IP]", site.SiteIPAddress); + + } string path = Path.Combine( FilesController.GetVirtualPackagePath(packageId, site.ContentPath), pageName); diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/SettingsWebPolicy.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/SettingsWebPolicy.ascx.resx index e2a8d72f..29c96bcf 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/SettingsWebPolicy.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/SettingsWebPolicy.ascx.resx @@ -112,10 +112,10 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Add Parking Page @@ -147,6 +147,9 @@ Dedicated Application Pool + + Allow tokens + Enable Parent Paths diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsWebPolicy.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsWebPolicy.ascx index 40ac9a70..da64e4be 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsWebPolicy.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsWebPolicy.ascx @@ -21,6 +21,10 @@ + + + + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsWebPolicy.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsWebPolicy.ascx.cs index b2f35566..9704c31a 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsWebPolicy.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsWebPolicy.ascx.cs @@ -50,6 +50,7 @@ namespace WebsitePanel.Portal txtPageName.Text = settings["ParkingPageName"]; txtPageContent.Text = settings["ParkingPageContent"]; PublishingProfileTextBox.Text = settings["PublishingProfile"]; + chkEnableParkingPageTokens.Checked = Utils.ParseBool(settings["EnableParkingPageTokens"], false); // default documents if (!String.IsNullOrEmpty(settings["DefaultDocuments"])) @@ -102,6 +103,7 @@ namespace WebsitePanel.Portal settings["ParkingPageName"] = txtPageName.Text; settings["ParkingPageContent"] = txtPageContent.Text; settings["PublishingProfile"] = PublishingProfileTextBox.Text; + settings["EnableParkingPageTokens"] = chkEnableParkingPageTokens.Checked.ToString(); // default documents settings["DefaultDocuments"] = String.Join(",", Utils.ParseDelimitedString(txtDefaultDocs.Text, '\n', '\r', ';', ',')); ; diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsWebPolicy.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsWebPolicy.ascx.designer.cs index 8406c411..117307fc 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsWebPolicy.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsWebPolicy.ascx.designer.cs @@ -75,6 +75,15 @@ namespace WebsitePanel.Portal { /// protected global::System.Web.UI.WebControls.TextBox txtPageContent; + /// + /// chkEnableParkingPageTokens control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox chkEnableParkingPageTokens; + /// /// WebPublishingProfile control. ///