Monday 3 April 2017

Cannot Complete This Action in SharePoint.

Cannot Complete This Action 


The above message was appeared when I selected "Manage Permission" for a Folder or File in a Library which has Unique permission.

Received Access Denied System account error for System Account. It had correlation ID and yes it is On-Prem environment.

Immediately stepped into analysis part of the Correlation ID and got the below message in ULS.

(ULS Message ->System.Runtime.InteropServices.COMException: Cannot complete this action.  Please try again.    at Microsoft.SharePoint.Library.SPRequestInternalClass.GetSecurityInfo(String bstrUrl, String bstrObjUrl, Guid& pguidScopeId, UInt64& pEffectivePermMask, Boolean& pbHasUniquePerm, String& pbstrPermUrl)     at Microsoft.SharePoint.Library.SPRequest.GetSecurityInfo(String bstrUrl, String bstrObjUrl, Guid& pguidScopeId, UInt64& pEffectivePermMask, Boolean& pbHasUniquePerm, String& pbstrPermUrl)

Didn't find any useful message in MS Forum as well. ACL becomes blank and found some multiple useful links and finally made my solution for the issue.

I want to generate GID for the folder and the files located inside the folder. We can easily generate the GID for content database but how for Document and Files.

Need the below value and have to execute some scripts in SharePoint PS and MSSQL as well.

1. Document ID (the document where are you getting cannot complete action error message).
2. Site collection ID.
3. Site ID
4. Old Scope ID.

We can execute the below command in SharePoint PS for getting Site Collection ID and Site ID. In My scenario root site in sitecollection so the sitecollection and site url is remain same but GID is different.

The highlights value need to be changed as per your scenario. I got the 29 item id from the URL which display cannot complete this action error message.

My URL looks like http://SCS-workspace.com/WCMP/Project_Problem/_layouts/User.aspx?obj={7E86BE22-6841-46A2-9CA0-F82B9C75B73D},29,LISTITEM&List={7E86BE22-6841-46A2-9CA0-F82B9C75B73D}
--------------------------------------------------------------------------------------------------------------------------
Add-PSSnapin Microsoft.Sharepoint.Powershell
$site = Get-SPSite http://webapplication_address/wildcardmanagedpath/sitecollectionname
$site.ID
$web = Get-SPWeb http://webapplication_address/wildcardmanagedpath/sitecollectionname
#if you have issue in subsite then you need to add the subsite url in the $Web command
$web.ID

$list = $web.Lists[“Your List or Lib Name”]
$item = $list.GetItemById(29)

$item.Url 
#The above command will provide you the URL of Item ID 29 copy that and past it in the next SQL Query.


$item.UniqueId
------------------------------------------------------------------------------------------------------------------------

The above PS cmdlets will provide three information to us

1. Site Collection ID
2. Site ID
3. Document ID

For the remaining one information Old Scope ID required for us to resolve the issue.

To find the Old Scope ID, we have execute the below command on the MSSQL DB Server.

To get the content database name for the site collection Go to Central Administration -> View all site collection option.
---------------------------------------------------------------------------------------------------------------------
USE [ Content Database Name]
GO

SELECT TOP 1 [ScopeId]
FROM [ Content Database Name].[dbo].[Perms]
WHERE ScopeUrl = ‘webapplication_address/wildcardmanagedpath/sitecollectionname/listname/foldername

GO
---------------------------------------------------------------------------------------------------------------------

Now we have all the information which stated above in the post. Almost we are in climax to resolve the issue. We are going to execute proc_SecResetItemPerm stored procedure.

---------------------------------------------------------------------------------------------------------------------

USE [ Content Database Name]
GO

DECLARE @return_value int,
@NewScopeId uniqueidentifier,
@RequestGuid uniqueidentifier

EXEC @return_value = [dbo].[proc_SecResetItemPerm]
@SiteId = ‘857f33d1-4618-4e41-82be-0d6f0c909054’,
@WebId = ‘ff426804-ea67-4ca6-8d17-ba8682a8dcc9’,
@OldScopeId = ‘64CF7957-E364-4649-9DFD-213F9C78D031’,
@Url = N’WCMP/Project_Problem/Blank Forms/Line 1/Archive for Trim and problem Checklist′,
@DocId = ‘9df7e23c-4809-40b7-8a9c-40ec3867eea6′,
@NewScopeId = @NewScopeId OUTPUT,
@RequestGuid = @RequestGuid OUTPUT

SELECT @NewScopeId as N’@NewScopeId’,
@RequestGuid as N’@RequestGuid’

SELECT ‘Return Value’ = @return_value

GO

---------------------------------------------------------------------------------------------------------------------

That's it, Issue resolved now the folder or file started inheriting the permissions from its parent and you won't receive cannot complete this action error message for the folder.

Thanks for reading the Post.

மிக்க நன்றி 
---------------------------------------------------------------------------------------------------------------------

வீழ்வது நாமாக இருப்பினும்!!!
வாழ்வது தமிழாக இருக்கட்டும் !!! 

Wednesday 22 March 2017

SP 2016 Config Wizard failed regarding Feature ---> The 'ListInternal' attribute is not allowed.

I had setup several SP 2016 server in my environment. Recenlty I am getting failed message while running SharePoint Configuration wizard with the below error.

Feature definition with Id ca7bd552-10b1-4563-85b9-5ed1d39c962a failed validation, file 'fieldswss4.xml', line 68, character 9: The 'ListInternal' attribute is not allowed. ---> System.Xml.Schema.XmlSchemaValidationException: The 'ListInternal' attribute is not allowed.


To resolve this we have to add a line in wss.xsd file in Hive\template\XML.

Below Line needs to be added at 578 in XML file next to List attribute.

Search the following bold content in XML file name="List" type="xs:string" 

And then include the below line next to the List Attribute

<xs:attribute name="ListInternal" type="xs:string" />

Save the file and re-run the config wizard that's it. Cool.

Rescan Disk Option Greyed Out | New Disks Not visible on Disk management | Update-HostStorageCache

  Recently I have added several LUN from NetApp Storage to Hyper-V servers. But in the disk management I couldn't see those new LUN. Exi...