Friday, August 5, 2011

Sharepoint 2010 Wiki Pages using Term Sets - giving 403 forbidden error..Intermittent

Came across an interesting problem today..
One of the customer reported an intermittent issue in their wiki pages of 403 forbidden error.

..Got the fix for my problem through an interesting blog.
Heres the blog url
http://blogs.technet.com/b/seanearp/archive/2010/07/28/sharepoint-2010-403-error-when-updating-metadata.aspx


What it says is ..Managed Metadata set makes use of a hidden list called "TaxonomyHiddenList",
(you can brose through http:///Lists/TaxonomyHiddenList/AllItems.aspx)


We need to make sure "All Authenticated Users" are added to this list with Read Permissions.

I need to do more research on same...

Hope this helps somebody





Tuesday, October 27, 2009

Sharepoint Nested Master Pages.

Here, am not going to explain you on how to achieve nesting of master pages in Sharepoint as there are some good articles which clearly explains this concept.

Follow these links

1. http://hermansberghem.blogspot.com/2009/01/why-use-nested-master-pages.html
( the top of of all)

2. http://ari.provoke.co.nz/archive/2007/04/10/using-nested-master-pages-in-sharepoint.aspx

I followed these links and successfully created master pages ( parent and child pages) and am using it in my site.
But before trying out the things understand why do we need to use nesting master pages instead of going with the page layouts... the first link explains you why u can go for nesting master page...

though the method followed seems to be a overhead ( since we need to override all the content place holders in child master pages and place all the hidden place holders in child pages which is also a duplicate..), unfortunately this seems to be the only way to achieve it..

So these questions came to my mind when i have implemented the things..

1. If nested master pages concept was so much useful why microsoft didnt think of using it any of the OUT OF THE BOX master pages that is provided by default.

2. Is there any difficulty that we will face in future if we follow this approach , as some one pointed that he is facing some problems in some publishing page layouts ( though i havnt faced any)
Some one who has more insight into it can pen on this.....
and i will update with what all information that i get now and then...
Anyways, hats off to the original author for his first efforts and may be Sharepoint 2010 has these things OOB..
Do ping me if you face any difficulty in achieving the nested master pages..

Cheers...

Friday, August 1, 2008

SPWebConfigModification Class - Editing Sharepoint Web.Config

I have seen some of the code where in if a "SafeControl" entry is need to be done in the web.config, through code, then we use
"XMLDocument" class to load the web.config and make changes . there is trouble in doing so as you need to manually get the path of the web.config and all.

But Sharepoint object model provides a class called "SPWebConfigModification" which can be used to play around with the web.config of the site.

Sample Code where in --Safe Control Entry is Made for the Webparts in the feature activation



public override void FeatureActivated(SPFeatureReceiverProperties properties)
{
SPSite site = (SPSite)properties.Feature.Parent;

if (site != null)
{
SPWebApplication webApp = site.WebApplication;

SPWebConfigModification ModDesc = new SPWebConfigModification();
ModDesc.Path = "configuration/SharePoint/SafeControls";
ModDesc.Name = "SafeControl[@Assembly='Description'][@Namespace='Description'][@TypeName='*'][@Safe='True'] [@AllowRemoteDesigner='True']";
ModDesc.Sequence = 0;
ModDesc.Type = SPWebConfigModification.SPWebConfigModificationType.EnsureChildNode;
ModDesc.Value = "";


webApp.WebConfigModifications.Add(ModDesc);

webApp.Farm.Services.GetValue().ApplyWebConfigModifications();
webApp.Update();

}

Friday, July 4, 2008

Visual Studio 2005 Templates for Sharepoint Development

This post intends to clear the "Templates" needs to be used for VS 2005 Sharepoint Development

For MOSS 2007

MOSS SDK includes the necessary Templates required for "Workflows" "BDC Defination Editor"

Download Link
http://www.microsoft.com/downloads/details.aspx?familyid=6D94E307-67D9-41AC-B2D6-0074D6286FA9&displaylang=en


Note : Since MOSS 2007 is built on top of WSS 3.o, all the templates and solution which works for WSS 3.0 , will work for MOSS as well.


For WSS 3.0

1. SharePoint Services 3.0 Tools: Visual Studio 2005 Extensions, Version 1.1
Brief Description
(Visual Studio 2005 extensions for Windows SharePoint Services 3.0, version 1.1)
Tools for developing custom SharePoint applications: Visual Studio project templates for Web Parts, site definitions, and list definitions; and a stand-alone utility program, the SharePoint Solution Generator. Please also download the User Guide and Samples listed in Related Resources.


Download Link
http://www.microsoft.com/downloads/details.aspx?FamilyID=3E1DCCCD-1CCA-433A-BB4D-97B96BF7AB63&displaylang=en


2. For Workflows

First u need to install
Visual Studio Extensions for Windows Workflow Foundation which can be downloaded from

http://www.microsoft.com/Downloads/details.aspx?FamilyID=a2151993-991d-4f58-a707-5883ff4c1dc2&displaylang=en#Overview

then to create a workflow targeted towords WSS, you can get templates in wss sdk. Download and install WSS Sdk.

WSS SDK Download Link

http://www.microsoft.com/downloads/details.aspx?familyid=05E0DD12-8394-402B-8936-A07FE8AFAFFD&displaylang=en


Custom Development of Sharepoint on VS 2008

VS 2008 by default comes with
all the necessary templates required for development.

Wednesday, June 11, 2008

Layout pages for WSS 3.0

Note : My Original blog post is located at
http://wsslayouts.blogspot.com/
am migrating all the blogs for the consiolidation.
Thanks.


The Windows Sharepoint Services 3.o comes with "8" default "Web part page layouts".
If your pages does not fit into these layouts, then you have to go for "Custom page layouts".

By default, WSS wont allow you to have any more page layouts other than these out of the box page layouts. There is small tweaks need to be done, in order to accomplish your page layout to get listed in "spcf.aspx" or you can have your own "custspcf.aspx" page which lists your page layouts.

Here is how i did it.

There are three simple steps to be followed. Those are

1. Creating additional layout pages.
2. creating a custom spcf page (which lists out your page layouts.. I will tell you why..you have to go for the custom one here )
3. Adding a link in the create.aspx page ( which directs you to custspcf.aspx page)


1. Creating Additional Page Layouts

For the Demo am copying one of the existing page layouts.
The Page Layouts are located in the drive
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\1033\STS\DOCTEMP\SMARTPGS"

You can copy one of these and save it as "spstd9" (there are already 8 built in templates in this folder).

The image [This is to show how your page layout looks like] that gets displayed in spcf ( or custspcf.aspx) comes from the "_layouts\images" folder. So you need to store the image corresponding to the page layout in that purticular folder

( Note :
"_layouts\images" folder maps to "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\template\images" in IIS).

Important thing here is "The name of the image should be same as the name of the page layout.
Eg if the name of page layout is
'spstd9.aspx' then name of image should be 'spstd9.gif' "


2.
Creating a custom spcf page

First lets understand..
why not use the spfc.aspx itself?
The built in spfc.aspx page makes use of "OWSSVR.DLL" which is located in "\12\ISAPI\" folder for its processing. Its shielded to us and hence the functionality cannot be altered...
(Actually, the spfc.aspx passes the parameters to the dll as a query string, may be its possible to achieve the functionality by appropriate query parameter. But, a more research is required here.. May be some one can pen on this).

So.....
lets build Custspfc.aspx page
This application page is give by Microsoft for wss 2.0 and works for wss 3.0 as well.. You can download the page from here.



Open the page and navigate to code snippet
See the option values and if you want to add one more page layout add one more row and give the page layout name as value, and increase the size to 10. That's all, you add as many layout pages as you wish,by this way.






Save the
Custspfc.aspx in "_layouts" folder ("C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS")



3. Adding a link in the create.aspx page ( which directs you to custspcf.aspx page)

Now, we have come to the last step .
open the "create.aspx" page from "_layouts" folder. Search for the code





below that add a link to "custspcf.aspx"



This will create a link in your create.aspx page from which you can go to "custspcf.aspx" page.. (http://machinename:port/_layouts/custspcf.aspx)
Thats all.... Go and browse your site and create pages using your own page layouts.