This project has moved. For the latest updates, please go here.

SP Persisted Object

Feb 13, 2014 at 4:33 PM
Hi,

Why does the LDAPCP feature fail to create the SPPersisted object at the farm level at some occasions ?
Coordinator
Feb 14, 2014 at 12:15 PM
Hello,
Well, it definitely shouldn't, the update of the persisted object is always made as the farm service account, which ensures to have the necessary permission to do it.
Then if you can reproduce this issue, I'd be very interested to have a look at the SharePoint logs to toubleshoot this error, this is the 1st time it is reported.
cheers,
Yvan
Feb 25, 2014 at 1:17 PM
Edited Feb 25, 2014 at 1:22 PM
Hello,

Won't be able to share the logs but will surely let you know the cause of this issue. Here's why I encountered this error -

I had installed LDAPCP v1.8 earlier on one of my farms. Then, we planned to move to v1.9. Now that the SPPersisted Object in both these versions possessed the same GUID, the SP Farm could not create the object the second time when I tried deploying the new version, guessing the farm must have registered that GUID somewhere in the backend and was unable to create a new object with the same GUID.

Another important point to note here is that you cannot resolve this issue even after forcibly reactivating the feature.

Interestingly, it is only when you make some changes in either the claim mapping or global configuration from the front end, that the farm is able to create the persisted object. Strange, isn't it?

Now I have a question for you, Were there any specific reasons behind preserving the GUID for this object across versions ? Would changing it help us prevent this issue ?


Regards,
Harsh Bhatia
Coordinator
Feb 26, 2014 at 1:21 PM
hello Harsh,
thanks a lot for your detailed feedback. Actually I never faced your issue despite my frequent mix of different versions.
I delete the persisted object on each event of the feature (activate/deactivate/uninstall/upgrade) so it looks like you updated the assembly without using the Update-SPSolution cmdlet, which explains why you experienced this issue.
Are you using the standard version, or did you inherit the LDAPCP class?
Anyway your idea makes sense, and I will consider to use a unique persisted object for each version, to avoid the issue you experienced.
cheers,
Yvan