Online Training On SharePoint

Friday, 25 April 2008

Timer Job in MOSS

Many different types of applications require some variation of a scheduled process to run. These processes are used for complex calculations, notifications, and data validation checks, among many other tasks. Windows SharePoint Services is no exception. To return relevant and timely results to users' search queries, the content within a server farm must be indexed ahead of time. This indexing is performed at scheduled intervals. Another example might be sending nightly or weekly e-mail messages to users who want to be notified when changes occur in a SharePoint list. These scheduled tasks are handled by the SharePoint Timer service, a Windows service that is set up as part of the installation process.
The SharePoint Timer service is similar to tasks that we can create in any version of Windows by using the Task Scheduler application. The major benefits of using the SharePoint Timer service compared with Windows Task Scheduler jobs is that the timer service knows the topology of the server farm, and you can load balance the jobs across all the servers in the farm or tie them to specific servers that run particular services.
Some changes have been made in Windows SharePoint Services 3.0 to use these services in easier way. First, farm administrators can now see all the registered and timer jobs in a server farm in Central Administration. To do this, on the Operations page, under the Global Configuration section, select Timer Jobs Definitions. In addition to the registered jobs, the Timer Job Status page contains a list of all the jobs and the status and outcome of the last execution of each job.
For creating timer jobs by we create a it by using a single class that inherits from the Microsoft.SharePoint.Administration.SPJobDefinition class. We must deploy the assembly that contains this class to the global assembly cache (GAC). Then we must deploy, or install, the timer job into the server farm.

Thursday, 24 April 2008

Recycle Application Pool not IIS

So many things in SharePoint require us to recycle the W3WP.EXE process running SharePoint in order for certain changes to be picked up. So many people think this means recycling IIS by typing IISRESET. But it takes so long for IIS to recycle!

Did you know, you don't have to recycle IIS most of the time, just the application pool our site is running within? Yes, for development purposes, we can run all SharePoint sites off the same app pool. We know, not the most secure, but each app pool consumes roughly 100MB of memory so why have a ton of them floating around in a virtual machine when memory is precious!

Instead of recycling IIS, we can create a shortcut that we can add to Quick Launch that recycles the app pool all sites run under. To do this, create a new shortcut on your desktop and enter the following target: %windir%\system32\cscript.exe c:\windows\system32\iisapp.vbs /a "[Name of your App Pool]" /r

Then drag the shortcut onto your Quick Launch toolbar. Click it and watch how fast an app pool is recycled compared to IIS!

Wednesday, 23 April 2008

Changing the Port number for Central Administration

We can change the port number for Central Admin with the following STSadm commnd
Stsadm –o setadminport –port 5555
This command will change SharePoint Central Administration v3 to run on port 5555.

Tuesday, 22 April 2008

Developer Screen Casts

Some very good Developer Screencasts on SharePoint by Microsoft:

Create an ASP.NET Web Part project from scratch and get it up and running within a Windows SharePoint Services 3.0 site.
Building ASP.NET Web Parts for Windows SharePoint Services 3.0

Create a custom page layout using the Web Content Management features of SharePoint Server 2007.
Creating a Custom Page Layout with SharePoint Server 2007

Use Visual Studio to create a custom feature and an associated assembly DLL.
Creating and Testing Features with Windows SharePoint Services 3.0

Create user-defined content types using inheritance, and then configure a document library to use these content types.
Creating and Using Content Types in Windows SharePoint Services 3.0

Create a list item receiver class to handle both synchronous events as well as asynchronous events.
Creating and Using Event Handlers in Windows SharePoint Services 3.0

Create and reuse site columns across the sites within a site collection.
Creating and Using Site Columns in Windows SharePoint Services 3.0

Discover the integration that exists between Document Information Panels and content types in
Windows SharePoint Services 3.0.
Creating Custom Document Information Panels

Create an add-in for Excel 2007 and then customize the application-level custom task pane.
Creating Custom Task Panes in Visual Studio Tools for Office "v3" June CTP

Build a custom workflow using the SharePoint Designer wizard.
Creating Custom Workflows with the SharePoint Designer 2007

Leverage the new built-in features for creating sites with blogs and wikis.
Creating Windows SharePoint Services Sites with Support for Wikis and Blogs

Understand the difference between page templates and page instances, and then learn how to customize your pages.
Customizing a Windows SharePoint Services 3.0 site with the SharePoint Designer 2007

Create an add-in for PowerPoint 2007 to customize and modify the ribbon.
Customizing the Ribbon with Visual Studio Tools for Office "v3" June CTP

Create a shared add-in with Visual Studio 2005 that extends the new user interface with a custom ribbon.
Extending the Office 2007 UI with a Custom Ribbon

Create a shared add-in with Visual Studio 2005 that extends the new user interface with a custom task pane.
Extending the Office 2007 UI with a Custom Task Pane

Generate, read, and modify documents without going through the object model of the hosting Office application.
Generating Office Documents using the New Open XML File Formats

Configure Excel Services so that you can publish an Excel spreadsheet to a Windows SharePoint Services 3.0 site.
Getting Up and Running with Excel Services

You may also interested to see Videos On SharePoint Designer

SharePoint Designer Videos

Here are some very good videos on SharePoint Designer. SharePoint Designer has replaced the Front Page and can be used to do intermediate level of customization. For advanced level of customization we need the help of VS.
Intro to SharePoint Designer:
Customize SharePoint Sites:
Create and Modify Layout Pages:
Create and Modify rules based workflow applications:
Build Composite no-code SharePoint Application:
Visual Studio Integration:

Display data from multiple sources in a single Data View

You may also interested to see Developer Screen Casts

Attempt a Question on SharePoint Designer

Monday, 21 April 2008

Dynamically Changing Master Page

In MOSS we can change the Master Page dynamically based on conditions. This helps when we need to solve the problems like:

1. Chaning the Master page for a particular browser.
2. Changing the Master Page for a particular set of users.

The following code programmatically switch to the Pocket PC friendly master page when a "Windows CE" (pocket pc) browser is detected. In the following code, the master page, pocketpc.master, changes the layout, hides some of the content and references a CSS file with fonts and layout which are better suited for the smaller form factor of a pocket pc.

protected void Page PreInit(object sender, EventArgs e) {
if(Request.Browser.Browser.ToLower.Contains("windows ce")){
this.MasterPageFile = "~/pocketpc.master";
else {
this.MasterPageFile = "~/MasterPage.master";

For second problem we can find the users with the help of SPUser class and then assign the Master Page.

Friday, 18 April 2008

Introduction to important DLL required to work with SharePoint/MOSS

Here is the description for some important DLL required to work with MOSS.
Microsoft.SharePoint.Publishing: This is the Publishing DLL. All the functionality from CMS 2oo2 has been brought with this DLL into MOSS. Also some new functionality has been added into this.
Microsoft.Office.Server: This DLL is available only with MOSS and will not be available with WSS. Includes overlapping functionality with Microsoft.SharePoint.dll but with some refinement. It also includes functionality specific to MOSS such as BDC, reports, etc.
Microsoft.Office.Policy/Microsoft.Office.Workflow: These DLL helps for the Document Life Cycle part of the and for document management and workflows.
Microsoft.SharePoint.Search: this is the Search functionality corresponding to WSS Search.
Microsoft.SharePoint.* : traditional namespaces from v2 with added classes and method references.

Thursday, 17 April 2008

Steps to create a Layout Page

First Lets see what are Page Layouts:

1#.Page layouts are templates that define content structure for a page and are always associated with a content type.
2#.A content type contains a document template, data columns, workflows, and other information that completely define a document.
3#.The publishing feature of MOSS uses a single root content type for publishing called Page.
4#.All of the page layouts inherit from this base. Here’s how to create a new page layout in MOSS.

Now lets see the steps to create the Page Layouts:

STEP 1: Define Site Columns
The individual content elements that appear in a page layout are derived from site columns. When you create a page layout, you can use any of the site columns already defined or define your own.

STEP 2: Define a Content Type
Page layouts have a direct relationship to a content type defined within the site. The content type is a collection of site columns, a page template, workflows, and other information that determine the appearance and behavior of a page layout. In order to create a page layout, you must create a new content type that derives from the existing Page content type. Inheriting the Page content type allows the new page layout to function correctly within the MOSS content management Feature.

STEP 3: Create the Page Layout
Page layouts are stored in Master Page and Page Layout Gallery. From this gallery, you can create a new page layout and associate it with a content type.This process makes the site columns that are defined for the content type available to the page layout as field controls that you can place on the page with the SharePoint Designer.

STEP 4: Edit the Page Layout in SharePoint Designer
Once you have created the new page layout, you must open it in the SharePoint Designer so that you can add the desired field controls. The site columns you defined as part of the content type become available in the SharePoint Designer as field controls that you can place on the page layout.

STEP 5: Publish the New Page Layout
Once the page layout is created, you must publish and approve it so that it becomes available for content authors. This process is essentially the same as publishing any item in MOSS. First the document is checked in, then it is published, and finally it is approved.

STEP 6: Create a New Page
Once the page layout is published and approved, content authors may use it to create new pages. This is done in the normal way by selecting the Create Page item from the Site Actions menu. After the page is created, the field controls may be edited to develop the actual page content.

Try a Question on Page Layouts

Or Try a Question on Page Layouts and Content Type

Introduction to Content Type in MOSS

Content Type Definition: A content type is a reusable collection of settings we want to apply to a certain category of content. Content types enable us to manage the metadata and behaviors of a document or item type in a centralized, reusable way.

Problem that can be solved with Content Type: Suppose we want to store two entirely different kind of documents such as software specifications and legal contracts in the same document library. The metadata we would want to gather and store about each of these document types is also very different. In addition, we want to assign very different workflows to the two types of documents.

Solution with the content Type: Content types enable us to store multiple different types of content in the same document library or list. In the preceding problem statement, we could define two content types, named Specification and Contract. Each content type would include different columns for gathering and storing item metadata, as well as different workflows assigned to them. Yet items of both content types could be stored in the same document library.

Content Type Settings:
We can further extend content type functionality by using them to assign additional settings, such as workflows, or even custom attributes, to items.
A content type can include the following information:
· The metadata, or properties, you want to assign to this type. These are represented by columns added to the list or document library when you add the content type. Only site columns can be added to a content Type.
· Custom New, Edit, and Display forms to use with this content type.
· Workflows available for items of this content type. These can be defined to start automatically based on a selected event or condition, or through user selection.
· For document content types, the document template on which to base documents of this type.
· Any information necessary for custom solutions associated with this content type. We can store this information in the content type as one or more XML documents.

Content Type Creation:
We can create column and content types in three ways:
· Using the Windows SharePoint Services user interface
· Using the Windows SharePoint Services object model
· Deploying a Feature that installs the content type based on an XML definition file.

Here we need to be careful while selecting the above described methods to deploy the Content Type. Basically when a new content type is created and added to the root site’s gallery, it is made available to be added to any list. Then when that content type is added to the list, the content type is copied to the list and given a new id and a reference to the root site’s content type.
When changes are made to a content type through the SharePoint user interface by adding a column, the user has the option to “Update all content types inheriting from this type”. Selecting yes causes the page to call the SPContentType.Update method to push the changes to every instance of the content type within the site collection.
However, when changes are made to the content type using SharePoint feature infrastructure, the changes are only made to the content type definition, not to all the “children” of that content type.

See the Hierarchy of Content Types in SharePoint here:

You may be interested to see
Hiding/Displaying Content Type with SharePoint Object Model

Attempt Questions on Content Type:
Question on Content Type Creation

Question on Columns in Content Type

Wednesday, 16 April 2008

Ways of moving Site Structure/ Content from one site to another

Web Package (.fwp file): This feature is used when we want to share or reuse Web pages or a site, list, or library structure. With Web packages, we can either package an entire site or choose just the specific pages, lists, or libraries that we want. Web packages are a great way to duplicate site structure, but they cannot include list data, subsites, or security and permissions settings. Also, a Web package can include custom link bars. After we create a package, we can import and deploy the file into as many Web sites as we want. This can be done with the help of Share Point Designer.
Backup and Restore (.cmp file): We use this feature when we want to make a backup copy of an entire site or subsite, or when we want to move an entire site or subsite to another server or location. Unlike Web packages, content migration packages include list data, and we cannot choose to include only specific site elements. some customizations or settings can be lost in the process. For example, the backup file does not include workflows, alerts, and properties stored at the site collection level. The backup file also does not include the Recycle Bin state or objects inside it. To use Backup and Restore, we must have administrator permissions to that site.
Site Template (.stp file): Use this feature when we want to create multiple Web sites that start with the same base content or site structure. For example, we may want all of the subsites created on a site to have a similar site structure, look and feel, and even content. We can do this by saving a site as a site template and adding it to the Site Template Gallery so that anyone can use the site as a template. Unlike Web packages, site templates can include list data if we want. We must have both administrator permissions to the Web site where we want to create the site template and write access to Site Template Gallery.

Attempt a Question on WebPackages: Question on Web Package

Tuesday, 15 April 2008

Anatomy of a Web Page displayed in MOSS

Today we will look how each page in Share Point is created. Each page is build with some basic components.
Each Published Page is based on a Layout Page. A Layout Page is based on a content type. Also these Layout pages references master page.
Following figure shows how the page layout and the Master pages are combined to create a web page in MOSS:
Master Page: A master page in a Share Point site defines the outer frame of each Web page. It determine the look and feel of the site. It contains the features, such as navigation links, that we want all pages in our site to share, and it provides a single place to control all of those features. Typically, a site uses a single master page, although large Internet sites might use more. For example, a corporate Web site that is used to publicize more than one product could use separate master pages so that the content for each product is properly branded. A master page is an ASP.NET file with the extension .master.
There are two types of master pages: site master pages and system master pages. The site master page is used on published Web pages in the site. It is the master page that site users and visitors see when they view published content. The system master page supplies the layout of pages in the site that implement the user interface for commands —for example, Document Library Settings.
Page Layout: A layout page is an Active Server Page Extension (ASPX) page that defines a layout for a type of content page. When a SharePoint site user opens a page in a browser, that page's associated layout page is first combined with the active master page, which supplies the outer frame of the page, and then the contents of the page are rendered in the fields (called field controls) on the layout.
We design layout pages to match the contents of a type of content page. For example, if a content page type has two images, the associated layout page should have fields in which to display both images. We can design multiple layout pages for the same content page. For example, for a page with an image, we may have one "image left" layout page and one "image right" layout page.
Content Place holder: The other core component that is used in a master page file are the Content Placeholders. A Content Placeholder is just that, a location flagged as where content will be inserted. The content is stored in the page layouts. The content placeholders designate where the content from the page layout will be inserted in the master page.
Content Placeholders can be wrapped in HTML code, for example DIV, SPAN or TABLE tags. A good way to think about it is everywhere we would place content that we would like to have customized for each page, insert a Content Placeholder.

Nested Master Page

Master pages can also be nested, an arrangement in which one master page references another as its master. For example, we can have one master page that includes the logo and primary navigation for the site, a second master page that has a two column layout, and a third master page that has a three column layout. Each of the master pages that has a column layout can be attached to the main master page, in order to display the common logo and navigation from that master.

Monday, 14 April 2008

Sharepoint Containment Hierarchy

Windows SharePoint Services logical architecture comprises the following components:
Server farm or single server deployment: The top-level design construct of a Windows SharePoint Services infrastructure is a stand-alone or server farm deployment of Windows SharePoint Services. A stand-alone installation includes Windows SharePoint Services and Microsoft SQL Server® on the same server. A server farm allows the separation of application and database server roles. An enterprise can support one or more Windows SharePoint Services farms. We can administer each server farm as a unit from the shared administrative tools in the server farm’s SharePoint Central Administration site.
Web application: A Web application is a logical component that is associated in a one-to-one relationship with a unique Microsoft Internet Information Services (IIS) Web site. We use the server farm’s SharePoint Central Administration site to manage Web applications.
Database: SQL databases which stores all the information regarding the sites. There are different databases for content, configuration and for search.
Site collection: A site collection is a component that encompasses one or more Windows SharePoint Services sites. We manage some features of site collections by using SharePoint Central Administration, and others from the Site Settings page of the site collection’s top-level site.
Site: Within a site collection, we can create one or more Windows SharePoint Services sites.
Top-level site: The top-level site within a site collection is the site with the URL of the site collection itself. Top-level sites define certain configurations, such as features and templates, that affect all sites within the site collection.
Lists and libraries: Lists and libraries are basically the equivalent of data tables in a database application. Whereas lists can support document attachments, libraries are a type of list in which the document is the focal point, and columns in the list provide metadata about the document.
Items and documents: The records in a Windows SharePoint Services list are called items. A library is a list that contains documents.

Here all these terms are depicted in diagramatic view.

Common tasks done with SharePoint Object Model

1. Fetching all the servers in the Farm (We have to add one more namespace for this piece:
Using Microsoft.SharePoint.Administration):
SPSite _site = new SPSite("http://servername:Portnumber/");
foreach (SPServer _server in _site.WebApplication.Farm.Servers)

2.Fetching all the Site Collection in the Web Application.
SPSite _site = new SPSite("http://servername:Portnumber/");
SPWebApplication _webapp = _site.WebApplication;
SPSiteCollection _sitecollection = _webapp.Sites;

foreach (SPSite _IndividualsiteCollection in _sitecollection)

3.Fetching all the sites in a Site Collection.
SPSite _site = new SPSite("http://servername:Portnumber/");
foreach (SPWeb _web in _site.AllWebs)

4.Fetching all the lists in a Site.
SPSite _site = new SPSite("http://servername:Portnumber/");
foreach (SPList _list in _site.OpenWeb().Lists)

5.Fetching all the items in a list.
SPSite _site = new SPSite("http://servername:Portnumber/");
SPListCollection _listCollection = _site.OpenWeb().Lists;
foreach (SPListItem _item in _listCollection[10].Items)

You may also find interesting to read: Important Classes with SharePoint Object Model & Object Model Hierarchy

Sunday, 13 April 2008

Important Classes with SharePoint Object Model

Here are some of the important classes in the Object Model:

The SPFarm object is the highest object within the Windows SharePoint Services object model hierarchy. The Servers property gets a collection representing all the servers in the deployment, and the Services property gets a collection representing all the services.

Each SPServer object represents a physical server computer. The ServiceInstances property provides access to the set of individual service instances that run on the individual computer.

Each SPService object represents a logical service or application installed in the server farm. A service object provides access to server farm-wide settings of the load-balanced service that a respective service instance implements. Derived types of the SPService class include, for example, objects for Windows services, such as the timer service, search, Microsoft SQL Server, the database service, etc. and also objects for Web services, such as Windows SharePoint Services or services in the Microsoft Office system.

An SPWebService object provides access to configuration settings for a specific logical service or application. The WebApplications property gets the collection of Web applications that run the service.

An SPDatabaseServiceInstance object represents a single instance of a database service running on the server computer. The SPDatabaseServiceInstance class derives from the SPServiceInstance class and thus inherits the Service property, which provides access to the service or application that the instance implements. The Databases property gets the collection of content databases used in the service.

Each SPWebApplication object represents a load-balanced Web application based in Internet Information Services (IIS). The SPWebApplication object provides access to credentials and other server farm wide application settings. The Sites property gets the collection of site collections within the Web application, and the ContentDatabases property collection of content databases used in the Web application. The SPWebApplication class replaces the obsolete SPVirtualServer class; but it can still be helpful to think of a SPWebApplication object as a virtual server; that is, a set of one or more physical servers that appear as a single server to users.

An SPContentDatabase object inherits from the SPDatabase class and represents a database that contains user data for a SharePoint Web application. The Sites property gets the collection of site collections for which the content database stores data, and the WebApplication property gets the parent Web application.

An SPSiteCollection object represents the collection of site collections within the Web application. The Item property or indexer gets a specified site collection from the collection, and the Add method creates a site collection within the collection.
Each SPSite object, despite its singular name, represents a set of logically related SPWeb objects. Such a set is commonly called a "site collection," but SPSite is not a standard Microsoft .NET collection class, in contrast to SPWebCollection. Rather, it has members that can be used to manage the site collection. The AllWebs property provides access to the SPWebCollection object that represents the collection of all Web sites within the site collection, including the top-level site. The Microsoft.SharePoint.SPSite.OpenWeb method of the SPSite class returns a specific Web site.
Each site collection includes any number of SPWeb objects, and each object has members that can be used to manage a site, including its template and theme, as well as to access files and folders on the site. The Webs property returns an SPWebCollection object that represents all the subsites of a specified site, and the Lists property returns an SPListCollection object that represents all the lists in the site.
Each SPList object has members that are used to manage the list or access items in the list. The GetItems method can be used to perform queries that return specific items. The Fields property returns an SPFieldCollection object that represents all the fields, or columns, in the list, and the Items property returns an SPListItemCollection object that represents all the items, or rows, in the list.
Each SPField object has members that contain settings for the field.
Each SPListItem object represents a single row in the list.

You may also find interesting to read: Common Task Done with Object Model

Turning off friendly errors in MOSS

While in development, the friendly error page that SharePoint displays when our page has an error can make debugging master page issues very difficult.
We can make an easy change to the Web config file for the site to turn friendly error messages off, therefore providing us with more useful information if page breaks. Only do the following in a development environment, and we should never want to turn off friendly error messages in a production environment. Also be sure to make a back up of the file prior to editing.
1. On the Web server, navigate to the site directory:Local Drive:\Inetpub\wwwroot\wss\VirtualDirectories\[directory for site]
2. Open Web.config in Notepad.
3. Search for "CallStack". Change the CallStack status to "true".
4. Search for "CustomErrors". Change the mode to "off".
5. Save and close the file.
Now when the site encounters an error, you will receive a .NET screen outlining the issue instead of the friendly SharePoint error screen. This is particularly useful with dealing with missing Content Placeholders and editing Master Pages. To turn friendly error messages back on, just walk through these steps setting the CallStack to false and CustomErrors mode to On.

Different Databases Created with MOSS

Though we don’t need to know the DB structure for MOSS Applications but I just thought to put something on the DB’s created when we configure a Share Point Farm.

These are the two database which got created when we run the SharePoint Products and Technologies Configuration Wizard (The databases are not automatically created when we install the product. The installation just install the binaries.) These are the master databases which stores all the config information for the farm.

· The configuration database (SharePoint_config by default)
· The Admin content database (SharePoint_AdminContent_GUID).

Every Web App has its own Content DB. All site collections which are there in same web app goes into this same content DB or individual site collection can be created into different content DB. See the post how to create Site Collection in different DB in the same web application here: Creating Site Collection in Different Content Database

Database created for an SSP: When we are creating any SSP within a new web app (which is a recommended practice) a new content DB is getting created for the Web App. If we host the ‘My Site’ feature into a new web app, again a new Content DB is created for My Sites. Two more DB’s are created for each SSP. One DB stores the data for the services provided by the SSP and another DB stores the search related data for quicker search performance.

You can also find interesting to read Some Important tables in SharePoint Content DB

Attempt a Question on SharePoint Databases

Saturday, 12 April 2008

Share Point Object Model - Hierarchy

The object model available with MOSS is very rich. All the available functionality through interface can also be implemented with the object model so MOSS makes the dev team very powerful.
In the below diagrams all the major components are listed and the classes associated with that (In most of the case we need to prefix the component name with sp to get the class name.)
Server Architecture & Site Architecture:

Steps to Create first Site collection

If we are given a server with fresh installed MOSS here are the steps that we need to carry out to create our first site collection:
1. Run the SharePoint Products and Technologies Configuration Wizard.
2. Create a Web application to host the SSP.
3. Create the SSP.
4. Configure the Web application and the SSP.
5. Configure services on servers.
6. Create a Web Application to host the site collections and SharePoint sites.
7. Create site collections.
8. Create SharePoint sites.

Friday, 11 April 2008

Answers for the beginner level test

Here are the answers for the questions for the beginner level test (Go to the Test)

1. C

A server farm can consume services provided by an SSP on a different server farm.

2. A,C

Web Application is a empty container for sites. Mulitple site collections can be created inside it. Also in one site collection many sub sites can be created.

3. A

A site column is a reusable column definition, or template, that you can assign to multiple lists across multiple SharePoint sites

4. D

Shared Services (SSP) are part of MOSS. It does not come with WSS and Windows Server 2003.

5. A

The correct sequence is to install OS, SQL Server then WSS service and on top of that MOSS. Although MOSS can be installed without installing WSS as WSS automatically get installed when we install MOSS.

6. B

We can not use Distribution Lists in SharePoint.

7. A

We can not edit Application pages with SharePoint Designer.

8. C

WSS does not provide BDC, Excel Services, User Profiles, Form Services.

9. A,C

A list can have multiple site columns and default columns. Also we can attach multiple content types.


A content type can have only site columns.


SharePoint stores all its List data into the Content DB.


The other web parts mentioned does not support writing Java Script.


To show the data from LOB's we need to use BDC web parts.


We can have different metadata for different content types and then we can attach these to list to support this scenario.


We can upload all the files mentioed irrespective of the default file type.


In MOSS we can specify security setting at list item level.


Recycle Bin can be disabled from the Central Admin and we can configure the time setting from there as well.


To show an external application we can use Page Viewer Web Part.


All other templates comes default with MOSS.


We can have multiple master pages within MOSS.

Tuesday, 1 April 2008

Answer For SharePoint Interview Questions

Looking For Training On SharePoint?I Can help you with Online Training on SharePoint
Drop a Note to Moss Experts
Download the course contents Here
To schedule for a free demo fill the details Here

Here are the Answers for the SharePoint Question provided at
151. A, D
Site workflow can only be started manually and they run against a site but multiple lists can be modified.

150. A, B, C, D
A content Type can consist of all the elements. It can also have Document Information Panel.

149. C, D
Application pages are parsed in direct mode, which just means that they are parsed by the standard ASP.NET page parser. Uncustomized site pages are also parsed in direct mode, but customized site pages, and new pages that are added to the Site Pages gallery, are parsed in safe mode.

148. B, C
The SharePoint assemblies that contain the Silverlight client object model are encased in the .xap file. These assemblies are Microsoft.SharePoint.Client.Silverlight.dll and Microsoft.SharePoint.Client.Silverlight.Runtime.dll.

147. A, C

146. C
To add a new server in the SharePoint Farm we need to have the Passphrase.

145. B
SharePoint 2010 SP1 has intrdocued this feature. This was not available in earlier versions of SharePoint.

144. C
SharePoint can change the pwd for the managed account in Active Directory as well in the Service Configured.

143. D
By default SharePoint site collection uses v4.master. The default.master is MOSS Master Page. Other two options does not exists.

142. A
A service application proxy allows connection between Service Application and Web Application.

141. D
User Profile service is not cross farm capable while Search Service is. BDC Service is Cross Farm Capable and has its own database.

140. B, C
SharePoint 2010 Foundation does not have the User Profile Service and the Standard Version dont have the Access Service.

139. C
The minimum requirment to upgrade to SP2010 is that MOSS needs to be with SP2.

138. A,D
From MOSS to SP2010 upgrade there are only two supported method which are In-Place Uprade and DB Attach.

137. b, c, d

136. c
Site collections are the only objects in SharePoint to which we can apply a storage quota.

135. a, d
We need to set the NLB in a SharePoint Farm to a persistent or sticky session or single affinity, so that when a user opens a browser and navigates to SharePoint their entire session must be against one WFE. Also the for the Service application no load balancing is required as SharePoint handles that internally.

134. a
All other options are not correct. SharePoint 2010 can only be installed with 64 bit of SQL Server. The 64-Bit editions of SQL Server that are supported are SQL Server 2005(Service Pack 3 plus cumulative update package 3), SQL Server 2008 (Service Pack 1 plus cumulative update package 2), and SQL Server 2008 R2

133. a,c

132. b

131. C
The WSP stands for Web Solution Package.

130. D
WSP Files are stored in the Config DB.

129. A
Site events can be triggered at site level events such as site creation or deletion.

128. A, C
Visual Studio 2010 provides the capability to open the WSP Packages and also WSP enables deployment of features across multiple Servers in SharePoint farm

127. C, D

126. A, C
With LINQ the data is early binded and also it is a standard query of accessing data.

SPMetal is used to create the LINQ Queries.

124. B

123. A,D

122. C
We need to use SPGridView control to access the data.

121. B, C
SharePoint 2010 runs on ASP.NET 3.5 and also runs only 64 Bit S/W.

120. C
We need to use external list to show the data from BCS.

119. D
Visual Web Parts can be developed/deployed using VS2010 and they are esentially ascx controls.

118. A, C, D
Standard Web Part dont offer the design surface in VS2010

117. A, C

116. B, D

115. C

114. A, B, C, D
Any of these data sources can be consumed by the Data View Web Part with SharePoint 2007.
113. D
When we save a site as a template it does not inlclude Alerts, Security Settings and any personilazation to a web part page.

112. A, D

111. B, D

110. A, B, C
The _layouts pages are served only from File System.

109. A, C

108. B, C

107. A, B, D

106. A, B, D

105. A, B, C, D

104. B, C
SystemUpdate method updates the database with changes made to the list item, without effecting changes in the Modified or Modified By fields. Events are triggered and the modifications are reported in the Change and Audit logs, but alerts are not sent.

103. A, B, C

102, A, C , D

101. A, B, D

For detailed explanation for Questions 101,102 & 103 see the presentation on Content Deployment
100.A, B

99. A, B

Managed Properties is the collection of Crawled Properties and it can be used in SharePoint Search Scopes.

98. A, B, D
Managed Path can not be defined at the farm level. They are defined at web application level. All other statements are correct.

97. A, D

Assemblies can be deployed to GAC or Web Application Bin

96. C, D

The Business Data Action and Excel Web Access are not available in Standard Version of SharePoint. These WebPart comes only with the Enterprise Version of SharePoint.

95. A,C

With WSS Content Query Web Part and RSS Web Part are not available.

94. B, C

With Solution upgrade we can not deploy new feature and can not not change the scope of the existing feature.

93. A, B, C, D

The Scope for a feature defines the context in which it can be activated and deactivated. The feature we are creating has a scope equal to Web, which means it can be activated and deactivated. within the context of the site. If we assign a Scope value of Site, our feature will then be activated and deactivated within the scope of a site collection. The two other possible scopes
for defining a feature are WebApplication scope and Farm scope.

92. B

The solution manifest always called manifest.xml is stored at the root of a solution file. This file defines the list of features, site definitions, resource files, Web Part files, and assemblies to process.

91. C
List Template are used to take the back up for the list.

See the other methods of moving the data in SharePoint:

90. B, C
Only single line of text and calculated columns works as a lookup column.

See the detailed explanation at:

89. A, C
STSADM Commands are used to do the Admin tasks as well we can take the backup with these commands.

88. C
Page Layouts are used to get a structure for the Pages.

Detailed instructions to create Layout Pages are here:

87. A
SharePoint Object model can be accessed from the machine it is installed.

86. A
To use SharePoint object model we need to add the reference of Microsoft.SharePoint.

Some more useful info on SharePoint Object model at:
Object Model Hierarchy:
Important Classes with Object Model:
Common tasks done with Object Model:

85. C
SharePoint Web Services can be accessed irrespective of SharePoint Installation.

84. D
Ghosting was the term used in SharePoint 2003.

83. A
We need to use Infopath in this scenario.

82. C
Alerts need minimum amount of effort and customization to send any mails.

81. A
Page layouts can be created with the SharePoint Designer

80. B
SharePoint Designer workflow can be associated to a single document library.

79. C
CAML queries can be used with SharePoint Object Model.

78. A, C
Asynchronous events occours after the event occurance. So ItemDeleted and ItemUpdated is the correct answer.

77. A, D
There are two base classes that a WebPart which is going to be consumed by SharePoint can inherit from, either the SharePoint WebPart Base class (Microsoft.SharePoint.WebPartPages.WebPart) or the ASP.NET 2.0 WebPart (System.Web.UI.WebControls.WebParts.WebPart) base class. It is good practice to use the ASP.NET WebPart base class since the old base class is meant for backwards compatibility with previous version of SharePoint.

76. C

75. B
Workflows can not be triggered from Site Columns.

74. A, C
Site Templates and Site Definitions are both XML files.
SiteDefinitions files are required to create the SiteTemplate files.

73. C
A server farm can consume services provided by an SSP on a different server farm.

72. A, C
Web Application is a empty container for sites. Mulitple site collections can be created inside it. Also in one site collection many sub sites can be created.

71. D
To modify the content of the Alerts we need to modify the contents in the Alerttemplates.xml file. This file contain the text of the default alerts which SharePoint Server sends.

SharePoint Object Model is provided by MOSS 2007 SDK.

69. D

Document Center site template is not available with WSS.

68. A, B ,C


67. D

To get all the web parts on a sharepoint page we need to append ?contents=1 at the end of URL


66. A, B, C, D

65. B, D

With SharePoint Designer we can create Layout Pages and we can create workflows. We can not edit Application Pages with Designer. Also we can not create Site Columns with the Designer. View Some Videos on SharePoint Designer On:

64. C

63. D

62. A,B,C

Configuration and Admin Content databases are created when SharePoint gets installed. Also Content Database is created for each Web App.

More Details are on:

61. A

We will use SPSecurity.RunWithElevatedPrivileges() to execute some code that has to be run under some higher privileges.Whenever we use SPSecurity.RunWithElevatedPrivileges(), it will execute the code under the context of Application Pool identity.

60. B

You can use the Page Viewer Web Part to display a Web page, file, or folder on a Web Part Page. You enter either a hyperlink, file path, or folder name to link to the content.

59. A, B, C

More Details are on:

58. D

More Details on Content are available on: Introduction to Content Type in MOSS

57. C

More Details on Content are available on: Introduction to Content Type in MOSS

56. A,B,D

Page Layout can be associated with only One & One Content Type.

55. A,D

Page Layout can be associated with only One & One Content Type. Also we can create multiple Page Layout based on a single content type.

54. D

We need to reset the crawl content and start a full crawl.

See Some Basic Terms for Search with SharePoint 2007: Introduction to Content Type in MOSS

53. A, B, C, D

Site templates are saved from within a site as an .stp file that contains a set of all modified files and lists in the source site. The file can also contain content from the source site, such as list items and documents. By default, the maximum size of an .stp file is 10 MB.
In earlier versions of SharePoint Products and Technologies, We could not configure the default maximum size of the .stp file. However, in Microsoft Office SharePoint Server 2007 and Windows SharePoint Services 3.0, We can configure the maximum size by using the following syntax:

STSADM -o setproperty -pn max-template-document-size -pv 20000000

52. B

The WebPartManager control acts as the hub or control center of a Web Parts application. There must be one--and only one--WebPartManager control instance on every page that uses Web Parts controls.

51. A,C

.ddf file is a data directive file and is used when building the SharePoint solution. bundle specifying the source files and their destination locations. The .ddf file contains directives for the makecab.exe to compile and compress various files and turning them into a WSP and this file is passed as a parameter.

Looking For Training On SharePoint?I Can help you with Online Training on SharePoint
Drop a Note to Moss Experts
Download the course contents Here
To schedule for a free demo fill the details Here

50. C

In SharePoint 2007 security can be applied at the item level in list. With this we can have different security settings for different items in a same list.

49. B

Content Web Part is a best choice to use Java Script in Web Parts.

48. D

Reset to Site Definition option is used to restore a site or site page to its orignal site definition.

47. C

46. B,C

SSP provides some common services such as Search, Excel Services to Web App. A web app can consume services only from a single SSP but a SSP can provide services to multiple Web Apps.

45. A,B,C,D

Addsolution adds a solution file to the solution store.

Deploysolution Deploys files related to a solution from the configuration database to individual front-end Web servers in the farm.

Retractsolution Retracts the specified solution’s deployment. The retractsolution operation removes files from the front-end Web server.

Deletesolution Removes a Windows SharePoint Services Solution Package (*.wsp) from the solution store.

44. A, B

The event receiver class of a custom event handler must derive from SPListEventReceiver,SPItemEventReceiver class and override its methods for the event types that are handled.

43. A ,D

See Also:
How to create site collection in a new Content DB

How to create site collection in a specific Content DB

42. D

41. C

40. A, C

There are two mandatory steps to create a feature. Create a folder with the feature name in the location Program Files\Common Files\microsoft shared\Web Server Extensions\12\TEMPLATE\FEATURES and add a feature.xml file in the folder.

We can not use Central Admin to install feature. We need to use Stsadm commands to install the feature.

39. B

In order to retrieve list items from a SharePoint list through Web Services, We should use the lists.asmx web service by establishing a web reference in Visual Studio. The lists.asmx exposes the GetListItems method, which will allow the return of the full content of the list in an XML node.

38. D

IFilters allow the indexer to read different file formats. Without an appropriate IFilter, the file contents will not be indexed, and when we search for those contents, nothing will be found.

37. B, C

See the Hierarchy of Content Types in SharePoint here:

36. B, C

We need to use ItemDeleting event as this event fires when the document is getting deleted. We can not use ItemDeleted as this event fires after the document is deleted. We need to cancel this event so use properties.Cancel.

35. A, B, D

A field type definition: This field type definition is an XML file that contains the information that Windows SharePoint Services needs to correctly render the field, including its column header, on list view pages (such as AllItems.aspx).
A field class: This is a class whose instances can represent particular fields that are based on your custom field type. This class must inherit from SPField or one of the classes in Windows SharePoint Services that derive from it.

34. A, C

SharePoint designer can only be used to create/modify the content stored in the Content DB. Since the Application pages are not stored in the Content DB they can not be modified with the designer. We can create Master Pages with the Designer.

33. B, C , D

The Content Query web part can not be used to fetch the data across multiple site collections.

32. A, B, C, D

To define a workflow Feature and package it in a solution package, you create the following files:

Manifest.xml with a solution GUID defines the layout in the .wsp file and references feature.xml, workflow.xml, and other supporting files

Feature.xml with feature name, description, version, Feature GUID; references workflow.xml

Workflow.xml with workflow name, description, version, workflow GUID, and the strong name of your workflow assembly

Package.ddf (directive definition file) with Makecab.exe instructions on how to package the Feature into the .wsp file; references all relevant files

31. A, D

Best Bet and Scope Managed properties are feature of SharePoint Server search and do not come with WSS search.

30. A, B, D

There is no web part with the name Business Data Column which comes OOB.

29. B

We can define the values in the application definition file which needs to be shown.
Wildcard shows all the values. There is no value like Equal.

28. A, B, C

OOB SharePoint can not index Lotus Notes data. We need to have a Specific Protocol Handler for this purpose.

See some frequently used Search Terms: Frequently Used Search Terms

27. B

The list template id for the generic list is 100.

26. A, D

Content deployment only copies content — Web pages and resources used by the copied pages. It does not deploy programs, assemblies, features, configuration information such as web.config files. When a Web page is deployed, any items in the content database that the page depends on — such as images, style sheets, or layout pages — will also be deployed.

25. A, B, C, D

Following resources can be deployed using Solution in SharePoint:

Site definitions
Feature definitions (with their element manifests and element files)
Web part files (.dwp and .webpart)
Template files
Root files
Code access security policies
Deployment files such as resource files, images, or other helper files.

24. B, C, D

See the details on WebPart Actions

23. A, D

The two files that are used to define a feature are the feature.xml and Elements.xml. The feature XML file defines the actual feature and will make SharePoint aware of the installed feature. It usually identifies the Feature itself and its element manifest file and sets the Feature scope to Web site. Elements.xml file identifies the assembly, class, and method to implement in feature.

22. A, C

Features can only be installed/uninstalled through STSADM commands. But it can be activated/deactivated both through STSADM and SharePoint UI.

21. A, C

20. A, B


Solution needs to be added, deployed, retracted and deleted.

There is no solution removal. The correct command to delete the solution is:
stsadm -o deletesolution -name SampleSolution.wsp


SharePoint 2007 (WSS and MOSS) allows us to easily and safely add and remove modifications to the web.config file with the help of SPWebConfigModification Class.

17. B

16. A, B, D

15. A, C

In SharePoint set up IIS Authenticate a user and then based on the permission given in SharePoint the authorization is done.

14. A, C

There are no Work flow and Form Server role in a SharePoint Farm.

13. A

The number of days to show the New! icon can only be changed from STSADM Commands. We can not do it from Central Admin or from Site Settings.

12. A, C

Site Collection are represented with SPSite and SubWeb are represented SPWeb.

11. B, C

WSS has to have the index and query server on same machine and it can search the external data.

10. B

The correct location to add Microsoft.SharePoint.Dll is Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\ISAPI

9. A

There is no permission with the name Manage List Item in SharePoint

8. D

There is no default Permission level with the name Edit in Microsoft Office SharePoint.

7. B

If we do not want to show these options we need to remove "Use Client Integration Features" permission.

6. A
Once the files are modified by SharePoint Designer they are stored in Content DB.

5. C

In SharePoint 2003 there is no term with the name Virtual Site. The Virtual Server is now become Web Application. In IIS they are called Web Site.

4. A, B, C

3. A

2. A

When a user creates MySite a Site Collection gets created.

1. C

We need to use "Office SharePoint Server 2007 Enterprise Edition" to use BDC functionality.

See the Questions On SharePoint Here
Related Posts with Thumbnails