Showing posts from 2010

SharePoint 2010 Multilingual Interface (Hindi)

Thought of updating you on my findings in SharePoint 2010 – this might be useful pointers for you; a little spanner in your works. I was testing the Multilingual Interface of SharePoint 2010; Seems SharePoint 2010 is improved and extended its capabilities on the good old MOSS 2007.
Both SharePoint foundation 2010 and SharePoint Server 2010 have language packs are avaialble to install, but if you are using licenced version of SharePoint Server 2010 you need to install both the SharePoint Foundation and the SharePoint Server langauage packs.
I downloded the Hindi Language pack and installed -
Once you install the language packs you can take advantage of Multilingual User Interface (MUI). The lanaguage is enabled on per-site basis Administration > Language settings will list out all the languages you installed.

Once after you turn on alternate language, you can change th…

How to Use CAML Query to get Data from SharePoint 2007 List

I was enjoying my summer with some CAML queries – All I wanted was to get some data from a simple Products List in SharePoint 2007. The list was pretty simple with 2 colomns "Product" and "Cost". I used U2U to create a pretty descent CAML query. I created a simple website in VS2008 to test it !!! It all worked fantastically!!!
Here is my Quick Dirty code –
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.SharePoint;

namespace WebApplication1
public partial class _Default : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)
SPList mylist=new SPSite ("http://sharepointlogics").OpenWeb ().Lists ["Products"];
SPQuery query=new SPQuery ();
query.Query = "";
SPListItemCollection items=mylist.GetItems (query);

foreach (SPListItem proditem in items )
Response.Write(proditem["Title"].ToString ());

Total Count of Items in a List in Sharepoint

I had a recent assignment to test the performance of a List. The list was behaving really slow and I need to determine the total number of items in the list.
Aaaah ………… there starts the problem. I wanted the total number of items in the list and I could only do that by navigating through the List Item pages which was around 20,000 + Items, So need to click through every single pages and it would take couple of months to figure out the exact numbers. Then I thought about the "Calculated Columns" in Sharepoint.
Finally I figured out to get the total count of the Items in a Sharepoint List. Here are the steps -

Step 1.Create a "Calculated (calculation based on other columns) " column in the List
Step 2.Column Name - "Total"
The Type of Information in this column - "Calculated"
In the Formula Column put - "=SUM(ID)" (without apostrophise)
Select "The data type returned from this formula is: " as Number
Step 3.Select "OK" -…

Sharepoint Service Pack 2 Release

Sharepoint 2007 Service Pack 2 Release(MOSS SP2)I got a new task assigned to upgrade my MOSS Farm from SP1 to SP2.
Here are the steps which I done
Step 1
Installed Service Pack 2 for Windows SharePoint Services 3.0, x86 & x64 2
Installed Service Pack 2 for Office SharePoint Server 2007, x86 & x64
Once after the upgrade checkpoints -
Check 1
Go to the Control Panel>Add remove programs > Select "Microsoft Office Sharepoint Server 2007" > Click here for Support Information. This would be updated to 12.0.6425.1000

Check 2
Go to Central Admin > Operations > Servers In Farm > The Version would be upgrade to from

Possible Errors
Strangely I was getting the below error while installing "Service Pack 2 for Office SharePoint Server 2007" Installer -

The err…

Creating SharePoint 2007 Timer Jobs

I was searching for some articles on how to Create Sharepoint 2007 Timer Jobs - and i found some nice ones, Andrew is describing it very well on his articles - Check out.

How to check Sharepoint 2007 Versions

How to check Sharepoint 2007 Versions
Recently I was trying to figure out the Version of Sharepoint and yes it's not pretty straight forward you might need to do several tricks to determine it.
Here are some pointers –
Navigate to the \12\bin\ folder and check file versions (For more information on the first technique read this TechNet article)
Use IIS Manager and look at the web site properties
Second approach - because it takes some of the guesswork out of the process.  The basic steps for using IIS Manager to determine the SharePoint version are:
Sign in one of your SharePoint front end web servers
Open IIS Manager (can be found by navigating to Start, Administrative Tools, Internet Information Server (IIS) Manager)
Expend the folder labeled "Web Sites"
Right-click on the web site named "SharePoint Central Administration" and select "Properties"
Click on the tab named "HTTP Headers"
Look at the field named "Customer HTTP Headers"…

Create a webpage with Div tags and no tables

I was searching to figure out how to create a page layout with no tables for one of my SharePoint projects. I designed one with the basic <div> tag and css and no <tables>, I used inline CSS script for this.

The code I used is as below
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
<!-- <link rel="stylesheet" href="" type="text/css"> -->
<style type="text/css">
margin:0px auto;
border:1px solid #acb;
#header {
border:1px solid #bbb;
#content {


#content div {
border:1px solid #bbb;
#content-left {

#content-main {

How to create files of any size

How to create files of any size
fsutil file createnew C:\Brij\One_MB_File.doc 1024000
Above command will create 1 MB file called "One_MB_File.doc" at C:\Brij location.
You can provide any file extension - e.g. .txt, .xls, .ppt, .pdf etc.
This command may help in creating files for upload/download test in SharePoint or any other application.

Sharepoint Maintenance Page

Recently I got a requirement asking me to create a "Maintenance Page" in my Sharepoint Farm for a new Release.
I was trying to set a simple "Offline.htm" page in IIS and setting it as the default page in the Documents, but unfortunately this would never work as in a regular .Net application. Done a bit research and found a good article of Scott Guthrie. I would walk through the steps to get this done -
Step 1.Create a page "App_Offline.htm" in the Root Site - When see this page it would unload the AppDomain for the application and would render this page.
However, there is a catch, I was trying to do this the application was down but the page was not rendered instead I was getting a 404, found out this was because if the content in the ".htm" page is less than 512 bytes IE would only render the custom error page.

Step 2.
Make the Page size greater than the limit, something similar to this- Bingo !!! and it should work .