Tuesday, November 24, 2009

Final, Finally, Finalize or Sealed?

Final access modifier
  • Final can be used for classes, methods, and variables
  • Final variables can't change from the initialized values
  • Final classes can't be subclassed
  • Final methods can't be overriden
  • C# uses the keyword "sealed" instead of "final" for classes and methods
  • A class or method can be "sealed"
  • A "const" may be used for equivalent of a "final" variable

Finally block
  • Finally is used in exception handling
  • Finally is a part of the try-catch-finally
  • Finally is executed even if no exception is thrown
  • Read more on finally in this post

Finalize() method
  • Finalize() is a non-explicit way to clean up resources
  • Memory resourses for the object are cleaned up using Finalize()
  • Finalize() is called during garbage collection to allow objects to clean up unmanaged resources
  • Finalize() should always be protected
  • Finalize() should release unmanaged resources only

Wednesday, November 18, 2009

How many ways to backup your SharePoint web site?

Quick notes on various methods available for SharePoint 2007 backup.

  • Through Central Admin GUI
    (Central Administration > Operations > Perform a Backup)
  • Command line backup using STSADM
    (stsadm -o backup -directory/site)
  • Using SharePoint Designer
    (Site > Administration > Backup Web Site)
  • Database Backup using MS SQL Server - Click here for more details
  • Microsoft System Center Data Protection Manager (DPM) - Click here for more details
  • Recycle Bin and versioning - Click here for more details
  • Third-party tools

Sunday, November 15, 2009

Why My Blog Doesn't Show in Google?

If you are worried about your blog not being listed in search results on Alexa, Bing, Clusty, Google, Yahoo or any other one, you're not alone. The answer - follow these simple tips, keep working and it'll show up soon.

1. Content is the king
We humans see a site while the search engines read the sites. The best you can do is to improve your contents.

2. Networking is important
Links are as important for your blog as references are for you. Get your blog linked from your own other blogs and sites. Ask your friends and family to link to your blog. Read other blogs and leave comments often. One referral from popular sites is more valuable than three from some vague one-page site.

3. Keep it clean
Don't even try to fool the search engines. The days of long and unrelated "keyword" meta-tags are over. Unrelated white keywords on white background just to fool the search engines can do you more harm than benefit.

4. Plain text before cool animation
Pretty images and an impressive Flash piece may make your blog look great but as far as search is concerned, the contents are immensely valuable. Don't forget to use tags such as "ALT" and TITLE" with your images.

5. Update often
More often you update, more visits you'll have from the visitors and more updates from the search engines. An average search engines is not interested in a blog that was last updated three three years ago.

6. Listen to the experts
There is good advice on the Internet to help you. Listen to the experts and get benefited.

7. Title matters
The title of your blog is very important and so are the headings. Use these judiciously.

8. Submit to search engines and site directories
Manually submit your site to search engines such as Yahoo, Google etc.

9. Have patience
You don't jump to the top overnight. Search engines may take long to completely index your blog. Remember, perseverance pays.

Following these simple tips will help you get a higher rank fast. Good luck!

Wednesday, April 1, 2009

Visual Studio 2008 extensions for Windows SharePoint Services 3.0 - Problem

When you try to install Visual Studio Extensions for Windows SharePoint services or SharePoint 2007 on your Windows XP workstation, it fails after displaying the following or similar message:
"This product can only be installed if Windows SharePoint Services 3.0 has been installed"

You don't have to install WSS on your workstation. Even if you try, it fails after showing a message similar to the following:
"This product requirs Windows Server 2003 SP1. Install this service pack and re-run setup"

I attempted a few workaround and then came across Umakanth's blog post  that fixes this problem in one simple registry edit to make the setup program believe that SharePoint is installed on your workstation.

1.Run regedt32 and navigate to

2. If there is a key "Web Server Extensions" get into it else create one

3. If there is a key "12.0" get into it else create one

4. Create the following string value
Name = Sharepoint
Value = ”Installed”

5. Re-run the setup and see it work.
Wait! Though the extensions are installed, your project may still show errors like "Could not load file or assembly" when you reference "Microsoft.Sharepoint" and other assemblies.

All you need is to drag the SharePoint assemblies from folder: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI on your ShaerPoint server and drop to c:\windows\assembly folder of your workstation. Make sure that the files are from a 32-bit server.

Sunday, March 1, 2009

Search Web Parts in MOSS 2007

MOSS 2007 has nine built-in web parts for search to provide a powerful tool to customize the search results and the user interface without writing lengthy code. These web parts are listed below:
Advanced Search Box
  • People Search Box
  • People Search Core Results
  • Search box
  • Search Core Results
  • Search High Confidence Results
  • Search Paging
  • Search Statistics
  • Search Summary

Saturday, February 28, 2009

Public Web Sites Hosted on MOSS 2007

When I asked someone about a few local web sites being hosted on MOSS 2007, her answer was, "Everyone uses MOSS." I wasn't surprized by the answer though it didn't help me. At wssdemo, I found a list of hundreds of web sites hosted on MOSS 2007: http://www.wssdemo.com/Pages/websites.aspx

Tuesday, February 24, 2009

Approval Workflow Status Values in MOSS 2007

The workflow approval status values are listed below:
the integer values:

0 - Not Started
1 - Failed on Start
2 - In Progress
3 - Error Occurred
4 - Stopped by User 
5 - Completed
6 - Failed on Start, Retrying
7 - Error Occurred, Retrying
8 - View Query Overflow
15 - Canceled
16 - Approved
17 - Rejected

Sunday, February 22, 2009

Workflow in MOSS 2007

A workflow can be defined as a model to represent real work for further assessment, In computerized environment, workflow may mean a software solution to capture the events and actions of these assessments as an attempt to computerize the actual business process.

Workflows could be implemented in three different ways in SharePoint 2007. SharePoint 2007 has some OOB workflows. Simple workflows can be created using SharePoint Designer. More complex workflows can be developed in Visual Studio. SharePoint 2007 uses Windows Workflow Foundation (WWF) as an engine for workflows. WWF provides workflow runtime, and SharePoint lists and document libraries provide data repository for the items used by workflows.

If you are interested in knowing more this MSDN link is a good starting point: http://msdn.microsoft.com/en-us/library/cc514224.aspx#MOSS2007DevWorkflowSolutions_WorkflowPlatform

Thursday, February 19, 2009

The 12 Hive in MOSS 2007 Explained

The legendary 12 hive folder is where the OOB system files are located afterSharePoint 2007 installation. 

It is located at "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12" in a standard MOSS 2007 installation. This folder contains the following sub-directories:

  • ADMISAPI - This folder maps to IIS virtual directory  for SharePoint Central Administration web service
  • BIN - MOSS utilities binary files such as STSADM.EXE. Sub-directory LCIDD stores language specific binary files in individual folders for each language. 
  • CONFIG - As the name suggests configuration files used by MOSS
  • Data - Indexing services save indexes here.
  • HCCab - A set of cab files containing manifest and content information used by the SharePoint help sytem are stored in LCID subdirectory
  • Help - The help files used by the configuration wizard
  • ISAPI - This folder maps to IIS virtual directory "_vti_bin" and stores all the standard Web Services for SharePoint except SharePoint Central Administration.
  • LOGS - SharePoint logs.
  • Resources - Localization resources for SharePoint sites
  • TEMPLATE - The templates for a SharePoint web site. The features and xml files are also stored in subdirectories of this folder.

A snapshot of 12 hive folder (Click image to zoom)

Thursday, February 12, 2009

Server Roles in a MOSS Farm

The architecture of a MOSS farm may contain one or more servers. These servers have various roles which can be divided into three broad categories, Web Front End (WFE), application server and database server.

1. Web Front End (WFE) Servers
The fast and lightweight WFE servers interact with the user. The MOSS site is hosted on the IIS installation on WFE. These servers connect to the database servers to query the MOSS database for grabbing the requested content and rendering the results in the client browser. All WFEs in a farm must be identical and may be load balanced.

2. Application Servers
An application server provides all shared service level capabilities to the users through WFEs.Just like WFEs, load balancing can be implemented on the application servers too. Following are some examples of the shared services hosted on an application server:
  • Search Indexing
  • Search Query
  • Excel Calculation Service
  • Windows SharePoint Services Search
3. Database Servers
The database server has the maximum impact on the availability of the MOSS solution because it is the single point of data storage for all MOSS data (users, applications and configurations). Redundancy and high availability can be ensured by clustering or mirroring.

Thursday, February 5, 2009

Some SharePoint Jargons

Here is a quick reference of a few  abbreviations, acronyms, and   commonly used while working with SharePoint:

ADSI - Active Directory Service Interfaces
AJAX - Asynchronous JavaScript and XML
BDC - Business Data Catalog
BLOB - Binary Large Objects
CAML - Collaborative Application Markup Language
CAS - Code Access Security
DPM - Data Protection Manager
ECS - Excel Calculation Serv ice
GAC - Global Access Cache
IIS - Internet Information Server
ITIL - Information Technology Infrastructure Library
KPI - Key Performance Indicator
LDAP - Lightweight Directory Access Protocol
LINQ - Language Integrated Query
LOB - Line of Business, Large Objects
MOSS - Microsoft Office SharePoint server
OLAP - Online Analytical Processing
OOB - Out of the Box
SLA - Service Level Agreement
SKU - Stock Keeping Unit
SSP - SharePoint Service Provider
STS - SharePoint Team Services
WCF - Windows Communication Foundation
WFE - Web Front End
WSDL - Web Services Description Language
WSP - Windows SharePoint Solution Package
WSS - Windows SharePoint Services

Monday, January 26, 2009

Default Security Levels in SharePoint 2007

User security levels can be assigned by the administrator. There are four levels by default. Custom security levels can be created by various permutations and combinations of the permissions. The four out-of-the-box (OOB) levels are as listed below:
  • Reader - Has read-only access to the Web site.
  • Contributor - Can add content to existing document libraries and lists.
  • Web Designer - Can create lists and document libraries and customize pages in the Web site.
  • Administrator - Has full control of the Web site.

Monday, January 19, 2009

WSS 3.0 Web Services

A complete reference is available at this MSDN link for the following WSS 3.0 web services:

Administration Web Service
Alerts Web Service
Authentication Web Service
Copy Web Service
Document Workspace Web Service
Forms Web Service
Imaging Web Service
List Data Retrieval Web Service
Lists Web Service
Meetings Web Service
People Web Service
Permissions Web Service
SharePoint Directory Management Web Service
Site Data Web Service
Sites Web Service
Search Web Service
Users and Groups Web Service
Versions Web Service
Views Web Service
Web Part Pages Web Service
Webs Web Service