Posts

Showing posts from 2010

SharePoint 2010 Multilingual Interface (Hindi)

Image
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 - http://www.microsoft.com/downloads/details.aspx?FamilyID=046f16a9-4bce-4149-8679-223755560d54&displaylang=en
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 ());
Response.Write(proditem[&…

Total Count of Items in a List in Sharepoint

Image
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

Image
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
http://www.microsoft.com/downloads/details.aspx?FamilyId=79BADA82-C13F-44C1-BDC1-D0447337051B&displaylang=enStep 2
Installed Service Pack 2 for Office SharePoint Server 2007, x86 & x64
http://www.microsoft.com/downloads/details.aspx?FamilyId=B7816D90
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 12.0.0.6421 from 12.0.0.6219








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.
http://www.andrewconnell.com/blog/archive/2007/01/10/5704.aspx
http://www.andrewconnell.com/blog/archive/2008/04/15/More-help-on-creating-custom-timer-jobs-and-a-useful.aspx

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" "http://www.w3.org/TR/html4/loose.dtd">
<!-- <link rel="stylesheet" href="" type="text/css"> -->
<html>
<head>
<style type="text/css">
#wrapper{
width:1000px;
margin:0px auto;
border:1px solid #acb;
padding:10px;
}
#header {
border:1px solid #bbb;
height:100px;
padding:10px;
}
#content {
margin-top:10px;
padding-bottom:10px;

}

#content div {
padding:10px;
border:1px solid #bbb;
float:left;
}
#content-left {
width:180px;
height:500px;
}

#content-main {
width:585px;
height:500px;
margin-lef…

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

Image
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 Asp.net 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 .