I deployed a SharePoint 2010 on a customer’s system. At first, everything worked OK when users with elevated privileges were testing the part. However, soon after read-only users started experiencing the above error. If a user’s privilege was escalated to “Designer”, it would start working again.
The solution to the problem is to find the SharePointProjectItem.spdata file associated with the web-part and change the IsSafeAgainstScript to true in the <SafeControl..> element.
For Example:
<SafeControls>
<SafeControl Name="SafeControlEntry1"
Assembly="$SharePoint.Project.AssemblyFullName$"
Namespace="Medhat.Ca.MyWebpart"
TypeName="*"
IsSafe="true"
IsSafeAgainstScript="true" />
</SafeControls>
The explanation for this error is that users with privileges below "Design” are not allowed to add web-parts into web pages.
No comments:
Post a Comment