wsp-10299 Web Publishing not created in IIS 8.5 + related bugs. Update Sql.
This commit is contained in:
parent
45425c12d2
commit
d4d62f4ebf
5 changed files with 156 additions and 23 deletions
|
@ -35236,12 +35236,15 @@ EXEC sp_xml_preparedocument @idoc OUTPUT, @XmlProperties
|
|||
DELETE FROM ServiceItemProperties
|
||||
WHERE ItemID = @ItemID
|
||||
|
||||
INSERT INTO ServiceItemProperties
|
||||
(
|
||||
ItemID,
|
||||
PropertyName,
|
||||
PropertyValue
|
||||
)
|
||||
-- Add the xml data into a temp table for the capability and robust
|
||||
IF OBJECT_ID('tempdb..#TempTable') IS NOT NULL DROP TABLE #TempTable
|
||||
|
||||
CREATE TABLE #TempTable(
|
||||
ItemID int,
|
||||
PropertyName nvarchar(50),
|
||||
PropertyValue nvarchar(3000))
|
||||
|
||||
INSERT INTO #TempTable (ItemID, PropertyName, PropertyValue)
|
||||
SELECT
|
||||
@ItemID,
|
||||
PropertyName,
|
||||
|
@ -35252,6 +35255,21 @@ FROM OPENXML(@idoc, '/properties/property',1) WITH
|
|||
PropertyValue nvarchar(3000) '@value'
|
||||
) as PV
|
||||
|
||||
-- Move data from temp table to real table
|
||||
INSERT INTO ServiceItemProperties
|
||||
(
|
||||
ItemID,
|
||||
PropertyName,
|
||||
PropertyValue
|
||||
)
|
||||
SELECT
|
||||
ItemID,
|
||||
PropertyName,
|
||||
PropertyValue
|
||||
FROM #TempTable
|
||||
|
||||
DROP TABLE #TempTable
|
||||
|
||||
-- remove document
|
||||
exec sp_xml_removedocument @idoc
|
||||
|
||||
|
|
|
@ -8306,4 +8306,82 @@ IF NOT EXISTS (SELECT * FROM [dbo].[ScheduleTasks] WHERE [TaskID] = 'SCHEDULE_TA
|
|||
BEGIN
|
||||
INSERT INTO [dbo].[ScheduleTasks] ([TaskID], [TaskType], [RoleID]) VALUES (N'SCHEDULE_TASK_DELETE_EXCHANGE_ACCOUNTS', N'WebsitePanel.EnterpriseServer.DeleteExchangeAccountsTask, WebsitePanel.EnterpriseServer.Code', 3)
|
||||
END
|
||||
GO
|
||||
GO
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ALTER PROCEDURE [dbo].[UpdateServiceItem]
|
||||
(
|
||||
@ActorID int,
|
||||
@ItemID int,
|
||||
@ItemName nvarchar(500),
|
||||
@XmlProperties ntext
|
||||
)
|
||||
AS
|
||||
BEGIN TRAN
|
||||
|
||||
-- check rights
|
||||
DECLARE @PackageID int
|
||||
SELECT PackageID = @PackageID FROM ServiceItems
|
||||
WHERE ItemID = @ItemID
|
||||
|
||||
IF dbo.CheckActorPackageRights(@ActorID, @PackageID) = 0
|
||||
RAISERROR('You are not allowed to access this package', 16, 1)
|
||||
|
||||
-- update item
|
||||
UPDATE ServiceItems SET ItemName = @ItemName
|
||||
WHERE ItemID=@ItemID
|
||||
|
||||
DECLARE @idoc int
|
||||
--Create an internal representation of the XML document.
|
||||
EXEC sp_xml_preparedocument @idoc OUTPUT, @XmlProperties
|
||||
|
||||
-- Execute a SELECT statement that uses the OPENXML rowset provider.
|
||||
DELETE FROM ServiceItemProperties
|
||||
WHERE ItemID = @ItemID
|
||||
|
||||
-- Add the xml data into a temp table for the capability and robust
|
||||
IF OBJECT_ID('tempdb..#TempTable') IS NOT NULL DROP TABLE #TempTable
|
||||
|
||||
CREATE TABLE #TempTable(
|
||||
ItemID int,
|
||||
PropertyName nvarchar(50),
|
||||
PropertyValue nvarchar(3000))
|
||||
|
||||
INSERT INTO #TempTable (ItemID, PropertyName, PropertyValue)
|
||||
SELECT
|
||||
@ItemID,
|
||||
PropertyName,
|
||||
PropertyValue
|
||||
FROM OPENXML(@idoc, '/properties/property',1) WITH
|
||||
(
|
||||
PropertyName nvarchar(50) '@name',
|
||||
PropertyValue nvarchar(3000) '@value'
|
||||
) as PV
|
||||
|
||||
-- Move data from temp table to real table
|
||||
INSERT INTO ServiceItemProperties
|
||||
(
|
||||
ItemID,
|
||||
PropertyName,
|
||||
PropertyValue
|
||||
)
|
||||
SELECT
|
||||
ItemID,
|
||||
PropertyName,
|
||||
PropertyValue
|
||||
FROM #TempTable
|
||||
|
||||
DROP TABLE #TempTable
|
||||
|
||||
-- remove document
|
||||
exec sp_xml_removedocument @idoc
|
||||
|
||||
COMMIT TRAN
|
||||
|
||||
RETURN
|
||||
GO
|
||||
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using WebsitePanel.Providers.Web.Iis.Common;
|
||||
using Microsoft.Web.Administration;
|
||||
|
@ -45,8 +46,12 @@ namespace WebsitePanel.Providers.Web.Delegation
|
|||
using (var srvman = new ServerManager())
|
||||
{
|
||||
var adminConfig = srvman.GetAdministrationConfiguration();
|
||||
//
|
||||
var delegationSection = adminConfig.GetSection("system.webServer/management/delegation");
|
||||
|
||||
// return if system.webServer/management/delegation section is not exist in config file
|
||||
if (!HasDelegationSection(adminConfig))
|
||||
return;
|
||||
|
||||
var delegationSection = adminConfig.GetSection("system.webServer/management/delegation");
|
||||
//
|
||||
var rulesCollection = delegationSection.GetCollection();
|
||||
// Update rule if exists
|
||||
|
@ -103,8 +108,12 @@ namespace WebsitePanel.Providers.Web.Delegation
|
|||
using (var srvman = new ServerManager())
|
||||
{
|
||||
var adminConfig = srvman.GetAdministrationConfiguration();
|
||||
//
|
||||
var delegationSection = adminConfig.GetSection("system.webServer/management/delegation");
|
||||
|
||||
// return if system.webServer/management/delegation section is not exist in config file
|
||||
if (!HasDelegationSection(adminConfig))
|
||||
return;
|
||||
|
||||
var delegationSection = adminConfig.GetSection("system.webServer/management/delegation");
|
||||
//
|
||||
var rulesCollection = delegationSection.GetCollection();
|
||||
// Update rule if exists
|
||||
|
@ -142,8 +151,12 @@ namespace WebsitePanel.Providers.Web.Delegation
|
|||
using (var srvman = new ServerManager())
|
||||
{
|
||||
var adminConfig = srvman.GetAdministrationConfiguration();
|
||||
//
|
||||
var delegationSection = adminConfig.GetSection("system.webServer/management/delegation");
|
||||
|
||||
// return if system.webServer/management/delegation section is not exist in config file
|
||||
if (!HasDelegationSection(adminConfig))
|
||||
return false;
|
||||
|
||||
var delegationSection = adminConfig.GetSection("system.webServer/management/delegation");
|
||||
//
|
||||
var rulesCollection = delegationSection.GetCollection();
|
||||
// Update rule if exists
|
||||
|
@ -171,8 +184,12 @@ namespace WebsitePanel.Providers.Web.Delegation
|
|||
using (var srvman = GetServerManager())
|
||||
{
|
||||
var adminConfig = srvman.GetAdministrationConfiguration();
|
||||
//
|
||||
var delegationSection = adminConfig.GetSection("system.webServer/management/delegation");
|
||||
|
||||
// return if system.webServer/management/delegation section is not exist in config file
|
||||
if (!HasDelegationSection(adminConfig))
|
||||
return;
|
||||
|
||||
var delegationSection = adminConfig.GetSection("system.webServer/management/delegation");
|
||||
//
|
||||
var rulesCollection = delegationSection.GetCollection();
|
||||
// Update rule if exists
|
||||
|
@ -245,8 +262,12 @@ namespace WebsitePanel.Providers.Web.Delegation
|
|||
using (var srvman = GetServerManager())
|
||||
{
|
||||
var adminConfig = srvman.GetAdministrationConfiguration();
|
||||
//
|
||||
var delegationSection = adminConfig.GetSection("system.webServer/management/delegation");
|
||||
|
||||
// return if system.webServer/management/delegation section is not exist in config file
|
||||
if (!HasDelegationSection(adminConfig))
|
||||
return;
|
||||
|
||||
var delegationSection = adminConfig.GetSection("system.webServer/management/delegation");
|
||||
//
|
||||
var rulesCollection = delegationSection.GetCollection();
|
||||
// Remove rule if exists
|
||||
|
@ -264,5 +285,21 @@ namespace WebsitePanel.Providers.Web.Delegation
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool HasDelegationSection(Configuration adminConfig)
|
||||
{
|
||||
// try to get delegation section in config file (C:\Windows\system32\inetsrv\config\administration.config)
|
||||
try
|
||||
{
|
||||
adminConfig.GetSection("system.webServer/management/delegation");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
/* skip */
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2072,7 +2072,7 @@ namespace WebsitePanel.Providers.Web
|
|||
public new void GrantWebDeployPublishingAccess(string siteName, string accountName, string accountPassword)
|
||||
{
|
||||
// Web Publishing Access feature requires FullControl permissions on the web site's wwwroot folder
|
||||
//GrantWebManagementAccessInternally(siteName, accountName, accountPassword, NTFSPermission.FullControl);
|
||||
GrantWebManagementAccessInternally(siteName, accountName, accountPassword, NTFSPermission.FullControl);
|
||||
//
|
||||
EnforceDelegationRulesRestrictions(siteName, accountName);
|
||||
}
|
||||
|
@ -2086,7 +2086,7 @@ namespace WebsitePanel.Providers.Web
|
|||
public new void RevokeWebDeployPublishingAccess(string siteName, string accountName)
|
||||
{
|
||||
// Web Publishing Access feature requires FullControl permissions on the web site's wwwroot folder
|
||||
//RevokeWebManagementAccess(siteName, accountName);
|
||||
RevokeWebManagementAccess(siteName, accountName);
|
||||
//
|
||||
RemoveDelegationRulesRestrictions(siteName, accountName);
|
||||
}
|
||||
|
@ -4336,13 +4336,13 @@ namespace WebsitePanel.Providers.Web
|
|||
|
||||
protected string GetFullQualifiedAccountName(string accountName)
|
||||
{
|
||||
if (accountName.IndexOf("\\") != -1)
|
||||
return accountName; // already has domain information
|
||||
|
||||
//
|
||||
if (!ServerSettings.ADEnabled)
|
||||
return String.Format(@"{0}\{1}", Environment.MachineName, accountName);
|
||||
|
||||
if (accountName.IndexOf("\\") != -1)
|
||||
return accountName; // already has domain information
|
||||
|
||||
// DO IT FOR ACTIVE DIRECTORY MODE ONLY
|
||||
string domainName = null;
|
||||
try
|
||||
|
|
|
@ -546,7 +546,7 @@ namespace WebsitePanel.Portal
|
|||
WDeployPublishingConfirmPasswordTextBox,
|
||||
WDeployPublishingAccountRequiredFieldValidator);
|
||||
|
||||
WDeployPublishingAccountTextBox.Text = AutoSuggestWmSvcAccontName(item, "_dploy");
|
||||
WDeployPublishingAccountTextBox.Text = AutoSuggestWmSvcAccontName(item, "_deploy");
|
||||
//
|
||||
WDeployPublishingAccountRequiredFieldValidator.Enabled = true;
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue