Sharepoint Insight by Namwar Rizvi

November 1, 2009

SharePoint Foundation 2010 – What is it and What do you need to use it?

Filed under: Tips — namwar @ 10:35 pm

In the upcoming version of SharePoint i.e. SharePoint 2010, Windows SharePoint Services 3.0 has been evolved and got a new name called “SharePoint Foundation (SF)”. This will align it more to other Microsoft technologies like Windows Presentation Foundation (WPF) and Windows Communication Foundation (WCF).

SF extends the feature set offered by WSS 3.0 . It provides you a platform with right tools to build your collaborative web sites. Microsoft has published a paper to describe the business value of having SF 2010. You can read the paper here.

As expected, Microsoft has designed SF2010 for 64bit systems only. There is no 32 bit version of it. Following is the basic requirements list to install SF 2010 as described by Microsoft in the paper mentioned above:

SERVER ENVIRONMENT:

  • Windows Server® 2008 64-bit operating system with SP2 or later, OR Windows Server 2008 R2 64-bit
  • Microsoft SQL Server® 2005 64-bit with SP2, SQL Server 2005 Express 64-bit, SQL Server 2008 64-bit or SQL Server 2008 Express 64-bit
  • Microsoft .NET Framework 3.5 with SP1 installed

CLIENT ENVIRONMENT:

Level 1 Internet browser options for Windows:
  • Windows Internet Explorer® 7 32-bit
  • Windows Internet Explorer 8 32-bit
  • Firefox 3.x 32-bit
Level 2 Internet browser options:
  • Windows Internet Explorer 7 64-bit
  • Windows Internet Explorer 8 64-bit
  • Firefox 3.x on non-Windows operating system
  • Safari 3.x

 

October 21, 2009

Custom Edit Form for SharePoint Lists

Filed under: Customization, Errors, Tips — namwar @ 11:05 am
Tags: , , ,

If you want to set a custom edit form to your Sharepoint List then please make sure you follow these Golden Rules as correctly suggested by Hugo in a SharePoint news group.

  1. NEVER delete or rename the default pages…
    when you want to create a new EditForm.aspx it’s best to copy it to
    another file and then edit the original one (without renaming it and
    without reassigning the supporting files)…
  2. DON’T ever delete the webparts that exist.
    It’s better to hide them and create new ones “side-by-side”.

These rules are real time savers and I will highly encourage every reader to follow them.

October 14, 2009

How to use Case statement in RenderPattern of a Custom Field Type

Filed under: Tips — namwar @ 10:19 pm
Tags: , , ,

While designing a custom field type, you may sometime need to render different HTML based on the value of field. For example, if you want to display Red,Amber, Green traffic light images to highlight High,Medium, Low value then you need to dynamically switch image url based  on the value of the field.

In CAML, you have Case structure to implement this switching logic. It works very much like the C# switch-case statement. Following is an example of RenderPattern of a custom field which display different images based on the value of the field.

<RenderPattern Name="DisplayPattern">
      <Switch>
        <Expr>
          <Column />
        </Expr>
        <Case Value="1" >
          <HTML><![CDATA[<img alt="Red" src="/_layouts/IMAGES/ewr210m.gif" />]]></HTML>
         </Case>
        <Case Value="2" >
          <HTML><![CDATA[<img alt="Amber" src="/_layouts/IMAGES/ewr211m.gif"]]></HTML>
        </Case>
        <Case Value="3" >
          <HTML><![CDATA[<img alt="Green" src="/_layouts/IMAGES/ewr209m.gif"]]></HTML>
        </Case>
        <Default>
            <HTML><![CDATA[<span>No Value</span>]]></HTML>
        </Default>
      </Switch>
    </RenderPattern>

August 1, 2009

SharePoint Designer or Visual Studio?

Filed under: Guidance — namwar @ 11:20 pm
Tags:

If you are confused about when to use SharePoint Designer and Visual Studio then here are some guidelines which may help you choosing the right technology at the right time. The short answer is

Web Designer=SharePoint Designer whereas Web Developer=Visual Studio

  1. First of all please note that these are two completely different tools to solve two completely different types of problems.
  2. SharePoint Designer is focused on Presentation and Branding.  Although, you can some what program a logic to solve some issues (like designing sequential workflows) but it is not good for programming and it is designed to do code free work.
  3. SharePoint Designer is an excellent tool for rebranding the site, customizing the layout, updating CSS and designing Master Pages.
  4. SharePoint Designer can talk to SharePoint natively and can display the pages with full rendering (at least 90%) of web parts.
  5. SharePoint Designer is best suitable for web designers.
  6. Visual Studio 2005/2008 is the tool of choice when you want to extend SharePoint functionality by writing your own custom code.
  7. If you want to design portable workflows, then user Visual Studio.
  8. If you want to create event handlers, custom features, site definitions, custom lists or web parts then use Visual Studio.

July 21, 2009

SharePoint / WSS 3.0 SQL Database not found error

Filed under: Errors, Solutions, Tips — namwar @ 9:45 pm
Tags: , , , , ,

While reading the newsgroups, I found a neat solution to share with my readers. If you have deleted content databases of a site collection but you are still getting an error similar to the following in error log

SQL Database ‘WSS_Content_345′ on SQL Server instance ‘DBS1′ not found.

It is because SharePoint config database still has a record of deleted database and trying to connect to it.

Solution:

Run the deletecontentdb stsadm command similar to the following :

stsadm -o deletecontentdb -url http://wss.company.com/sites/name1
-databasename WSS_Content_2

stsadm -o deletecontentdb -url http://wss.company.com/sites/name1

It will delete the old database entry from SharePoint Config database.

July 19, 2009

How to display Web Part Maintenance Page in SharePoint

Filed under: Solutions, Tips — namwar @ 12:39 am
Tags: , ,

Often your web part page starts behaving strangely or giving you errors due to some buggy script or web part. This sometimes even stops you to open page in edit mode because of Java Script errors.

Don’t worry, there is a very simple way to delete those web parts. Just append ?contents=1 at the end of the URL of respective page and SharePoint will open the Web Part Maintenance Page for it.

For example, if the URL of problematic page is

http://MOSServer/Test/default.aspx

then Web Part Maintenance Page url will be

http://MOSServer/Test/default.aspx?contents=1


July 16, 2009

List of all SharePoint Back-End databases

SharePoint stores end-user content and application configurations across multiple relational databases in the back-end database servers. At a high level, the following are the relational databases:
 Configuration database: Stores topology and configuration information for the complete deployment. Every farm has exactly one configuration database. For information about the configuration database protocols, see Configuration Database.
 Central Administration content database: Stores content associated with the Central Administration site.
 Shared Services Providers (SSP) database: Stores content and configuration for Shared Service Providers (SSPs), such as the user profile services. The capabilities of SSPs are described in [MS-SPFEPO], Section 2.2.2 (Shared Service Provider).
 Shared services administration content database: Stores content for the shared services administration site.
 Content database: Stores all end-user and site content. For information about content databases and protocols, see List and Library Storage.
 Search property store: The search metadata index that stores properties related to pieces of content that are indexed for full-text querying. For information, see section 7.4.1.1.2.
11 of 43
[MS-SPBEPO] SharePoint Back-End Protocols Overview – v1.0
[MS-SPBEPO]: SharePoint Back-End Protocols Overview
Copyright © 2008 Microsoft Corporation.
Release: Friday, June 27, 2008
 Single sign-on database: Stores credentials for end-users to access information from external applications through SharePoint. For information about the protocols used to access the single sign-on (SSO) database, see Business Data Catalog Protocols.

As described by Microsoft in SharePoint Back-End Protocols Overview

SharePoint stores end-user content and application configurations across multiple relational databases in the back-end database servers. At a high level, the following are the relational databases:

  1. Configuration database: Stores topology and configuration information for the complete deployment. Every farm has exactly one configuration database.
  2. Central Administration content database: Stores content associated with the Central Administration site.
  3. Shared Services Providers (SSP) database: Stores content and configuration for Shared Service Providers (SSPs), such as the user profile services.
  4. Shared services administration content database: Stores content for the shared services administration site.
  5. Content database: Stores all end-user and site content.
  6. Search property store: The search metadata index that stores properties related to pieces of content that are indexed for full-text querying.
  7. Single sign-on database: Stores credentials for end-users to access information from external applications through SharePoint.

June 21, 2009

Access Denied while changing name of a Document of Document Library

Filed under: Configuration, Guidance — namwar @ 10:48 pm
Tags: ,

It is natural to assume that if you have Modify permission on any SharePoint item/document then it means you can update any property of that document, right? Wrong! You can update any property of a document/item except Name property. This is because in SharePoint terms, changing the name of the document means two things:

  1. Creating a copy of the current document with the new name and
  2. Deleteing the current document.

If you don’t have Delete permission and just have Modify permission then you can modify every property except the Name property.

So, if you are getting Access Denied error while changing the Name of a document of a SharePoint Documnt Library and you know that you have the Update/Modify permission on that doucment then make sure you also have Delete permission on that document.

June 14, 2009

How to add custom CSS in your WebPart

Filed under: C#, Solutions, Tips — namwar @ 10:37 pm
Tags: , ,

If you want to add custom CSS file for your webpart, here is the code:

  1. protected override void CreateChildControls()
  2. {
  3. base.CreateChildControls();
  4. CssLink cssLink = new CssLink();
  5. cssLink.DefaultUrl = “/_layouts/Test.css”;
  6. this.Page.Header.Controls.Add(cssLink);
  7. }

May 30, 2009

Quickest way to copy files from GAC

Filed under: Management, Tips — namwar @ 9:18 pm
Tags: , , ,

Yes, I know how painful it is to realize that you can not copy an assembly out from Global Assembly Cache (GAC), at least not by usual way of copying a file from a windows folder. Don’t worry, there are some ways to do it and the quickest way to browse the GAC and copy files from it is to just map a drive on Windows\Assembly folder.

Here you go, 

  1. From Start-Run type cmd to launch command prompt
  2. Type subst Z: C:\windows\Assembly and press Enter
  3. Thats it!

Now, you got a drive Z which is mapped to your GAC folder and you can easily open it in Windows Explorer and copy files from it.

Isn’t it easy?

Next Page »

Blog at WordPress.com.