Blog Home  Home Feed your aggregator (RSS 2.0)  
Kiruthik .com - Sharepoint - MOSS 2007
eCCentric Vagabond
 

A Web Part or Web Form Control on this Page cannot be displayed or imported. You don't have Add and Customize Pages permissions required to perform this action



A Web Part or Web Form Control on this Page cannot be displayed or imported. You don't have Add and Customize Pages permissions required to perform this action

This error occurs in Sharepoint 2010 or when you upgrade to Sharepoint 2010 from MOSS 2007. It clearly says, adding a webpart/webcontrol to this page is not possible, since the user who adds doesnt have Add / Customise Page permission.

Solution :

(a) Fix for that User alone
Add the below permission to the user / group.



(b) Fix for the webpart(s) for any user
Check which webpart created this error. The commonly/mostly used Content Editor Webpart is the culprit for us. So added the below entry in the  web.config. If its other webpart, add Assembly, Namespace and TypeName accordingly.






Before going for the fix, lets see why this was working in MOSS 2007 and not in Sharepoint 2010. or  what is broken when you upgrade to Sharepoint 2010 ??

Well, nothing is broken. Its just Sharepoint 2010 which was coded to have more granular security.
In the previous version(s) - MOSS 2007 (im not sure about 2003, but it also works the same i hope). My team mate was so eager to know the reason before fixing.


So, I checked the web.config of a MOSS 2007 web application and it had the above kind of entry, but for all webparts !!

ie., Type/TypeName = "*"  (any class in that assembly is registered as safe & AllowRemoteDesginer was true. )



Also, I tried using reflector and checked the two DLLS (MOSS 2007 - Microsoft.Sharepoint.dll  &  Sharepoint 2010 - Microsoft.Sharepoint.dll )

Where I found few methods like below defined in 2007 DLL is not  present in 2010 DLL.





Simply to put up, for granular control instead of having TypeName= "*" - we have each and every webpart defined in the safecontrol !


Tuesday, October 05, 2010 9:08:08 PM UTC  #    Comments [1]   Sharepoint - MOSS 2007 | Sharepoint 2010  | 

Inheritable String Property

 

InheritableStringProperty  is a class available in Sharepoint 2007 Publishing Web. It extends from InheritableProperty<T> - but I think we need InheritableProperty in C#

using (SPSite site1 = new SPSite("http://home.kir:2306/"))
{
   PublishingWeb currentPublishingWeb = PublishingWeb.GetPublishingWeb(site.RootWeb);
   if (currentPublishingWeb != null)
   {
      InheritableStringProperty customMasterUrlProperty = currentPublishingWeb.CustomMasterUrl;
      customMasterUrlProperty.SetValue("/_catalogs/masterpage/new.master", true);   

   }
}

 

 

Monday, August 10, 2009 6:34:47 PM UTC  #    Comments [0]   .Net | C# | Sharepoint | Sharepoint - MOSS 2007 | Sharepoint 2010  | 
Sharepoint SP2 on   Wednesday, April 22, 2009

WSS 3.0 SP2 and MOSS 2007 SP2

WSS 3.0 SP2 & MOSS 2007 SP2 are expected in this month end….. Along with the update for all MS Office 2007 products...

Microsoft Office team has streamlined the release of Service Packs for all the MS Office products together, but what is the use in that ? Atleast server products and clients products can go differently ?

[Source]

Wednesday, April 22, 2009 7:06:47 PM UTC  #    Comments [0]   Microsoft | Sharepoint - MOSS 2007  | 
Sharepoint Designer is Free now on   Wednesday, April 08, 2009

Sharepoint Designer is Free now

Microsoft SharePoint Designer 2007 is now a FREE download. Just register and download a copy… Sharepoint Designer is the MS Office 2007 – version of Frontpage. No more frontpage, its only SPD.

Forget not to check the Related Resources section in the download page…

Sharepoint Designer Related Resources

  1. Video of SharePoint Designer 2007 FAQ (6.2MB)
  2. Video of SharePoint Designer 2007 FAQ (82.9MB)
  3. Video of SharePoint Designer 2007 FAQ (16.8MB)

 

Service pack for Sharepoint Designer is also there… Download it…

Wednesday, April 08, 2009 6:04:23 PM UTC  #    Comments [0]   Microsoft | Sharepoint - MOSS 2007 | software  | 
Application Pages Vs Site Pages on   Thursday, March 19, 2009

Application Pages Vs Site Pages

Remember the difference between them in SharePoint (MOSS 2007)

 

Yesterday, somebody asked me the difference between the application page and site page in Sharepoint. Having developed five custom site and application pages in Sharepoint, I couldn't explain what exactly it is. I really got confused over time, as usual my brain was blank.

In a second after opening a SharePoint VS solution file, I got it. Just remember as the name indicates, Application pages can be used across SharePoint Web Applications and the Site pages are used across the Site(s). When you remember this, then you wont get confused. If its across applications then its the only _layout folder which is helping us. Wherein the site pages are the ones what we want to be specific for a site or to its contents and OOB example are AllItems.aspx, default.aspx etc.

Yes, I agree that working in a dozen of pages will also help you to remember, but in the beginning, even after a year,  lot of things in SharePoint is confusing and time consuming. Main reason behind this is our lack of basic understanding and poor memory. I strongly recommend every SharePoint developer to read the Inside Microsoft Windows SharePoint Services 3.0 and a SharePoint administrator to read Microsoft SharePoint Services Administrator's Pocket Consultant.

Thursday, March 19, 2009 9:13:47 PM UTC  #    Comments [2]   .Net | Sharepoint - MOSS 2007  | 
CSS Reference for SharePoint 2007 on   Monday, February 09, 2009

CSS Reference for SharePoint 2007

 

Most of the time we endup changing the CSS styles of an existing Sharepoint Page objects like Top Horizontal Navigation, Search, Site Actions etc.
The CSS for the same can be found IE Developer Toolbar, but we miss the list of those or atleast the frequently used ones. Heather Solomon haves it here.

Monday, February 09, 2009 3:27:13 PM UTC  #    Comments [0]   .Net | Sharepoint - MOSS 2007  | 
Sharepoint Support Expired on   Sunday, January 25, 2009

Sharepoint Support Expired

WSS 3.0 and MOSS 2007 without SP1 support expired on 13th Jan 2009. I thought its getting expired on 31th Jan.

[Source

The service packs for both WSS 3.0 & MOSS 2007 are available and now the cummulative upate is here.

Sunday, January 25, 2009 9:45:37 AM UTC  #    Comments [0]   .Net | Sharepoint - MOSS 2007  | 

Windows Live Writer Supports Sharepoint Blog

Its great to see, Live writer supports posting to Sharepoint Blog.

Windows Live Writer Supports Sharepoint

Long since I used Live writer and even blogging...

Monday, July 14, 2008 3:29:50 AM UTC  #    Comments [1]   Personal | Sharepoint - MOSS 2007  | 
An unexpected error has occurred - Sharepoint on   Wednesday, April 02, 2008

Get Rid of "An unexpected error has occurred" in Sharepoint / MOSS 2007

Everyone one of us, worked in Microsoft Office Sharepoint Server 2007, have seen this Error - An unexpected error has occured. I never expected that this errors' log can be made available to the developer, just like the one is ASP.Net. Found an article unexpectedly for this error ;-)

Anyway, the work around is very simple.

Wednesday, April 02, 2008 6:31:03 PM UTC  #    Comments [0]   Sharepoint - MOSS 2007  | 
Copyright © 2012 Kiruthik Nandhakumar. All rights reserved.