Archive

Posts Tagged ‘SharePoint’

SharePoint 2007 “Save Site As Template” Hack

December 4, 2008 Simeon Lobo Leave a comment

This is a little hack that I found quite useful.

In the event that the Save Site As Template option is missing for a sub site under Site Settings -> Look and Feel, then the easiest way to access this functionality is by appending “_layouts/savetmpl.aspx” in the URL for the site.

As an example, if I can access a sub site from the URL:
http://TopLevelCollection/SubSite

Then I can save the template for the sub site by using the URL:
http://TopLevelCollection/SubSite/_layouts/savetmpl.aspx

Categories: Technical Tags: , ,

SharePoint 2007 Forms Based Authentication and Check-Out

December 1, 2008 Simeon Lobo 1 comment

If you ever have had a scenario where you had a SharePoint site working with the Windows Authentication provider and had to turn on Forms Based Authentication, then you may begin to experience issues with checking out documents via Office (Microsoft Word as an example).

It is not a widely documented configuration setting but enabling client side integration will fix the issue of checking out documents (see setting below). Credit for finding the setting goes to my mate, Simon Tyrrell :)

After configuring this setting, the larger authentication issue for MS Office still remains; after checking out the document, Office is not able to authenticate successfully unless persistent cookies are enabled. As you may know persistent cookies are enabled when a user clicks on the “Sign me in automatically” checkbox when they log in to SharePoint and these are stored on the users hard disk until they time out or the user erases them. If the user does not click the “Sign me in automatically” checkbox while logging in, session cookies are used and this essentially means that other than the client browser no other application can read the session cookie. The important takeaway here is that Office applications can only read persistent cookies.  

Though the default timeout for peristent cookies is 30 minutes, the web.config file can be configured to set this to a longer time period. The web.config setting below demonstrates a timeout of 120 minutes or 2 hours. Another important note is that the moment the cookie expires, client side integration stops working and the user is prompted to enter credentials again.

<forms loginUrl=login.aspx name=.ASPXFORMSAUTH timeout=120 />

 

 

To solve the issue, Microsoft have released an unwarranted custom httphandler that converts the Forms-based authentication (FBA) prompt originating from a client-side application (like MS Word; when client integration and FBA are enabled) and translates this to a Basic Authentication prompt. This allows the user to re-authenticate into SharePoint. Click here to download the httphandler. 

 

Client-side Integration Setting (click for larger picture)formsclientsideintegration2

Categories: Technical Tags: , ,

SharePoint Development Utilities

November 19, 2008 Simeon Lobo Leave a comment
Categories: Technical Tags: , ,

Iterating through SharePoint 2007 Site Collection entities

September 6, 2008 Simeon Lobo Leave a comment

I found that a simple yet good introduction to the SharePoint 2007 SDK was by playing with the iterative code below that lists nested sites and nested lists within a site collection. A colleague of mine who has just started looking at the SharePoint 2007 object model found this a good quickstart because the code gave him an avenue to start stepping in to the various SharePoint SDK objects and looking at their members. I hope you could find some use for it too.

 

using System;

using System.Collections.Generic;

using System.Text;

using Microsoft.SharePoint;

 

namespace TestSP

{

    class Program

    {

        static void Main(string[] args)

        {

            using (SPSite siteCollection = new SPSite(“http://test:41606″))

            {

                foreach (SPWeb site in siteCollection.AllWebs)

                {

                    foreach (SPList currentList in site.Lists)

                    {

                        SPQuery query = new SPQuery();

                        SPListItemCollection items = currentList.GetItems(query);

 

                        foreach (SPListItem item in items)

                        {

                            Console.WriteLine(“Item from site ‘{0}’ and list ‘{1}’ is named ‘{2}’”
                                                                              site.Title,

                                                                              currentList.Title,

                                                                              item.Name);

                        }

                    }

                }

            }

 

            Console.ReadLine();

        }

    }

}

 

  
Output

Categories: Technical Tags: , ,

SQL Server 2008 – Will new features be leveraged in TRIM Context and SharePoint?

May 1, 2008 Simeon Lobo 2 comments

With the upcoming release of SQL Server 2008 (aka; Katmai) during the 3rd quarter of 2008, Microsoft seem to be working hard on delivering some cool functionality with the new database management system.  With reference to some of the information management products that I work with; namely TRIM Context and SharePoint, I see vast potential for improvement in these products while leveraging new SQL Server 2008 features.

A couple of new features that really excite me with respect to TRIM and SharePoint are:

