Showing posts from 2008

How to change service accounts and service account passwords in SharePoint Server 2007 and in Windows SharePoint Services 3.0

If you want to reset Moss Service Account , Microsoft provides a good KB article on this.

Really Good Reference

How to Create a Simple Event Handler when a Feature is activated

If you want to bind an event handler with a simple feature all you need to do is tweak your Feature.xml and add the Assembly Information into that and Create a Simple Event handler
Feature.xml File
Feature Id="ec4b9423-46ff-4a61-9264-8761e7c17145"
Description="Description for FeatureWithReceiver1"
ReceiverAssembly="SimpleEventHandlerPro, Version=, Culture=neutral, PublicKeyToken=$PublicKeyToken$"
Creating a Simple Event Handler
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;

namespace SimpleEventHandlerPro
class FeatureWithReceiver1 : SPFeatureReceiver

public override void FeatureInstalled(SPFeatureRec…

How to enable document library event handlers for the newly created document libraries at the list definition level

The List definition files can be configured in such a way that the event handler configured automatically for the newly created document libraries. Here I provide the details of how to do it.
Open the Site definition folder. If you use default Site definition, STS, then open the folder from the following location.
“C:\program files\common files\Microsoft Shared\web server extensions\60\template\1033\STS
Note: Modifying the default files is not supported by Microsoft. Microsoft recommends using custom Site Definition.
Open the List Definition folder. If you use default list definition for document library, then open the “DOCLIB” folder in the LISTS folder
Open the “SCHEMA.XML” file in notepad or visual studio
Modify the LIST node by adding the EventSingAssembly, EventSinkClass, and EventSinkData

Note:Here I hardcoded the EventSinkAssembly for sample. Could you please change it according to your component.
Restart IIS.
After configuring the details, if you create new document library based on th…

Event Handlers and Event Receiver’s in MOSS

Tere are two types of Events Synchronous and Asynchronous Events.* Synchronous events can trap an item, document library or site before it is deleted,added or, ItemAdding, ItemUpdating,ItemDeleting etc.* Asynchronous events can trap an item, document library or site when it is added,deleted or, ItemAdded, ItemUpdated,ItemDeleted etc. We create Event Recivers to handle these events. An event receiver basically, is a piece of managed code that is launched in response to an event that takes place within SharePoint.SharePoint Object Model exposes several event classes inherited from Microsoft.SharePoint assembly. There are three main event classes:
SPItemEventReceiverSPListEventReceiverSPWebEventReceiverEach class includes both synchronous and asynchronous methods to work with Item, List or Web Level.

How to bind SharePoint event receivers to a custom list definition

In most cases you want to create your own list definition with your own event receiver that sould only react on events of your custom list.
SharePoint ships with alot of list definitions with unique list type numbers:
100: Generic list101: Document library104: Announcements listand many more.
You can create event receivers that react on events of these list types.
To create a custom list definition you should use the visual studio template "List Definition" shipped with the VSeWSS 1.1. If you create a custom list with base type "document library" its id will also be 101. It's just a copy of the template you selected.

First line of schema.xml after creating the custom list definition project:

Mandatory Services for Sharepoint (MOSS)

Here are the List of Sharepoint Services which are mandatory on MOSS Farm enviornment
SharePoint Core Services
+Windows SharePoint Services Web Application
+Windows SharePoint Services Search
+Windows SharePoint Services Incoming E-Mail
+Windows SharePoint Services Outgoing E-Mail
+Windows SharePoint Services Administration
+Windows Sharepoint Services Timer
+Windows Sharepoint Servcies Tracing
+Office SharePoint Server Search
+OfficeDocument Conversions Load Balancer Service
+Office Document Conversions Launcher Service Central Administration
IIS Core Services
+IIS Admin Service
+World Wide Web Publishing Service
+SMTP Service (required if using SMTP Service)

How to Deploy the assembly using Wsp Package

The preferred way to provision your features, web parts and assemblies is by creating a Solution Package (.wsp file). You will add add your assembly, the manifest.xml file and all your other components and resources into the cabinet.
You will need to add the following entry into the manifest.xml
DeploymentTarget The depoloyment target is location where the assembly will be copied to and can ether be the bin folder of the WebApplication or it could be the GlobalAssemblyCache (GAC)Location The location of the assembly within the cabinet file. SafeControl A SafeControl element entry as described at the beginning of the post.
Using this method, your assembly will be correctly deployed the servers in the farm as well as added to the safe controls of the web application. Again any new server added to the farm will automatically get all the solution packages deployed.

How to disable "New Folder" command on the New menu in a List ?

If you are bugged with users creating "New Folder" in your list and if you want to disable the "New Folder" option then you can tweak the parameters in the List Element - "FolderCreation" to "NO" and that's it its all done. There are other parameters in the List which you can look for more Information.
AllowDeletion = "TRUE" "FALSE"
AllowEveryoneViewItems = "TRUE" "FALSE"
AlwaysIncludeContent = "TRUE" "FALSE"
BaseType = "0" "1" "2" "3" "4"
CacheSchema = "TRUE" "FALSE"
Catalog = "TRUE" "FALSE"
Category = "Libraries" "Communications" "Tracking" "Custom Lists" Default = "TRUE" "FALSE"
Description = "Text"
DisableAttachments = "TRUE" "FALSE"

Security account requirements for Sharepoint 2007

Security account requirements for the configuration of Sharepoint 2007
To install Office SharePoint Server 2007 in a server farm environment, at-least 2 accounts are required:
A user account that you can use to install Office SharePoint Server 2007 and run the SharePoint Products and Technologies Configuration Wizard. This account must be: A domain user account.

A member of the Administrators group on each of your front-end servers. A member of the SQL Server Logins, which grants login access to your SQL Server instance. A member of the SQL Server Database Creator server role, which grants permission to create and alter databases. A member of the SQL Server Security Administrators server role, which grants permission to manage server logins.

A unique domain user account that you can specify as the Office SharePoint Server 2007 service account. This user account is used to access your SharePoint configuration database. It also acts as the application pool identity for the SharePoint Centra…

SSP (Shared Service Provider)

What is a Shared Service Provider?
For those of you who don't know what I am talking about a bit of overview. In MOSS 2007 there is this new concept of Shared Services Providers(SSP). The idea being that there are certain services that really make sense to centrally manage and share. A good example being profiles. With a SSP we can import all of the profile information from AD once and then our various web applications can consume the data. So maybe we have http://marketing/ and http://accounting/ it doesn't make sense for each one to maintain identical profile information, they should share.
The major services that are handled by the SSP are:
Profiles and Audiences
My Sites
All of Excel Services
All of the BDC (Business Data Catalog)
Below is an example screen shot from MOSS 2007 Enterprise:
Sometimes the easiest way to think of Shared Services is the Parent vs. Child relationship. The Parent (your SSP) goes out and does all of the work (pulling BDC data, indexing content, host…


What is WSS 3.0 in SharePoint 2007 (MOSS) ?

You have heard a lot about WSS and SharePoint 2007 ,basically what is WSS ?
Windows Share point Services (WSS) is a technology provided as an extension to Microsoft Windows 2003 (and above). WSS provides a platform for collaboration applications, offering a common framework for document management and a common repository for storing documents of all types.

Office SharePoint Server 2007 builds on top of Windows SharePoint Services 3.0, rather its an additional layer to provide capabilities including collaboration, portal, search, enterprise content management, business process and forms, and business intelligence.

Adding Webpart to Custom Site Defenition.

At times we would be finding difficulty to add a custom webpart to your own site definition(Custom), Many a times i had seen this Error popping up becuase of any xml format error in the webpart defenition added.

Error :
[ Web Part Error: The file you imported is not valid. Verify that the file is a Web Part description file (*.webpart or *.dwp) and that it contains well-formed XML. ]

Inorder to get the correct webpart definition look into sharepoint itself
Go to Site settings -> Webparts (under Galleries) -> Click the Edit button/Image next to the webpart you want to add in the site definition, and then click View XML

The XML you get, is the definition that has to be included in the CData part of your page!So, for example you would get:

Changing Product Key of SharePoint

If you want to change the product key of SharePoint MOSS Go to Central administration > Operations > Upgrade and Migration section > Convert license type. Enter the new product key and a timer job will be scheduled and once the job completes, the product key should be updated.

This site gives a better picture

To know the Site Defenition used for a site

To view the site defenition (onet.xml) which was used to create the sharepoint site, you could do by using RPC.
Append /_vti_bin/owssvr.dll?Cmd=GetProjSchema to the end of the url of your site to get it.
Example: http://myserver/sites/mysites/_vti_bin/owssvr.dll?Cmd=GetProjSchema

Hosting Video on SharePoint 2007

Its pretty Simple and Sleek creating a Video on your Home Page in Sharepoint 2007 . All you need to do is this to

1. Add a Content Editor WebPart on your Page.
2. Go to Edit > Modify Shared WebPart , Click on Source Editor add this Code

1. CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" is the class id for Windows Media player.
2. URL will point to the location of the file. Upload this file to document library and put the URL for that file.
3. autoStart specifies value indicating whether the current media item begins playing automatically.
4. uiMode specifies which controls are shown in the user interface.
Possible values: invisible, none, mini, full.
5. PlayCount specifies the number of times a media item will play. Minimum value of one. Enjoy SharePointing.....

Determining the Current User Context inside Sharepoint

What's the best way to determine the current user within a custom web part developed for MOSS 2007? I've found four solutions so far, but I'm pretty sure there are more:
1. Use System.Web.HttpContext.Current.User.Identity.Name, like in any ASP.Net web application
2. Use System.Security.Principal.WindowsIdentity.GetCurrent().Name
3. Have the Current User Filter send the current user to your web part, and (of course) make your web part a consumer of that value.
4. SPWeb web = SPControl.GetContextWeb(Context); SPUser currentUser = web.CurrentUser;

StsAdm Path

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN

Getting 404 on Peopleresults.aspx

Trying to setup a people search. I noticed there was a web-part forthis, I've added it to my main page but when I search for something Igot a 404 not Found on peopleresults.aspx.
In sharepoint 2007 it will throw 404 if by default if you have not created a site
with Search Center Template. Create a new sitecollection and in the Template
select Enterprise -> Search Center template (with Tabs or regular).
Once you have the site create you will just select People Search Webpart
Edit -> Modify Shared WebPart and in the Miscellaneous section change theTarget search results page URL to /sites/SearchCenter/results.aspx.Where i have created "searchcenter" i createde it under "sites", try to search after
that guess it will work..


Windows SharePoint Services Overview

Windows SharePoint Services allows teams to create Web sites for information sharing and document collaboration, benefits that help increase individual and team productivity. Windows SharePoint Services is a component of the Windows Server 2003 information worker infrastructure and provides team services and sites to Microsoft Office System and other desktop programs. It also serves as a platform for application development. Including such IT resources as portals, team workspaces, e-mail, presence awareness, and Web-based conferencing, Windows SharePoint Services enables users to locate distributed information quickly and efficiently, as well as connect to and work with others more productively.
How Windows SharePoint Services Works
Windows SharePoint Services sites take file storage to a new level, providing communities for team collaboration and making it easy for users to work together on documents, tasks, contacts, events, and other information. In addition, team and site managers c…

SharePoint Product Key .

Here's Sharepoint Product Key i used

Product Key :

SharePoint Installation 2007

In this post, I'll demonstrate with words and screen shots how to install and get working a portal using Microsoft Office SharePoint Server 2007. Installing this product is not difficult, but it does require some forethought and planning. You can use this post as a reference for getting your version of MOSS 2007 installed.
You need to have downloaded the software from Microsoft's site. For information on how to do that, please go here. Once you have registered and downloaded the software, you're ready to start.
First, you'll need Windows 2003 Server, fully patched and ready to go. I believe I've seen blog postings recently that indicate that you can install MOSS07 on a Vista server. I'll leave that discussion for other threads and posts.
Once you have the operating system ready to go, you'll want to start by running the setup.exe for MOSS 2007. Figure 1 illustrates that after you start the installation process, you'll need to enter a valid product identifi…

What is SharePoint 2007 ?

Microsoft Office SharePoint Server 2007 is a new server program that is part of the 2007 Microsoft Office system. Your organization can use Office SharePoint Server 2007 to facilitate collaboration, provide content management features, implement business processes, and supply access to information that is essential to organizational goals and processes.
You can quickly create SharePoint sites that support specific content publishing, content management, records management, or business intelligence needs. You can also conduct effective searches for people, documents, and data, participate in forms-driven business processes, and access and analyze large amounts of business data.
Microsoft Office SharePoint Server 2007 Capabilities
Microsoft Office SharePoint Server 2007 provides a single, integrated location where employees can efficiently collaborate with team members, find organizational resources, search for experts and corporate information, manage content and workflow, and leverage b…