So I create a new SPGridview web part and ready to deploy to the web application, but what I get is an error Woo!!
Unable to add selected web part(s):
Site News: The web part you attempted to add no longer exists in the Closed Web Parts Gallery . Refresh your browser to update the web part page and the Gallery.

DO NOT trust error messages coming from SharePoint ! Not a surprise as you must have seen multiple times messages like "Error" while working on sharepoint.
The resolution was to install ASP.NET Ajax on the machine... wooo! How is it that sharepoint could'nt explain it clearly?
Anyways I installed asp.net ajax and went ahead and readded the web parts to the zone, and I see another error
Request for the permission of type Microsoft.SharePoint.Security.SharePointPermission
Now this is telling you to change the access level in the web.config file of the web application. So open the config file from root\wss\virtualdirectories\application port\
and change the following line:
<trust level="WSS_Minimal" originUrl="" />
to
<trust level="WSS_Medium" originUrl="" />
and bang your'e done !!
Hurray I was able to load the web parts and display as expected. Kudos to the SharePoint team for great explanatory error messages
No comments:
Post a Comment