  1. The addition of the FILESTREAM data type in Katmai that will contain both structured and semi-structured data. This means that structured meta-data about the file is stored in the database itself, while the semi-structured BLOB data  resides on the NTFS file system. With SharePoint 2007, I never really understood why Microsoft elected to place files in a relational database rather than on an NTFS volume (built in the very first place to optimise streaming). Anyway, the point is that when the database is backed up, referenced files on the NTFS volume are backed up as well. T-SQL and Win32 API’s can now be used to access files seamlessly. I would think that Microsoft would be keen to leverage this feature in SharePoint 2009.
  2. TRIM Record Locations are a reference to a physical or abstract existence of a body of information. Therefore a record location in TRIM could point to a person who owns the body of information or a shelf location where the body of information resides (eg; a book in a library). With the introduction of new spatial data types GEOMETRY AND GEOGRAPHY in Katmai, planar (flat-earth) and ellipsoidal (round-earth) data can be represented in SQL Server 2008 seamlessly. It would be a pity not to see Tower Software and HP ignoring to extend the Record Location TRIM concept to use the new spatial data types as this would be extremely applicable to the records world and several key industry verticals including State and Federal Department, Asset Tracking and Asset Management and auto-allocation.
  3. The Change Data Capture feature being introduced in Katmai could be leveraged extensively within both TRIM and SharePoint.The Change Data Capture feature provides the ability to capture what has changed in a database structure as a steady stream. While this push-model could not only provide OLTP -> OLAP integration for both products, current capabilities of the products with respect to retention and auditing could be vastly improved.

SharePoint List Template Id’s

February 27, 2008 Simeon Lobo 7 comments

When creating SharePoint 2007 receivers, the ListTemplateId attribute is associated with a “value” that is an optional unique identifier for the target template for which the receiver is being built. The value of templates are as shown below. 

Value
Description
1200 Administrator tasks list
104 Announcements list
303 Blog Categories list
302 Blog Comments list
301 Blog Posts list
105 Contacts list
120 Custom grid for a list
118 Custom Workflow Process
130 Data Connection library
110 Data sources
108 Discussion board
101 Document library
106 Events list
150 Gantt Tasks list
100 Generic list
1100 Issue tracking
103 Links list
114 List template gallery
116 Master pages gallery
201 Meeting Agenda list
202 Meeting Attendees list
204 Meeting Decisions list
207 Meeting Objectives list
200 Meeting Series list
210 Meeting text box
211 Meeting Things To Bring list
212 Meeting Workspace Pages list
117 No-Code Workflows
2002 Personal document library
109 Picture library
300 Portal Sites list
2003 Private document library

111 Site template gallery
102 Survey
107 Tasks list
112 User Information list
113 Web Part gallery
119 Wiki Page library
140 Workflow History
115 XML Form library
Categories: Technical Tags: , ,

SharePoint Elements by Scope

February 27, 2008 Simeon Lobo Leave a comment

This excerpt was taken straight from the MSDN but I’ve blogged this, just in case it gets archived. I believe it’s extremely useful when developing custom solutions for SharePoint. 

elemenrscope1.jpg

SharePoint Content Deployment Alternatives

February 23, 2008 Simeon Lobo Leave a comment

While the out-of-the-box SharePoint content deployment features can be restrictive; allowing only one-way replication of content, Syntergy offer a solution with their Syntergy Replicator product. If you are ever faced with an international replication scenario, I would suggest that you consider this product; noting that workflow instances are not replicated (see next paragraph for more details). Syntergy’s products are not freeware and come at a price.  

While Syntergy Replicator allows for two-way replication of SharePoint content, I have faced a situation around the replication of workflow instances. Workflow instance entities can only be actioned on the server on which they have been instantiated. While the workflow instance entities (workflow tasks, for example) are replicated faithfully, the workflow instances that are related to these tasks are not replicated across. Unfortunately, work-arounds have to be built for this scenario as international users attempting to action a workflow task are presented with an error message in SharePoint.

Another product from Syntergy called Presentation Publisher that is still in Beta (as of this writing) has the ability to replicate web parts and layouts.

In my experience, Syntergy have good support personnel and quality assurance teams in the U.S. and Canada who are always ready to help.

 

Categories: Technical Tags: ,

SharePoint User Rights: Personal Permissions

January 4, 2008 Simeon Lobo Leave a comment

 SharePoint defines 33 separate user rights divided into three categories: list permissions, site permissons and personal permissions.The below is a description of user rights categorised by personal permissions. 

Right Description
Manage Personal Views Create, change, and delete personal views of lists.
Add/Remove Private Web Parts Add or remove private web parts on a web part page.
Update Personal Web Parts

Update web parts to display personalized information.

SharePoint User Rights: Site Permissions

January 4, 2008 Simeon Lobo 1 comment

 SharePoint defines 33 separate user rights divided into three categories: list permissions, site permissons and personal permissions.The below is a description of user rights categorised by site permissions. 

Right Description
Manage Permissions Create and change permission levels on the web site and assign permissions to users and groups.
View Usage Data View reports on web site usage.
Create Subsites Create subsites such as team sites, meeting workspace sites, and document workspace sites.
Manage Web Site Grant the ability to perform all administration tasks for the web site as well as manage content and permissions.
Add and Customize Pages Add, change, or delete HTML pages or web part pages, and edit the web site using a Windows SharePoint Services–compatible editor.
Apply Themes and Borders Apply a theme or borders to the entire web site.
Apply Style Sheets Apply a style sheet (CSS file) to the web site.
Create Groups Create a group of users that can be used anywhere within the site collection.
Browse Directories Enumerate files and folders in a web site using SharePoint Designer and WebDAV interfaces.
Use Self-Service Site Creation Create a web site using self-service site creation.
View Pages View pages in a web site.
Enumerate Permissions Enumerate permissions on the web site, list, folder, document, or list item.
Browse User Information View information about users of the web site.
Manage Alerts Manage alerts for all users of the web site.
Use Remote Interfaces Use SOAP, WebDAV, or SharePoint Designer interfaces to access the web site.
Use Client Integration Features Use features that launch client applications. Without this permission, users will have to work on documents locally and upload their changes.
Open Allow users to open a web site, list, or folder in order to access items inside that container.
Edit Personal User Information Allow a user to change his or her own user information, such as adding a picture.