Adding role assignment to sharepoint list. The system cannot find the path specified. (Exception from HRESULT: 0x80070003)

I recently received this  error “The system cannot find the path specified. (Exception from HRESULT: 0x80070003)” while attempting to add a role assignment to a SharePoint tasks list. I tried breaking role inheiritance and reseting role inheiritance on the list but nothing worked.

It turned out that the list was not ‘provisioned’ and it was still in memory.  There are certain changes you can make to a list that is still in memory and there are others which require the list to exist in the site before they can be made.  I was able to add the role assignments to the SharePoint list by placing my code in a method that was called after site provisioning.

This also explains why I could add the role definition to the list when I tested my code using a console application.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: