1. How to deploy wsp?
In Command prompt, navigate to the 12-hive bin folder, then write the command to add the solution
i.e. Stsadm -o addsolution -filename filelocation
Then go to “central administration -> operations” under “global configuration” there is “solution
management” click on that.
Then click on “wsp file name”, and then click on “deploy solution” for deploy it, for retrieve click on
“retrieve solution”, for remove it click on “remove solution” after retrieve it.
2. Explain the Share Point Architecture.
Having 3 layers, like 3 tire architecture
1. WFE- <Front End Web Server>:Here we have share point Installed. We have 12-hive structure & virtual drives.
Here IIS web sites are hosted. Here servers are clustered on & are in synch.
2. Application Layer: Share Point provides different services. This layer provides those services, like my site hosting, user
profile & searching etc. One server can be dedicated to particular service depend upon scalability.
3. Data Base Layer: Here we have SQL server installed. Here content DB is hosted. For moss 2007, it is SQL server 2005.
For Share Point 2010, it is SQL server 2008. Here servers are clustered on & are in synch. * Every
layer has load balancer for control the traffic.
3. How to create a custom feature?
To create custom feature: Create xml file named feature.xml and its manifest file. Save it in a folder and save that folder in 12- hive
To install: Go to command prompt, navigate 12- hive bin folder & run the command.
Stsadm -0 installfeature –filename <filelocation+name>
To Activate: Go to command prompt, navigate 12- hive bin folder & run the command.
Stsadm -0 activefeature –name <name> -URL <URL>
To Deactivate: Go to command prompt, navigate 12- hive bin folder & run the command.
Stsadm -0 deactivefeature –name <name> -URL <URL>
To uninstall: Go to command prompt, navigate 12- hive bin folder & run the command.
Stsadm -0 uninstallfeature –filename <filelocation+name>
4. What is Web part life cycle?
Web Part Life Cycle starts with
• OnInit- to configure the web part.
• OnLoad- to load add controls.
• CreateChildControls- It is use to create controls and set its property.
• LoadViewState- The view state of the web part is populated over here.
• OnPreRender- it is use to change the web part properties.
• RenterContents- it generate the output in html.
• OnUnLoad- to unload the web part.
• Dispose- to free the memory.
5. What is BDC and how it is differ from BCS
BDC (Business Data Catalogue) is use to connect an external database and view it in share point. BCS
(Business connectivity Services) is new in SharePoint2010. Using BDC one can only read from external
Database, but using BCS one can read and write into the external Database.
6. What is the difference between Site Definition and Site template?
1. To create or use site definition you need server admin access, but site template can install from web
UI by site owners.
2. Site definition supports feature stapling, but for site template additional features must be activated in
3. Site definitions are stored in hard disk, but site templates are stored in content DB.
4. Site definition can provision multiple webs, but site templates for single web only.
5. Creating site definition is relatively complex then site template creation.
7. What is CAML?
CALM tends for Collaborative Application Markup Language and is an XML-based language that is used
in Microsoft Windows SharePoint Services to define sites and lists, including, for example, fields, views,
or forms, but CAML is also used to define tables in the Windows SharePoint Services database during
site provisioning. Also used to customize and to develop the SharePoint based sites and features.
8. How WSS 3.0 differs from MOSS 2007?
1. Windows SharePoint Services (3.0) is freely available with Windows Server. Microsoft Office
SharePoint Server (MOSS) 2007 is licensed version. WSS can be freely downloaded from Microsoft site.
2. MOSS 2007 is based on WSS3.0 with some additional features like Enterprise Search, Business Data
Catalog (BDC), User Profile, Excel Services, Single-Sign on, additional Workflows, My site feature etc.
9. What is WebApplication in SharePoint?
1. In SharePoint WebApplication is an IIS website.
2. From Central Admin we can create the web application. Each web application is associated with one
IIS web site.
3. Once the web application is created, we can extend the web application in different zones.
4. For each web application, content database is created.
10. What is a Site Collection in SharePoint?
1. A site collection is a set of web sites.
2. Every site collection has top-level site, created when the site collection is created.
3. There might be multiple site collections in web application and each site collection may have a
multiple child sites.
11. How the WSS3.0 basic installation differs from the advanced installation?
1. When we choose the basic installation, Windows Internal Database (WID), a relational database based
on SQL server technology, is installed for the WSS3.0 databases. This WID has only 4 GB limitations. If we
go for advanced search, WSS 3.0 uses installed SQL server for the databases.
2. When we use basic installation, application pool uses the Local System account.
3. Also once we go for Basic installation, we are unable to add more servers to the farm.
12. What are the zones in SharePoint?
1. Zones provide the separate logical paths of authentication for the same web application.
2. We can create 5 zones for each web application as follows:
d. Internet and
3. Each zone represented by different web sites in IIS.
13. What is the Farm in SharePoint?
1. Farm is a collection of SharePoint servers having the same configuration database.
2. Configuration DB stores all the required information to run the farm.
3. Each farm is administered through a central administration
4. There is only one configuration database per farm.
14. What is SharePoint Delegate Control?
1. With the help of delegate control, we can take any OOB control of SharePoint and replace with our
custom control without any modification in the SharePoint page. So that new custom control
overrides the existing one.
2. So the delegate control provides one of the options to add control (either server control or user
control) on a SharePoint page.
3. This is one of the important features of SharePoint, introduced in WSS v3 and so in MOSS 2007.
4. For example: In master page SearchBox control is included as
<SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox" />
5. The above lines instantiate the delegate control object.
6. This delegate control object uses features to locate the control which is specified in ControlId. So
there must be the features (it includes feature at any scope) which creates and deploys the
15. Why we use the properties.current.web instead of SPContext.Current.web in event receiver?
When we deploy project from Visual studio then we can use the SPContext.Current.web but when we
use the power shell to activate or reactive the feature then we have to use properties.current.web
because there is no access of browser here.
16. Which are default master pages in SharePoint 2010?
V4.master - This is default master page.
Default.master - this is used to support the 2007 user interface
simple.master- it is used for accessdenied.aspx, confirmation.aspx, error.aspx, login.aspx,
reqacc.aspx, signout.aspx & webdeleted.aspx pages.
17. What is the difference between CustomMasterUrl & MasterUrl?
MasterUrl is used to change the layout of all use end pages but CustomMasterUrl is for changing the
layout of admin side pages.
18. How can debugging share point application and timer jobs? With steps?
Steps 1: build application place .dll into gac and reset iis
Steps 2: On the Debug menu, select Attach to Process
Steps 3: select the Show processes from all users check box.
Steps 4: select W3W.exe and OSWTIMER.exe can attach
Steps 5: refresh SharePoint site point break point
19. What is web part? and type
Web Parts are the fundamental building blocks for Share Point user interface, and with them we can
build and integrate many different types of applications. In share point also be create custom web part
using .oscx control
Steps create custom web part
1. Create webpart project copied .oscx control and build application. Place .dll file in GAC .reset IIS.
2. Go 12 hive _layout folder create folder past your .oscx control
3. Go inetpub ->wwwroot->wss->open Your site ->web con fig->create safe control write assembly
information of web part application
4. Open SharePoint site ->site action-site editing->Galleries ->web part->new Add your web part.
Follow few web parts in WSS 3.0
• Content Editor Web Part
• Data View Web Part
• List View Web Part
• Image Web Part
• Members Web Part.
• Page Viewer Web Part
20. What is MOSS?
Microsoft Office SharePoint Server (MOSS) is the full version of a portal-based platform for
collaboratively creating, managing and sharing documents and Web services. In MOSS additional
feature add that cannot in WSS 3.0.
21. What are ways to create input forms for workflow?
1. You can create your forms by using custom application pages, which are standard .aspx pages
deployed to run out of the _layouts directory.
2. Using Microsoft Office InfoPath 2007
22. What are the types of input forms that can be created for a workflow?
You can create four different types of input forms including
1. An association form
2. An initiation form
3. A modification form
4. A task edits form.
23. What are the advantages of SharePoint Portal Services (SPS) over SharePoint Team Services
SharePoint Portal Services (SPS) has MUCH better document management. It has check-in, check-out,
versioning, approval, publishing, subscriptions, categories, etc. STS does not have these features, or they
are very scaled back. SharePoint Portal Services (SPS) has a better search engine, and can crawl multiple
content sources. STS cannot. STS is easier to manage and much better for a team environment where
there is not much Document Management going on. SPS is better for an organization, or where
Document Management is crucial.
24. What is Application page and site page in SharePoint?
Site pages are pages that are created, edited, and customized by end users. They are primarily used for
the content in a site. Site pages come in two types
• A standard page contains text, images, Web Parts, and other elements.
• A Web Parts page contains Web Parts in Web Part zones. They have a predefined layout that
uses Web Part zones.
Both types of site pages are edited using a Web browser or Microsoft SharePoint Designer. Site pages
are provisioned from a template page that is stored on the file system of the front-end Web server. A
site page is customizable by an end user while an application page is not.
Application pages are used to support application implementations in SharePoint Foundation.
Application pages are stored on the file system of the front-end Web server in the
%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\LAYOUTS
directory and exist for every site in a Web application. This folder is mapped to an Internet Information
Services (IIS) virtual directory called _layouts. Every site and subsite will have access to the application
pages by using the _layouts virtual directory.
These are the normal .aspx pages deployed within SharePoint. Most common of them are the admin
pages found in _layouts folder.
1. These are deployed either at the farm level or at application level. If they are deployed within
_layouts folder or global SharePoint Virtual Directory, then they can be used by any SharePoint
application (available at farm level), otherwise they can be deployed at application level only by
creating a virtual directory.
2. These are typical ASP.Net aspx pages and can utilize all of the functionalities available within
ASP.Net including code-behind, code-beside, inline coding etc.
3. These are compiled by .Net runtime like normal pages.
4. Since application pages are compiled once, they are much faster.
5. They can only use master pages available on file-system not within SharePoint Content
Databases and for the same reason, you will notice that _layouts pages can only use Application
master page deployed within _layouts folder and cannot use any of your custom master page
deployed within SharePoint master page library.
6. If you deploy your custom ASPX pages within _layouts folder or within SharePoint application
using a virtual directory, you will not be able to use SharePoint master pages and have to deploy
your master page within the virtual directory or _layouts folder.
7. Application Pages cannot use contents as this concept is associated with SharePoint Page
Layouts not with ASP.Net.
8. Normally application pages are not web part pages hence can only contain server controls or
user controls and cannot be personalized by users.
9. Easiest way to deploy your existing ASP.Net web site within SharePoint is to deploy its pages as
Application Pages within SharePoint. In this way you can convert any ASP.Net web solution as
SharePoint application with minimal efforts.
10. SharePoint specific features like Information Management Policies, Workflows, auditing,
security roles can only be defined against site pages not against application pages.
11. Application pages can be globalized using Resource files only.
1. Site Pages is a concept where complete or partial page is stored within content database and
then actual page is parsed at runtime and delivered to end-users.
2. Pages stored in Pages libraries or document libraries or at root level within SharePoint (Wiki
pages) are Site Pages
3. You must be thinking why we should use such pages? There are many reasons for this. One of
the biggest catch of the SharePoint is the page layouts, where you can modify page once for a
specific content type and then you can create multiple pages using the same page layout with
different contents. In this case, contents are stored within database for better manageability of
data with all the advantages of a data driven system like searching, indexing, compression, etc
and page layouts are stored on file system and final page is created by merging both of them
and then the outcome is pared by SharePoint not compiled.
4. Site Pages can contain web parts as well as contents placeholders, and all of them are stored per
page-instance level within database and then retrieved at run time, parsed and rendered.
5. Another advantage is they are at user-level not at web-application or farm level and can be
customized per site level.
6. Since their definition is retrieved from database, they can utilize master pages stored within
SharePoint masterpages library and merged with them at run time for rendering.
7. They are slower as compared to Application pages as they are parsed every time they are
8. SharePoint specific features like Information Management Policies, Workflows, auditing,
security roles can only be defined against site pages not against application pages.
9. Since they are rendered not compiled hence it is not easy to add any inline code, code behind or
code beside. Best way of adding code to these pages is through web-parts, server controls in
master pages, user controls stored in "Control Templates" folder or through smart parts. If you
want to add any inline code to master page, first you need to add following configuration within
<PageParserPath VirtualPath="/_catalogs/masterpage/*" CompilationMode="Always"
10. To add code behind to SharePoint master pages or page layouts, refer to this MSDN article
11. Since Site pages are content pages, hence all SharePoint specific features like Information
Management Policies, Workflows, auditing, security roles can only be defined against site pages.
12. Variations can only be applied against Site pages for creating multilingual sites.
13. "SPVirtualPathProvider" is the virtual path provider responsible for handling all site pages
requests. It handles both ghosted and unghosted pages requests as shown below:
25. Custom connectable web part
A Web Part connection is a way to pass data from one Web Part to another Web Part and synchronize
their behavior. One Web Part provides the data and Data can be lists, rows, cells, or parameter values,
the other Web Part gets the data.
This walkthrough illustrates the following tasks:
1. Creating an interface to define the string that is being provided.
2. Creating a Web Part by using the Microsoft Visual Studio Web Part item template.
3. Creating a provider Web Part that defines a string.
4. Creating a consumer Web Part that uses and displays the string.
5. Creating a Web Parts page and connecting the provider and consumer Web Parts.
26. asynchronous and synchronous events with example
The primary differences between Synchronous & Asynchronous event handlers are:
1. Synchronous Event Handlers will work before the event is completed while Asynchronous Event
Handlers will fire after the event is completed.
2. Synchronous Event Handlers are mostly used to stop the event from completion in order to validate
few things. It means you can cancel the event using Synchronous Event Handlers while it is not
possible to cancel the event from Asynchronous Event Handlers.
3. Synchronous Event Handlers methods have their method names ending with “ing” while
asynchronous Event Handlers method names will end with “ed”.
• E.g. ItemAdding, ItemUpdating are Synchronous Event Handlers while ItemAdded, ItemUpdated
are Asynchronous Event Handlers methods.
4. Synchronous Event Handlers can be used to Add/Modify the values of list fields while using
asynchronous Event Handlers it’s not possible as it fires after the completion of event.
27. Asynchronous vs. Synchronous Events: The “ing” and the “ed”
As you may have noticed above, there are two events raised for each type of event. The “…ing” event
occurs before the action starts and the “…ed” occurs after the actions ends. “…ing” events occur
synchronously while the “…ed” events occur asynchronously. What does this mean?
• Occur before the event.
• Block the flow of code execution until your event handler completes.
• Provide you with the ability to cancel the events resulting in no after event (“…ed”) being fired.
• Occur after the event.
• Do not block the flow of code execution in SharePoint.
28. How to perform cross-list queries
SPSiteDataQuery class allows you to perform cross-list queries quickly and efficiently, check below E.g.
Spew web = SPContext.Current.Web;
SPSiteDataQuery query = new SPSiteDataQuery();
query.Lists = "<Lists ServerTemplate=\"105\" />";
query.ViewFields = "<FieldRef Name=\"Title\" />";
query.Webs = "<Webs Scope=\"SiteCollection\" />";
DataTable dt = web.GetSiteData(query);
29. What is the Event Receiver base class?
Microsoft.SharePoint.SPItemEventReceiver, is the base class for the Event Receiver.
30. What is the bass class for feature Receiver?
Microsoft.SharePoint.SPFeatureReceiver, is the bass class for feature Receiver.
31. Diff b/w item.attachment.addnow () and item.attachment.add()
If you add an attachment through the AddNow method, the change takes effect immediately in the
database and does not require updating the list item in order to refresh version information
Adds the attachment that is represented by the specified file name and byte array to the list item.
AddNow Adds the attachment that is represented by the specified file name and byte array to the list item
without requiring an update to the parent list item.
32. Update vs. SystemUpdate
For SystemUpdate(Optional Boolean value)
If you are stuck trying to update a field for a document library, please be aware of two things in Sharepoi
nt 2007/WSS 3.0.
1. Even if you are NOT using Checked out/checked in, the document still has a SPCheckOutStatus.ShortT
erm attached to it for a brief period of time. Trying to SPListItem.Update or SPFile.Item.Update at this
point will likely tell you that the file is locked for editing. There is a .checkoutexpires property to check if
you absolutely must wait for the item to be checked back in. (E.g. are they really done with that darn
2. Even if you do NOT have versioning turned on, you are, in fact, working with a new version of the doc
ument. Use SPListItem.SystemUpdate(false) in order to bypass a short term locked document.
Updates the DB with changes made to the list item without changing the Modified or Modified By fields.
SPList list = web.Lists ["myList"];
SPListItem item = list. Items;
item["myField"] = "my value";
This code works perfect for end-user scenarios. It creates automatically new version of list item as
Update method is called. I needed no new versions and therefore this solution wasn’t great help for me.
I found list item’s method SystemUpdate. The following code is same as the previous one but instead of
Update it uses SystemUpdate.
SPList list = web.Lists ["myList"];
SPListItem item = list. Items;
item["myField"] = "my value";
SystemUpdate method avoids SharePoint 2007 to change modified date and modifier fields. Argument
false tells that no new versions are expected.
33. Can I write .CS code to master page
YES. First, create a class file (Microsoft Visual C# in this example) in a Class Library project that inherits
from the Microsoft.SharePoint.Publishing.PublishingLayoutPage class (or System.Web.UI.MasterPage if
you are creating a code-behind file for a master page). You should name this class with the same name
as the file, but it is not required.
34. What are receivers in MOSS?
There are two types of receivers in MOSS; they are Asynchronous and Synchronous Events
35. What is receivers and Type of Event Receiver in MOSS
• Site Level
• List Level
• List Item Level
36. What is the base class to write event handlers?
37. Custom workflow and SharePoint designer workflows diff
In general, the largest difference between the two tools is this:
• Workflow authoring in the Visual Studio 2010 Workflow Designer is performed by a professional
developer, who is creating a workflow template that can be deployed across multiple sites, and
which contains custom code and activities. The developer then turns the workflow template over to
a server administrator for actual deployment and association.
• We can create both sequential workflow and State machine workflow using Visual Studio; however
we can create only sequential workflow using SharePoint Designer.
• Workflow authoring in SharePoint Designer is likely done by someone other than a professional
developer, such as a web designer or knowledge worker who wants to create a workflow for a
specific list or document library. In this case, the designer is limited to the workflow activities on
their ‘safe list’, and the workflow cannot include custom code. The workflow author deploys the
workflow template directly to the list or document library as part of the workflow authoring process
38. How can I add debug in moss, do I need to do any changes in web.config
1. Locate and open the target SharePoint application's Web.config file. By default, it is located in
2. Open the web.config file contained in the virtual directory.
3. Find the following line of code and change the debug attribute to true.
<compilation batch="false" debug="false">
4. To obtain the complete call stack instead of the default error page, Find the following line of code
and change the CallStack attribute to true.
<SafeMode MaxControls="200" CallStack="false" />
5. Find the following line of code and change the mode attribute to off.
<customErrors mode="On" />
Open a command prompt and type iisreset to restart the server.
39. How many Ways I can deploy Webpart
Now you have at least 3 means to deploy the webpart
1. Deployment using CAB files
2. Feature based deployment of a webpart
1) Create manifest.xml file with the <WebPartManifest></WebPartManifest>
2) Create a <xyz>.webpart file with <webParts><webPart></webPart ></webParts >
40. What is feature?
When developing custom business solutions for WSS and MOSS, the first thing you need to do is gain a
firm understanding of features (and I’m not referring to the general feature set). Features are a new
developer-focused innovation that has been added to WSS 3.0. Basically, this provides a mechanism for
defining site elements, which can be automatically activated within the context of a target site or a
target site collection. The element types that can be defined by a feature include list instances, list
types, menu commands, page templates, page instances, event handlers, and workflows. The example I
discuss in this column involves a feature, named OfficeSpaceFeature, which creates a list and a
document library and adds a custom menu item to the standard WSS Site Actions menu, allowing the
user to navigate to a custom application page.
41. How can I add new row in SharePoint using object model code
We have to create the on object for the custom list or to specified liberary.
1. Create the object for list item
a. RequestItem = listItems.Items.Add();
2. Add data to the “RequestItem” object Call the update method to inset ther resord.
42. Item level security, can we provide item level security using SharePoint designer
Yes, Using SharePoint designer only.
43. What is the use of feature.xml and element.xml?
To Create the and deploy the features we need the feature.xml and element.xml files
44. Which base class we have to inherit to develop a custom web part for SharePoint 2007?
• There are two base classes that a custom WebPart can inherit from, either the SharePoint WebPart
Base class or the ASP.Net 2.0 WebPart base class. When inheriting from the SharePoint WebPart
Base class the custom WebPart class will inherit from Microsoft.SharePoint.WebPartPages.WebPart
• When inheriting from the ASP.Net 2.0 WebPart base class your custom WebPart class will inherit
• It is recommended to use the ASP.Net WebPart base class since the SharePoint WebPart base class
is older one and is meant for backwards compatibility with previous version of SharePoint.
• However there is an exception as the SharePoint WebPart base class provides following additional
capabilities over ASP.Net WebPart base class:
1) Cross page connections
2) Connections between Web Parts that are outside of a Web Part zone
3) Client-side connections (Web Part Page Services Component)
4) Data caching infrastructure
45. What is the difference between .net web part and SharePoint web part
Following are the options for Web parts:
1. Custom ASP.NET 2.0 Webpart
2. SharePoint based web part
3. Custom ASCX Control within a web part
Design Considerations for Web part
2. Deployment in GAC/Bin folder
3. Interconnection between web parts
4. Easy Customizability of web part
5. Customization of webpart Layout at runtime
6. AJAX Type Controls in a webpart
Create a Custom ASP.NET WebPart
Create a SharePoint-based WebPart
ASCX Control in Webpart
• To distribute your Web Part to
sites that run ASP.NET 2.0 or
• When you want to reuse one or
more Web Parts created for
ASP.NET 2.0 sites on SharePoint
use data or functionality
provided by Windows SharePoint
Services 3.0. For example, you are
creating a Web Part that works
with site or list data.
• When you want to migrate a set of
Web Parts using the SharePointbased Web Part infrastructure to
Windows SharePoint Services 3.0.
create cross page connections.
• To create connections between Web
Parts that is outside of a Web Part
• To work with client-side connections
• To use a data-caching infrastructure
that allows caching to the content
• Development speed
• Full Programming support
• Deployment (Multiple DLLs)
Web parts can be Created/Customized using Windows SharePoint Designer and Visual Studio. Product
group recommendation is to use ASPX based Webparts as far as possible. You should create ASP.NET 2.0
Web Parts whenever you can. However, there are a few exceptions where using SharePoint-based Web
Parts might offer advantages. The following table provides a decision matrix to help you choose the best
option depending on your business needs.
Create a custom ASP.NET 2.0 Web Part
Create a SharePoint-based Web Part
• For most business needs.
• To distribute your Web Part to sites that run
ASP.NET 2.0 or SharePoint sites.
• When you want to reuse one or more Web
Parts created for ASP.NET 2.0 sites on
• To use data or functionality provided by
Windows SharePoint Services 3.0. For
example, you are creating a Web Part that
works with site or list data.
• When you want to migrate a set of Web Parts using the
SharePoint-based Web Part infrastructure to Windows
SharePoint Services 3.0.
• To create cross page connections.
• To create connections between Web Parts that is
outside of a Web Part zone.
• To work with client-side connections (Web Part Page
• To use a data-caching infrastructure that allows caching
to the content database.
SharePoint Services namespaces:
Dot Net namespaces:
46. What does AllowUnsafeUpdates do?
If your code modifies Windows SharePoint Services data in some way, you may need to allow unsafe
updates on the Web site, without requiring a security validation. You can do by setting the
47. What does RunWithElevatedPrivileges do?
The RunWithElevatedPrivileges method of the SPSecurity class is used to execute the given method with
full control rights. However, if a user does not have full control rights, it still executes the given method
with full control rights.
The secure Code object can be created from any method that is parameter less and returns void. For
example, the CodeToRunElevated delegate of the SPSecurity class. It is also possible to bypass using the
CodeToRunElevated delegate by defining an anonymous method inside the call to
Assume that you have a Web Part in which you want to display information obtained through the
Windows SharePoint Services object model, such as the name of the current site collection owner, usage
statistics, or auditing information. These are examples of calls into the object model that require siteadministration privileges. Your Web Part experiences an access-denied error if it attempts to obtain this
information when the current user is not a site administrator. The request is initiated by a nonprivileged
user. You can still successfully make these calls into the object model by calling the
RunWithElevatedPrivileges method provided by the SPSecurity class.
48. What is the performance impact of RunWithElevatedPrivileges?
RunWithElevatedPrivileges creates a new thread with the App Pool's credentials, blocking your current
thread until it finishes.
49. Default permissions in MOSS
SharePoint groups and individual users can be assigned permissions within SharePoint sites. When users
are added, they are tithe assigned to a SharePoint group or granted rights through direct permission
level assignments. Permissions are role-based on the following permission levels:
1. Full control--Has full control.
2. Design--Can view, add, update, delete, approve and customize.
3. Contribute--Can view, add, update and delete.
4. Read--Can view only.
5. Limited access--Can view specific lists, document libraries, list items, folders or documents when
6. Approve--Can edit and approve pages, list items, and documents.
7. Manage hierarchy--Can create sites and edit pages, list items, and documents.
8. Restricted read-- Can view pages and documents, but cannot view historical versions or review user
Allows access to shared resources in the Web
site, so that the users can access an item within
the site. Designed to be combined with finegrained permissions to give users access to a
specific list, document library, item, or
document, without giving them access to the
entire site. Cannot be customized or deleted.
Permissions included by default
· View Application Pages
· Browse User Information
· Use Remote Interfaces
· Use Client Integration Features
Members of this group can view pages, list items,
and documents. If the document has a serverside file handler available, they can only view the
document by using that file handler.
· Limited Access permissions
· View Item
· View Versions
· Create Alerts
· View Page
Allows read-only access to the Web site.
· View Only permissions
· Open Item
Can create and edit items in the existing lists and · Read permissions
· Add Items
· Edit Items
· Delete Items
· Delete Versions
· Browse Directories
· Edit Personal User Information
· Manage Personal Views
· Add/Remove Personal Web Parts
· Update Personal Web Parts
Can create lists and document libraries and edit
pages in the Web site.
· Contribute permissions
· Manage Lists
· Override Check Out
· Approve Items
· Add and Customize Pages
· Apply Themes and Borders
· Apply Style Sheets
Allows full control of the scope.
50. Can I create custom permission in MOSS
Yes we can create custom permission in MOSS.
51. What are the default workflows in MOOS
52. Blog and wiki diff
1. A blog is like a diary or journal, with entries that are arranged in the order in which they were
created. A wiki, on the other hand, contains shared content that doesn't appear in chronological
order. The type of information you want to put on your site will help determine whether it appears
in a wiki or in a blog.
2. Blogs are best for news. Entries appear in the order in which they were created, with the most
recent entry appearing first. Only the most current entries appear on the main page of the blog.
Older entries are still available, and can be found and viewed by searching or navigating using the
3. Wikis are best for group collaboration and research. Wiki pages can easily link to each other. When
you create new wiki pages, they are instantly available for searching and for other pages to link to.
53. How can I import excel data to SharePoint? Or How can we publish excel in to MOSS
Using the “Publish/Excel Service “option available in the Excel file.
54. EnsureChildControls what is the use? If we don’t use what is the problem? Is it necessary?
• Determines whether the server control contains child controls. If it does not, it creates child
This method first checks the current value of the ChildControlsCreated property. If this value is false,
the CreateChildControls method is called.
• The EnsureChildControls method is typically used in composite controls, which are controls that use
child controls for some or all their functionality. The EnsureChildControls method is called in order
to make sure that child controls have been created and are ready to process input, to perform data
binding, or to perform other tasks.
How to configure LDAP and AD in SharePoint
What is document library?
• A folder where a collection of files is stored and the files often use the same template.
• Each file in a library is associated with user-defined information that is displayed in the content
listing for that library.
• Document library is used for collaborating on documents with support for versioning, check-in and
check-out, and workflow.
• Includes support for deep integration with Microsoft Office.
What is the max size of the file we can upload in SharePoint?
We can attach 27 MB at a time to the custom list.
Can I upload a video file in Doc lib
Yes, it will support all most all the files except 90+ odd extensions.
Ex: ".asmx", ".asp", ".bat",".chm", ".class", ".cmd", ".com", ".config",
".dll", ".exe", ".vb" etc…
59. Can I scan a file in SharePoint while uploading
Yes, WE can scan we have configure on service in the Central Admin
60. What is site and site collection
Web applications are what Windows SharePoint Services uses to hold site collections. Every site
collection has to reside in a web application, although a web application can contain many site
What is Site
• Site is a collection of web pages which is used to store information in organized way.
• Site stores list of documents, discussion, events, task and many other types of information.
• Site provides controlled access to share information among user. i.e. Only Authorize users are
allowed to access shared information.
What is Site Collection
• Site Collection is collection of SharePoint site. I.e. SharePoint site collection is logical grouping
of multiple SharePoint site.
61. What is the use of InfoPath
Electronic XML sheet for fast development. Easy integration with SP
62. What is client object in SP 2010
The Client Object Model (OM) is a new programming interface for SharePoint 2010 where code runs on
a user’s client machine against a local object model and interacts with data on the SharePoint Server.
client applications for SharePoint easy.
63. How to integrate .net application in SharePoint? How to solve authentication and UI issues?
Yes, We can.
Check your .net application is .net 2.0 or more.
If you have user controls in your application then it's easy to integrate with .net. If you have custom
controls then you have to think about it.
64. Authentication: once you login to SharePoint your AD account will use, for there whenever you try to
go to .net application pass your AD
Details in the encrypted mode to .net application .net decode that details and use it.
65. User control and custom control diff.
Custom control is like executable file we can use across the application. User control we can use in one
66. What is SQL vulnerability
67. What is Records Management Feature: Auditing
Audit policies can be configured for documents and items in Office SharePoint Server 2007 to specify
which events will be audited for each Content Type, via the Information Management Policy capabilities
mentioned in our earlier posts.
Audit policies can be configured to automatically record user actions that affect the lifecycle of
document & record content, such as when items are edited, viewed, versioned, published, and deleted.
Additionally, custom solutions built on top of the Office SharePoint Server 2007 can also add relevant
entries to the audit log, such as when an approval workflow is completed.
68. What is Data View Web part?
Data View Web Part is the primary component used for data presentation when building data-driven
Web sites using SharePoint Designer and Windows SharePoint Services.
Data Binding: When working with a Windows SharePoint Services-based site, FrontPage 2003 allows live
views of customer data from a variety of different sources:
• SharePoint Services-based Lists and Libraries
• OLEDB data sources, including Microsoft SQL Server
• XML Web Services
• XML Files
69. What is content type
Content types are a means of encapsulating the data requirements for a category of information. A
content type is a reusable collection of settings you want to apply to a certain category of content.
Content types enable you to manage the metadata and behaviors of a document or item type in a
centralized, reusable way. Content types enable you to store multiple, different types of content in the
same document library or list.
A content type can include the following information:
• The metadata, or properties, you want to assign to this type. These are represented by site columns
added to list or document library when you add content type. For more information, see Columns.
• Custom New, Edit, and Display forms to use with this content type. For more information,
see Custom Information in Content Types.
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 more information, see
For document content types, the document template on which to base documents of this type. For
more information, see DocumentTemplate Element (ContentType).
Any information necessary for custom solutions that are associated with this content type. You can
store this information in the content type as one or more XML documents. For more information,
seeCustom Information in Content Types.
70. What is SharePoint single sign on
Microsoft Office SharePoint Server 2007 provides a default single sign-on (SSO) service for the storage
and mapping of credentials for use in connecting with third-party or back-end systems. Many companies
already have developed an in-house credential storage system or use a solution other than Microsoft
Single Sign-On. Instead of maintaining credential mapping in two places, Office SharePoint Server 2007
provides a mechanism, pluggable SSO, to specify an alternate SSO Provider to the standard SSO Provider
in Office SharePoint Server 2007.
Replacing the default SSO Provider, SpsSsoProvider, in Office SharePoint Server 2007 involves
implementing the Microsoft.SharePoint.Portal.SingleSignOn.ISsoProvider, installing it into the global
assembly cache, and registering the new SSO provider with Office SharePoint Server 2007.
At any time, you can only register a single SSO Provider for Office SharePoint Server 2007. Registering a
new SSO Provider replaces SpsSsoProvider in Office SharePoint Server 2007.
71. How to merge 2 list data?
72. How to delete a document from doc library after 1 month form uploaded date
Define a policy in information management policy.
73. If user having read only permissions , by using elevated if you create a new item in the custom list
using object model code what will be the “created by” column data in the SharePoint
74. Extend web application
From central administration/application management
75. What are the drawbacks of BDC can we update other SQL tables using BDC
Read only mode.
76. How to develop connected web part what is syntax to declare a property in web part
77. What are full trust and partial trust
Fully trusted code is very slippery! Assert is another stack modifier that effectively cancels out the Deny.
But what code is allowed to Assert? Any code that's been granted a Security Permission called Assertion.
And, of course, that includes all fully trusted code. So trying to use a Deny (or a PermitOnly for that
matter) in assembly A to constrain assembly B is pointless if B has been granted FullTrust. To give Deny
some teeth, run it with partial trust.
78. BDC how to config application definition file
Lob system, Properties, Entities
79. Tell me some of the data types which are not support by SharePoint
80. How can you map varbinary in SharePoint
81. To develop a web part which one is good one, .web part or custom control
Having a web part gives the flexibility of the control being added to the site multiple times in different
locations or even multiple times on the same page with different properties.
82. SharePoint pillars
Workspaces, Tasks, Forums, Surveys, Blogs, RSS and Wikis
3. Enterprise Search
4. Web & Enterprise Content Management
Core document management, major and minor versioning, check-in/check-out document locking,
rich descriptive metadata, workflow (via Windows Workflow Foundation), content type-based
policies, auditing, and role-based-access controls at the document library, folder, and individual
5. Forms Driven Business Process
7. Business Intelligence
Web-based dashboards on the macro level, server-based Excel Services and Excel Web
Services API's, line of business application and data repository integration, and more sophisticated
abilities to monitor key performance indicators.
83. SSP use
An SSP by default is a separate web app from the other web apps extended with SharePoint Technology
Used for following:
Search/indexing, my site hosting, profiles (company directory), Audiences (for Targeting content), Portal
Usage Reporting (enhanced Usage reports), Excel Services, Business Data Catalog Configuration.
84. What is Site and Site Collection
What is Site: Site is a collection of web pages which is used to store information in organized way.
Site stores list of documents, discussion, events, task and many other types of information.
Site provides controlled access to share information among user. I.e. Only Authorize users are
allowed to access shared information.
• What is Site Collection: Site Collection is collection of SharePoint site. i.e. SharePoint site collection
is logical grouping of multiple SharePoint site
SharePoint creates a reference to those files in the database tables that define the new site, a process
called "ghosting." The outcome is that the site appears to have its own unique pages, but the pages are
actually shared across all sites that use the same definition.
85. Site Template Vs Site Definition
There are two confusing terms in MOSS 2007, site templates and site definitions. A site template is a .stp
file which contains only the difference of changes from the original site definition. A user who wants to
install a custom .stp file must have a site definition installed from which the .stp file was saved.
A site definition on the other hand is a complete definition with a directory structure containing .aspx
files and an Onet.xml file.
• Is created from the UI by the end user
• Is stored in the content database
To reuse in other site collection you need to download to file system and upload to site
template gallery in new site collection
• There is no way to see which site template a site was created from
Site Definition: A site definition is a group of files that reside on the Web server and that define a
unique type of SharePoint site. Each SharePoint template that appears on the Web Site tab of the new
dialog box is based on a site definition. For example, one site definition defines the Team Site, Blank
Site, and Document Workspace templates, and another site definition defines the Basic Meeting
Workspace, Blank Meeting Workspace, Decision Meeting Workspace, Social Meeting Workspace, and
Multipage Meeting Workspace templates.
• Is created by developer and need server admin access to deploy
• Is stored in the file system (12hive), so you can use a source control system
• Available to all site collections in farm
• Every site is marked with the site definition used to create it
• You can use feature stapling to add features to existing site definitions
86. Site definition and site template? Which case you will select Site definition and site template?
If you have minimal customization in the site you can go for site template. If you have more
customization in the site you can go for site definition, so that you have control on site.
87. What is a SharePoint Sitedefinition?
SharePoint site definitions are the core set of functionality from which SharePoint site are built
from, building from the SiteTemplates directory in the SharePoint 12 hive.
Site definitions allow several sites to inherit from a core set of files on the file system, although
appear to have unique pages, thereby increasing performance and allowing changes that happen to
a site propagate to all sites that inherit from a site definition.
88. What is ghosted (uncustomized) and unghosted (customized)?
Ghosted Page in SharePoint
• Ghosted means that the Site Definition pages have Not been Customized (Ghosted == UnCustomized) and the pages in your Site Definitions run directly from the file system
• A ghosted page is a page in SharePoint website which is not stored in the database instead it
reference to a file which exists in the server’s file system.
• These files are common for all the website/site collection within that SharePoint server, i.e., if you
modify a reference file then that change will reflect in all the websites/site collections within that
SharePoint server automatically. So we can say these reference files are used as template.
• The default master page of SharePoint “default.master” is a well known example of ghosted page.
“default.master” page is located in the directory "C:\Program Files\Common Files\Microsoft
Shared\web server extensions\12\TEMPLATE\Global". If you do some changes in the
“default.master” then this change will automatically reflect in all the websites within that
• To create a new site in SharePoint, a site template is used. Site template contains description of all
the pages, webparts within the pages, master page used, custom lists, etc. for the web site to be
created. You can define a page ghostable in the “onet.xml” file of the site template.
• Ghosted means that when SharePoint creates a new site it will reference the files in the related site
definition upon site provisioning.
Unghosted Page in SharePoint
• Unghosted means that the site has been Customized (Unghosted == Customized). When you
customize a v2 site in FrontPage or a v3 site in SharePoint Designer, or you add custom fields to a
Doc Library, or you customize a site in the UI and then save it as a Template - upload it into a
Template Gallery - and then create sites using that template; then the changes that you made are
stored in the database as a diff and that is referred to as Unghosted (Note that all Unghosted sites
are based on a Site Definition).
All the pages in a SharePoint website which are stored in the content database are referred as
unghosted pages. All the unghosted pages are specific to that SharePoint website only, i.e., changes
done in unghosted pages will not reflect in other websites within that SharePoint server.
If a new website is created with a site template which contains a page defined as “unghostable” in
the “onet.xml”, then that page will be stored in the content database of new website created and
will not reference to the page available in the site template folder.
If a ghosted page is modified in the SharePoint designer, it will become unghosted. For example if a
master page is customized in SharePoint Designer, SharePoint stores a modified version of the
master page in the content database and also it breaks the reference to the “default.master” file on
“C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\Global“.
Unghosted means that the site has been edited with an external editor, and therefore the
customizations are instead stored in the database, breaking the inheritance of those files from the
89. Difference between Content Pages And Application Pages
SharePoint has two types of ASPX pages. One type is the application page, also known as a _layout page.
The other type of ASPX page is a content page, also known as a site page. Each of these page types is
stored in a different location in SharePoint. When developers create custom ASPX pages, they must
decide on the page type.
Content Pages or Site Pages:
• Content pages or Site pages are basically built to display and manage site content. Content pages
can be customized by end users from within the SharePoint user interface or with Microsoft Office
SharePoint Designer. When you create a SharePoint site, many content pages are created
automatically, for example, home page (default.aspx) of the as well as the pages associated with
lists and document libraries, such as AllItems.aspx, NewForm.aspx, and EditForm.aspx, and several
others. Logically all content pages are stored within their SharePoint sites. Physically all the content
pages that have not been customized, also known as un customized or ghosted pages, are stored on
disk on the front-end Web server, while content pages that have been customized, also known as
customized or unghosted pages, are stored in their associated SharePoint content database.
• Content pages do not support in-line server side code under the default security policy enforced by
Windows SharePoint Services. But there is a way to override the WSS settings to allow the in-line
server side code in content pages. You can find these settings in the article adding server side code
blocks to SharePoint custom pages. But even after overriding WSS settings, the in-line server side
code will be supported on content pages only if that content page is not customized.
Application Pages or _layout Pages:
• Application pages or _layout page are basically built for site management activities. Application
pages do not support customization and typically created to allow users to manage settings for lists,
sites, and site collections. Application pages are stored typically in the file system of the front-end
Web server within a directory "c:\program files\common files\Microsoft shared\web server
extensions\12\TEMPLATE\LAYOUTS". settings.aspx, viewlsts.aspx, etc. are few examples of
application pages which you can find in the layouts directory.
• Application pages are available across the server farm which allows these pages to run on any site
collection in the farm. When you create a new SharePoint web application, it creates a new website
in the IIS. If you look at the created website in the IIS, you can see that SharePoint automatically
created a virtual directory name "_layouts" which is mapped to the physical LAYOUTS directory i.e.
"c:\program files\common files\Microsoft shared\web server extensions\12\TEMPLATE\LAYOUTS".
By using this mapping scheme along with some additional processing logic, the WSS runtime can
make each application page accessible within the context of any site in the farm.
An application page, such as settings.aspx, can be accessed by adding its relative path within the
_layouts directory to the end of a site’s URL. For example, you can access the Site Setting page by
using the URL "http://sitename.com/_layouts/settings.aspx".
Application pages, unlike content pages, supports in-line server side code but cannot host
SharePoint features such as dynamic Web Parts and Web Part Zones.
90. Difference between WSS and MOSS 2007?
WSS 3.0 provides the core framework for collaborative development, document/content
management and search capability whereas MOSS is a portal application which sits on top of this
collaborative framework to extend and provide additional features which are not available in core
WSS 3.0 framework. For example Enterprise Search which allows searching across websites and site
collections, the Business Data Catalog, Forms management or Personalization, Excel services,
Document workflow and many more. In other words, MOSS 2007 is superset of WSS 3.0.
There is no need of software licensing for WSS 3.0 as this is an add-on of Windows Server operating
system whereas you need to have license for MOSS 2007 which comes in standard and enterprise
edition, so in nutshell MOSS 2007 requires minimum of upfront investment for software and in
some cases for hardware too where you want have a web farm to balance the increasing load of
your site and SQL cluster to make it highly available.
WSS 3.0 is ideal for small or mid Size Company which has requirement for core features and does
not have budget for additional licensing. MOSS 2007 is ideal for mid or large scale enterprises as it
provides additional features and extended enterprise search capability of searching across websites
and site collections. To help you decide which SharePoint technology is right for you, Microsoft
office online has detailed and compared features of each of this applications, for details click here.
To download the same information in excel, click here.
Windows SharePoint Services v3 Features:
33 Features in WSS v3
Microsoft Office SharePoint Services 2007 Features:
107 Features Added in MOSS 2007*
91. Introduction to SharePoint Features:
One of the major concepts introduced in WSS 3.0/MOSS 2007 is the “Feature”. Feature is a mechanism
for deployment which drastically reduces the complexity of making site customizations and deploying
upgrades on existing SharePoint sites.
Features can be used to package and deploy a set of SharePoint site elements such as pages, list types,
list instances, site columns, content types, event handlers, master pages, page layouts, workflows,
etc. we can also attach a piece of code with Features which executes when that Feature is
SharePoint Feature is a set of XML files which are deployed in the web front end servers and can be
bundled within SharePoint Site Definitions or can be individually activated in the SharePoint sites. All the
features bundled in the Site Definition, are activated automatically when a new site is created using the
respective site definition.
A feature can be developed to implement a specific functionality and installed in the SharePoint web
front end server. Once a Feature is installed in the web front end server, site administrators can activate
or deactivate the feature in a particular SharePoint site to plug or unplug that respectively functionality.
One can find all the available Features within a web front end server at “C:\ProgramFiles\Common
Features can be scoped to the Farm, Web Application, Site, and Web level depending on the purpose of
Capabilities provided by SharePoint Features:
Following are the major capabilities provided by SharePoint Features:
• Pluggable behavior for installing or uninstalling Features within a SharePoint deployment.
• Pluggable behavior for activating or deactivating Features at a given scope within a SharePoint.
• Defined scopes of Features helps in determining where the custom code will run.
• Site administrators can activate/deactivate a Feature from SharePoint site front end.
• Same SharePoint Feature can be reused across multiple SharePoint sites depending upon the
requirement which improves the component reusability.
Each SharePoint Feature essentially has a feature.xml file which describes the title, description, scope,
receiver assembly, associated element manifest files, and other attributes of the Feature. Other than the
feature.xml file, a Feature may also have elements.xml file, image files, .aspx files, .master files, etc
depending on the requirement and the functionality the respective feature is implementing.
Create a custom Feature:
Let’s take an example to add a custom master page and a page layout to a SharePoint site. Following
steps needs to be followed to create a custom Feature to accomplish this requirement:
1. Navigate to the Features directory on your web server: C:\Program Files\Common Files\Microsoft
2. Create a new folder within the FEATURES folder and name it CustomPageLayouts. One can choose the
name of new Feature of his/her choice.
3. Create a folder MasterPages within the CustomPageLayouts folder and paste all the custom master
pages in this fiolder.
4. Create a folder PageLayouts within the CustomPageLayouts folder and paste all the custom page
layouts in this fiolder.
5. Create two xml file and name them feature.xml and elements.xml respectively.
6. Open the feature.xml file and paste the following xml content:
<?xml version="1.0" encoding="utf-8" ?>
<Feature Id=" F62C96CF-79FD-44be-8882-E9BFBD199184"
Title="Custom Master Pages and Page Layouts"
Description="This feature deploys custom Master Pages and Page Layouts"
<ElementManifest Location="elements.xml" />
Feature ID must be a unique GUID. One can create a unique GUID using Visual Studio Tools. Open Visual
Studio and Click on “Tools -> Create GUID”.
7. Open the elements.xml file and paste the following xml content:
<? xml version="1.0" encoding="utf-8" ?>
<Module Name="CustomPageLayouts" Url="_catalogs/masterpage"
<Property Name="Title" Value="Page Layout Title" />
<Module Name="CustomMasterPages" Url="_catalogs/masterpage"
<Property Name="MasterPageDescription" Value="Master page description" />
The above element manifest file containsthe description of one page layout “CustomPageLayout1.aspx”
and one master page“CustomMasterPage.master”. Make sure these two files are present in the
"PageLayouts" and "MasterPages" folder respectively. One can add more mater pagesand page layouts
as per requirement.
(A better way to implement this feature is to make a copy of existing "PublishingLayouts" Feature and
rename it to "CustomPageLayouts", and do the required modifications in the feature.xml and other files
8. Once all the files are saved and placed in the respective folders, the feature is ready to be installed
on the web front end server. Before running the install feature command, reset the IIS (open the
command prompt and run the IISRESET command).
9. Now open a Command Prompt and enter the following cd command to change the directories to
the BIN folder in the 12 hive so you can use STSADM.exe directly:
cd C:\Program Files\Common Files\MicrosoftShared\web server extensions\12\BIN
Now run the following STSADM command which installs the Feature on the web front end server:
stsadm -o installfeature -name CustomPageLayouts
10. Feature has been installed in the web front end server. Now it’s time to activate this Feature on a
particular SharePoint site. We can activate this feature either using the STSADM command or using the
SharePoint site front end:
To activate this Feature using STSADM command, one need to execute following STSADM command:
stsadm -o installfeature -name CustomPageLayouts –URL http://servername:port
To activate Feature using SharePoint site front end, open the site and navigate to the Site Collection
Features settings page (Site Actions -> Site Settings -> Modify All Site Settings -> Site Collection
Features). Locate the new Feature using its title and click on “Activate” button to activate this feature in
the current SharePoint site.
11. Once the “CustomPageLayouts” feature has been activated on a SharePoint site, the associated
master pages and page layouts will be deployed in the SharePoint site. One can verify this by opening
the master page gallery (Site Actions -> Site Settings -> Modify All Site Settings -> Master pages) and
check if these new master pages and page layouts are there or not.
Installing/Uninstalling and Activating/Deactivating Features:
After creating the Feature folder, you can install and activate the Feature through command-line
operations of stsadm.exe, or through the object model. You can also activate a Feature through the user
interface. Installing a Feature makes its definition and elements known throughout a server farm, and
activating the Feature makes the feature available at a particular scope. Similarly deactivating the
Feature makes the feature unavailable at a particular scope and uninstalling a feature removes its
definition and elements from the server farm.
STSADM command to install a Feature:
stsadm -o installfeature -name FeatureFolderName
STSADM command to uninstall a Feature:
stsadm -o uninstallfeature -name FeatureFolderName
STSADM command to activate a Feature:
stsadm -o activatefeature -name FeatureFolderName -URL http://server/site/subsite
STSADM command to deactivate a Feature:
stsadm -o deactivatefeature -name FeatureFolderName -URL http://server/site/subsite
"Site" and "Web" scoped Features can be also added within the "SiteFeatures" and "WebFeatures"
elements respectively in the Onet.xml of a particular site definition. When a new site is created using
this site definitions, all the all the added features will be activated automatically in the newly created
site. But prerequisite for this is that all these features must be installing on that server farm before
creating the site.
92. New Features in Windows SharePoint Services 3.0
Windows SharePoint Services 3.0 (WSS 3.0) is the next version of WSS 2.0, released on 2007, and
Microsoft Office SharePoint Server 2007 (MOSS 2007) is built on top of this. Windows SharePoint
Services 3.0 takes full advantage of Microsoft ASP.NET 2.0 and the core Microsoft .NET 2.0 runtime. WSS
3.0 offers a lot of new features and programmability support. I have consolidated a list of new features
and enhancements in the below section:
Object Model Enhancements:
Windows SharePoint Services 3.0 has greatly extended or modified the object model of existing
Windows SharePoint Services 2.0 namespaces, and added entirely new namespaces for new features,
while all these changes have been made with an emphasis on high backward-compatibility with
Windows SharePoint Services 2.0.
• The object model of the Microsoft.SharePoint.Administration namespace has been completely
refectored to allow for greater extensibility.
• WSS 3.0 introduces Timer Job Service which provides facilities for setting up a timed job that
executes at a definable interval (every minute) or during a certain time period in the hour, day,
week, month, or year. The main objects for the Timer Job service are
Microsoft.SharePoint.Administration.SPJobDefinition and Microsoft.SharePoint.SPWorkItem.
• Recycle Bins, or undelete functionality, is another important new Feature in Windows SharePoint
Services 3.0. This functionality is available in both lists and document libraries and can be accessed
through new types in the Microsoft.SharePoint namespace.
• Property bags are now exposed on several major objects in the Microsoft.SharePoint namespace,
including the SPWeb, SPFile, SPFolder, and SPListItem classes. These and other classes provide a
Properties property that returns a property bag for the specified object, which consists of a hash
table in which values are stored. A call to the Update method on the object persists the values set in
the property bag.
• Windows SharePoint Services 3.0 expands several existing Web services, increasing the number of
methods provided through Lists, Site Data, Users and Groups, Web Part Pages, and Webs Web
services. Both Lists and Webs, for example, now include new methods for content type integration,
and the Lists Web service provides new methods for working with files in document libraries, In
addition, Windows SharePoint Services 3.0 introduces several new Web services, including services
for authentication, copying files, managing security principals, portal search, and directory
management for messaging application synchronization.
Enhancements in Collaboration Workspace:
Key enhancements to Collaboration Workspace in WSS 3.0 can improve the way that we work with
documents and tasks and how we share information with others.
• Send e-mail to a SharePoint site: We can use e-mail to add content to your site, such as
discussion items, calendar events, and documents.
• New site templates and web parts for building Blogs and Wikis sites.
• Support for publishing RSS feeds to receive updates about lists and libraries.
• Get mobile access to a SharePoint list: We can view a list on a mobile device, which helps us to
stay current on team projects and tasks when we are on the road.
• Display data visually using Gantt Chart.
• Improved alert functionality.
• Closer integration with Outlook for better event and task tracking.
Concept of Features:
Windows SharePoint Services 3.0 implements a new concept known as a Feature, which is an end-useroriented container of one or more elements. The Feature is defined in XML format by using
Collaborative Application Markup Language (CAML). Each Feature definition includes a set of XML files.
Many items that were previously contained within a site definition in Windows SharePoint Services 2.0
are now modular and fit separately as an element using Features.
In WSS 3.0, a SharePoint site definition is basically transformed into a list of Features plus layout pages
and master pages. The goal is that any template SharePoint site can be transformed by an administrator
into another template SharePoint site simply by toggling Features on the site and possibly switching the
layout pages and master pages.
Site Columns and Content Type Settings:
A site column is a reusable column definition, or template, that we can assign to multiple lists across
multiple SharePoint sites. When you create a site column, each list that uses this column has the same
definition, and we do not have to do the tedious work of reproducing the column in each list. Site
columns decrease rework and help us to ensure consistency of metadata across sites and lists.
A content type is a reusable collection of settings you want to apply to a certain category of content.
Content types enable you to manage the metadata and behaviors of a document or item type in a
centralized, reusable way. Content types enable you to store multiple, different types of content in the
same document library or list. For example, consider the following two types of documents: business
requirements and design documents. We might want to store documents of those two types in the
same document library, while the metadata we would want to gather and store about each of these
document types would be very different. In addition, we would most likely want to assign different
workflows to the two types of documents. To achieve this, we can define two content types named
RequirementDoc and DesignDoc. Each content type could include different columns for gathering and
storing item metadata, as well as have different workflows assigned to it. Yet items of both content
types could be stored in the same document library.
Enhancements in Lists:
Windows SharePoint Services 3.0 introduces following new list features:
Folders in Lists: Earlier in WSS 2.0, Folders could be created only in document libraries. Now in WSS
3.0, folders are also available in lists. Folders allow more segregation of content within a single list,
adding another level of versatility.
• List Indexing: List indexing allows SharePoint lists to become true data stores, capable of supporting
external applications as well as simple team sites. For example, indexing a list column significantly
improves access to specific items in the list in external requests. In the case of an external
application with hundreds of thousands of records, indexing on columns can greatly improve
performance and make it easier to use a SharePoint list as a storage device.
• Cross-List Queries: Cross-list queries allow us to use the SPQuery object to query all the lists within a
Web site or site collection. In WSS 2.0 we had to iterate through the parent objects to obtain a
collection of list objects, query the lists to return the items, and then build your own collection of list
items from the multiple lists. The SPSiteDataQuery class allows us to perform cross-list queries
quickly and efficiently, providing a rich querying capability, similar to SQL queries, within Windows
SharePoint Services 3.0.
• List Item Versioning: Now the item level versioning is available for lists in WSS 3.0.
A workflow allows us to attach a business process to items in Windows SharePoint Services 3.0 and this
process can control almost any aspect of an item in WSS 3.0, including the life cycle of that item. For
example, you could create a simple workflow that routes a document to a series of users for approval.
Workflows can be as simple or complex as our business processes require. We can create workflows
that the user initiates, or workflows that Windows SharePoint Services 3.0 automatically initiates based
on some event, such as when an item is created or changed. WSS 3.0 workflows are made available to
end users at the list or document-library level. Workflows can be added to documents, list items, and
content types. Multiple workflows may also be available for a given item.
Extensible field types:
We may encounter a situations where the business data does not conform to the field types included in
Windows SharePoint Services 3.0, or situations where you want to customize those general field types.
WSS 3.0 gives developers the ability to create custom field types, based on the robust set of base field
types that are already included. These custom field types can be exposed as simple fields within a list or
document library. For example, someone might use a custom field type to build a ratings system that
assigns stars to content based on its popularity.
Migrating Content Programmatically:
The Microsoft.SharePoint.Deployment APIs in Windows SharePoint Services 3.0 provide a flexible set of
tools for migrating content between SharePoint Web sites. WSS 3.0 uses the concept of the content
migration package, which can include either single or multiple XML files, and then provides a flexible set
of APIs to enable exporting and importing the migration packages. The content import/export feature of
the deployment object model allows us to export not only Web site content but also existing
dependencies, like security features, user roles, versioning data, workflows, and other metadata.
There are a lot of other new features and enhancements in WSS 3.0. I am just consolidating some of
these in the below section:
Better management of people and groups
Improved backup and restoration of sites
Improved search and logging
More flexible and scalable deployment and upgrade
Contextual display, based on user permissions
Greater control over security settings and permissions
Better control with master pages
Better document recovery with help of Recycle Bin
Option to require document checkout
93. SharePoint Glossary
To help you familiarize with the SharePoint vocabulary, we are providing the definition of various terms
used in SharePoint:
Alert: A feature that notifies a user by e-mail when there is a change to an item, document, list, or
document library on the Web site. For example, a user can create an alert to receive an e-mail message
whenever a document is updated in a specific document library.
Application page: Allows the use of inline custom code. Application pages or "_layout" pages are stored
on the SharePoint Web server and made available via a Microsoft Internet Information Services (IIS)
virtual directory. Though application pages behave much like other ASPX pages and allow the use of
inline custom code, they differ from content pages in that they cannot be used to host SharePoint
features such as dynamic Web Parts and Web Part zones.
Approval Process: The process of reviewing a document before publishing it.
Approver: A user who has permission to approve or reject documents in a specified folder.
Audience: A custom group used to target the website content to the people based on membership
within the group.
Breadcrumbs: A form of text-based Web Site Navigation that displays a series of sequential links so that
users can see where the current Web page is located within the Web site.
Business Data Catalog (BDC): A component of Office SharePoint Server 2007 that accesses external data
sources and returns data for display and integration within the SharePoint environment. The business
data catalog is a Office SharePoint Server 2007 service that can be leveraged to do three key things
against back end data sources or Web services, do real time queries, index data for inclusion in the
search indexes, and integrate data into list items using a BDC bound list column.
Business Intelligence (BI): It allows an enterprise to store and analyze data from various sources within
SharePoint itself. SharePoint also integrates a number of other services that allow you to integrate and
use Office applications in connection with the creation, maintenance, and access to business
Check-In: Release lock for editing and enable other users to view the updated file or check out the file.
Check-Out: To lock a file while editing it to prevent others from overwriting or editing it inadvertently.
Only the user who checks out a document can edit the document.
Configuration Database: The SQL Server or SQL 2005 Express database that contains the configuration
information for a Windows SharePoint Services server or server farm.
Content Database: The SQL Server or MSDE database that contains the content for one or more
Content Index: The full-text index, pointer to the property store, and other data that describes content
across content sources, scopes, and servers.
Content type: A reusable collection of settings to apply to a certain category of content such as
documents and folders. Content types enable the management of metadata and behaviors of a
document, item, or folder type in a centralized, reusable way. A content type is a collection of Site
Columns grouped together to define an item that you would like to store.
Crawl: It is a process to traverse the web site content to include it in a content index.
Cross-Site Group: A custom security group that applies to more than one Web site. A cross-site group
can be assigned to a site group as if it was a single user.
Custom Action: Represents a link, toolbar button, menu item, or any control that can be added to a
toolbar or menu that appears in the UI. You define custom actions by using a custom action element
within a feature definition file. You can bind custom actions to a list type, content type, file type, or
programmatic identifier (ProgID).
Datasheet View: A view of a SharePoint list that allows you to modify multiple values same as in Excel
Discussion Board: In a discussion board or Web discussions, a series of messages or comments in which
replies to a message or comment are nested directly under it, instead of the messages or comments
being arranged in chronological or alphabetical order.
Document Library: A folder where a collection of files is stored and the files often use the same
template. Each file in a library is associated with user-defined information that is displayed in the
content listing for that library.
Document Workspace site: A Web site based on the Document Workspace template that workspace
members use for discussing, editing, and working together on a document.
Enterprise Content Management (ECM): This allows centralized management of your organization's
content. For instance, an organization may have a rule saying that all legal documents need to be kept in
a record repository once a project is closed for a period of 7 years. Administrators can now set up
content management rules that perform such actions and manage your content within the ECM space.
This is available only in the Enterprise edition of MOSS.
Event Receiver: Evaluator of an event and definer of the behavior of an application. Windows
SharePoint Services 3.0 allows you to define event handlers within libraries, lists, and sites. Event
receivers can be defined by using a receiver element within a feature definition file.
Excel Services: This is a completely new service that allows organizations to store and access Excel files
off the SharePoint server. Files may be created in Excel 2007 and set up with publishing rules that can
incorporate things like which sheets to show, which formulas are fixed or hidden, which cells or ranges
are editable, etc. Once published, a user can click the file in SharePoint to open it in Excel with these
rules set. All formula calculations also occur on the server and not within Excel itself which allows for
centralizing Excel formulas in a single place. The large number of features and development options
allow users to create very rich and dynamic sites for intranet, extranet, and internet usage.
Excel Trusted Location: An Excel trusted file location is a SharePoint document library, a UNC path, or an
HTTP Web site that is configured as a trusted repository for workbooks that Excel Calculation Services
can access. Excel Calculation Services opens workbooks that are stored in trusted file locations only.
Feature: A package of Windows SharePoint Services elements that can be activated for a specific scope
and that helps users accomplish a particular goal or task. Windows SharePoint Services 3.0 introduces
this inherently portable and modular functionality, which simplifies modification of sites through site
Ghosted Page: A ghosted page is a page in SharePoint website which is not stored in the database
instead it reference to a file which exists in the server’s file system. These reference files are common
for all the website/site collection within that SharePoint server, i.e., if you modify a reference file then
that change will reflect in all the websites/site collections within that SharePoint server automatically.
List: A Web site component that stores and displays information that users can add to by using their
List Item: An entry in a list or portal area. An item can contain content or be a link to content stored
Personal View: A view of a list, SharePoint document library, or Web Part Page that is available only to a
particular user. The personal view of a Web Part Page uses a combination of shared property values and
personalized property values. Changes made to a personal view apply only to the list, library, or page in
that view and are therefore visible to that user only.
Personalized Web Part: A shared Web Part that has been modified by a user in personal view. The
changes made to a Web Part personalized in this way are visible only to the user who made those
Private Web Part: A Web Part added to a Web Part Page by a user who is working on the page in
personal view. Private Web Parts are available only to the user who added or imported the Web Part.
Quota: A way to specify limits to the amount of storage or number of users a Web site can use.
Quota Template: The specific set of quota limits to apply to a site or to all sites on a virtual server.
Rights: File and folder-level permissions that allow access to a Web site.
Shared View: A view of a list, document library, or Web Part Page that every user with the appropriate
permissions on a site can see. The shared view of a Web Part Page uses shared property values. Changes
made to a shared view apply to the list, library, or page as it appears to all users.
Shared Web Part: A Web Part added to a Web Part Page by a user who is working on the page in shared
view. Shared Web Parts are available to all users of a Web Part Page who have the appropriate
SharePoint Site: A group of related Web pages in Windows SharePoint Services where users can share
data in lists and libraries, and can view and edit one or more Web part pages. A SharePoint site is a place
for collaboration, communication, or content storage. Depending on your business needs, you can
create sites such as team sites, blog sites, wiki sites, and others. You can customize a site's appearance,
users, user permissions, galleries, and site administration by using the Site Settings administration
SharePoint Site Collection: A set of Web sites that have the same owner and share administration
settings. Each site collection contains a top-level Web site and can contain one or more sub sites. Site
collections allow you to share content types, site columns, templates, and Web Parts within a group of
SharePoint Solution: A file that is a bundling of all the components for extending Windows SharePoint
Services in a particular way. A solution file has a .cab-based format with a .wsp extension. A solution is a
deployable, reusable package that can contain a set of Features, site definitions, and assemblies that
apply to sites, and that you can enable or disable individually. You can use the solution file to deploy the
contents of a Web Part package, including assemblies, class resources, and other package components.
SharePoint Web farm: A group of Office SharePoint 2007 servers that share the same configuration
database. All site content and all configuration data is shared for all front-end Web servers in a server
Site definition: A set of files that includes a master XML configuration file that is stored on all front-end
Web servers. A site definition provides the basic blueprint for how sites look, what lists they include,
their default navigational structures, and so on.
Site Group: Site groups are custom security groups that apply to a specific Web site. Users are assigned
to site groups to grant them permissions on a SharePoint site.
Site template: A package containing a set of differences and changes from a base site definition that is
created through the UI or through implementation of the object model. The site template package is
stored as a .cab-based file that can be downloaded or uploaded to site collections by users with the
appropriate rights. Site templates offer a measure of portability to SharePoint applications.
Static Web Part: A Web Part added to a Web page (.aspx) and that is not in a Web Part zone.
Stsadm.exe: A WSS tool that allows you to administer WSS servers and sites from the command line.
Subsite: A named subdirectory of the top-level Web site that is a complete Web site. Each subsite can
have independent administration, authoring, and browsing permissions from the top-level Web sites
and other subsites.
Survey: A Web site component that enables users to respond to a set of questions specified by the
creator of the survey. Results are tallied in a graphical summary.
Theme: A group of files (CSS, images) that allow you to define the appearance (look and feel) of Web
pages. Themes in ASP.NET 2.0 and themes in SharePoint Products and Technologies work in the same
way. Themes are used to help organizations to brand their portals and team sites. Office SharePoint
Server 2007 includes a set of predefined themes. However, as a developer, you can create custom
themes for your company.
Tool Pane: A task pane on a Web Part Page used to browse, search for, and import Web Parts from Web
Part galleries, and to modify custom and common Web Part properties.
Tool Part: A control in the tool pane that allows users to set properties, execute commands, invoke
wizards, and manipulate Web Parts on a Web Part Page.
Top-Level Web Site: The default, top-level site provided by a Web server or virtual server. To gain access
to the top-level Web site, you supply the URL of the server without specifying a page name or subsite.
Unghosted Page: All the pages in a SharePoint website which are stored in the content database are
referred as unghosted pages. All the unghosted pages are specific to that SharePoint website only, i.e.,
changes done in unghosted pages will not reflect in other websites within that SharePoint server.
Versioning: The process of creating a backup copy of a document or picture whenever a revision is
saved to the library.
Web Part: A modular unit of information that consists of a title bar, a frame, and content. Web Parts are
the basic building blocks of a Web Part Page. A Web Part is the combination of a Web Part Description
file (.dwp) and a Web Part assembly file (.dll). All Web Parts are based on Web Custom Controls.
Web Part Page: A Web page that can host one or more Web parts. A Web part page usually contains
one or more zones to allow Web parts to be manipulated on the page.
Zone: An area in a Web part page in which Web parts are arranged.
94. Overview of SharePoint Object Model
SharePoint / MOSS 2007 Object Model Overview?
1. The SPFarm object is the highest object within the SharePoint Foundation object model hierarchy.
The Servers property gets a collection representing all the servers in the deployment, and
the Servicesproperty gets a collection representing all the services.
2. 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.
3. Each SPService object represents a logical service installed in the server farm. Derived types of
the SPService class include, for example, objects for Windows services, such as the timer service,
search, the database service, etc. and also objects for Web services, such as the basic content
publishing Web service which supports the Web applications.
4. A 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
5. If the service implements the Service Application Framework of SharePoint Foundation, then it can
be split into multiple configured farm-scoped instantiations (CFSIs). Each of these provides the
functionality of the service but each has its own individual permission and provisioning settings.
6. Each instance of a service, or a CFSI, that is running on a specific server is represented by
an SPServiceInstance object.
7. An SPDatabaseServiceInstance object represents a single instance of a database service running on
The SPDatabaseServiceInstance class
theSPServiceInstance 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.
8. Each SPWebApplication object represents a Web application hosted in an Internet Information
Services (IIS) Web site. The SPWebApplication object provides access to credentials and other farmwide application settings. The Sites property gets the collection of site collections within the Web
application, and the ContentDatabases property gets the collection of content databases used in the
9. A SPContentDatabase object inherits from the SPDatabase class and represents a database that
contains user data for a 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
10. A SPSiteCollection object represents the collection of site collections within the Web application.
1. Each SPSite object, despite its singular name, represents a set of logically related SPWeb objects (see
below). 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 SPSite.OpenWeb method of the SPSite class returns a specific Web site.
2. 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 a SPWebCollection object that represents all the sub sites of a
specified site, and the Lists property returns a SPListCollection object that represents all the lists in
3. 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 a 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
4. Each SPField object has members that contain settings for the field.
5. Each SPListItem object represents a single row in the list.
More Detailed information:
SharePoint offers a set of structured server-side objects those are widely used to program SharePoint
Applications. These objects are hierarchically arranged and you can drill down through the object
hierarchy to obtain the object that contains the components of SharePoint Application you need to use
in your code.
SharePoint object model can be grouped in two categories:
1. Object model of Server Architecture
2. Object model of Site Architecture
Object model of Server Architecture:
Following diagram shows the Windows SharePoint Services server architecture in relation to the
SharePoint objects and collections. All these objects and collections are available in the
SPFarm object is the highest object within the Windows SharePoint Services object model hierarchy
which represents a WSS farm and used for central configuration settings. It contains global settings for
all the servers, services, and solutions that are installed in a WSS farm. With this object you can also
access all the servers, services, and solutions that are installed in a WSS farm.
• Create method can be used to a server farm, its associated configuration database, and a farm
account on the local computer based on the specified connection string.
• Open method can be used to get a remote server farm based on specified connection string
• Server’s property of SPFarm object is used to get the collection of all physical computers that are in
the server farm. This property returns a SPServerCollection object which is a collection of SPServer
objects (one SPServer object for each physical computer in the current server farm).
• Services property of SPFarm object is used to get the collection of all the services that are in the
server farm. This property returns a SPServiceCollection object which is a collection of SPService
objects (one SPService object for each Service in the current server farm).
• Solutions property of SPFarm object is used to get the collection of all the solutions that are in the
server farm. This property returns a SPSolutionCollection object which is a collection of SPSolution
objects (one SPSolution object for each Solution in the current server farm).
SPServer Object: SPServer object represents a physical computer in the server farm.
ServiceInstances property is used to get the collection of individual service instances that run on the
SPService Object: SPService object represents a logical service or application installed in the server farm.
SPSolution Object: SPSolution object represents a SharePoint Solution installed in server farm.
SPWebService Object: SPWebService object represents a Web service that contains one or more WSS
web applications. It can be used to access configuration settings for a specific logical service or web
Web Applications property is used to get the collection of all the web applications that are running
within this service. It returns SPWebApplicationCollection object which is a collection of
SPWebApplication objects (one SPWebApplication object for each web application).
SPServiceInstance Object: SPServiceInstance object represents a single instance of service running in
the server computer.ServiceInstances property of the SPServer object can be used to get
the SPServiceInstanceCollection object that represents all the service instances that are currently
running on a server computer.
Service property is used to get the SPService object that contains the farm-wide settings that apply to
the service that this instance implements.
Server property is used to get the SPServer object on which this instance is installed.
SPDatabaseServiceInstance Object: 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.
SPWebApplication Object: SPWebApplication object represents a WSS web application and it contains a
set of content databases and site collections. The SPWebApplication object provides access to
credentials and other server farm wide application settings
SPWebApplication inherits from SPPersistedObject, which means that an object of the class persists in
the configuration database.
SPWebApplication class enables administrators to access IIS properties without opening IIS Manager for
example with the help of IisSettings and ApplicationPool property, we can access the properties of the
IIS application pool to which the WSS Web application is assigned.
Sites property is used to get the collection of site collections within the Web application. It returns
SPSiteCollection object which is a collection of SPSite objects.
ContentDatabases property is used to get the collection of content databases used in the Web
application. It return SPContentDatabaseCollection object which is a collection of SPContentDatabase
SPDatabase Object: SPDatabase object encapsulates access to Microsoft SQL Server
databases. Databases property of the SPDatabaseServiceInstance object can be used to get the
collection of databases that support the database service instance.
SPContentDatabase Object: SPContentDatabase object represents a content database that contains
user data for a SharePoint web application. ContentDatabases property of the SPWebApplication object
can be used to get the collection of all the content databases that are used by the Web application.
ContentDatabase property of SPSiteobject can also be used to get content database for a site collection.
Sites property is used to get collection of site collections for which content database stores data.
WebApplication property is used to get the parent Web application.
SPSiteCollection Object: SPSiteCollection object represents the collection of site collections within the
Web application and each site collection is represented by SPSite object.
Object model of Site Architecture: Following diagram shows the Windows SharePoint Services site
architecture in relation to the SharePoint objects and collections. All these objects and collections are
available in the “Microsoft.SharePoint” namespace.
SPSite Object: SPSite object represents a collection of sites in a Web application, including a top-level
Web site and all its sub sites. This collection of sites is known as “Site Collection”. Each site in the
collection, top-level site as well as all its sub sites is represented by a SPWeb object.
Although a SPSite object represents a collection of sites, the SPSite class is not a collection in the sense
of a class that implements ICollection. A SPSiteCollection class implements the latter interface and it
represents a collection of SPSite objects.
SPSite object can be instantiated by following methods:
• SPSite constructor can be used to instantiate a SPSite object for a specific site collection within a
console application, or windows application, or on an ASP.NET page SPSite objSPSite = new
• Within an ASP.NET application, Site property of the SPContext class can be used to get the SPSite
object that represents the current site collection SPSite objSPSite = SPContext.Current.Site;
• Get SPSiteCollection object from the Sites property of the SPWebApplication class. This
SPSiteCollection represents the collection of site collections in a SharePoint Web application, so just
use an indexer to return a single site collection from the collection.
SPSiteCollection objSiteCollection = objWebApplication.Sites;
int index = 0;
SPSite objSite = objSiteCollection[index];
RootWeb property of SPSite class returns its child top-level website. In turn, the SPWeb object that
represents the top-level Web site has a Webs property that holds all its immediate child sub sites.
The AllWebs property of SPSite returns all the sub sites and the top-level Web site.
SPWeb Object: Each SharePoint website is represented by SPWeb object whether it is a top level
website or a sub site. SPWeb 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.
SPWeb object can be a child of another SPWeb object or of a SPSite object. If it is the child of a
SPSite object, it is the top-level Web site in its site collection. A hierarchy of Web sites always has
exactly one top-level Web site. This site is represented by a SPWeb object which is an immediate
child of a SPSite object.
SPWeb object has a Webs property that returns a collection of other SPWeb objects; specifically, the
immediate child sub sites under it.
The Lists property returns a SPListCollection object that represents all the lists in the site. Each list in
a site is represented by SPList object.
SPWeb object can be instantiated by following methods:
• To get SPWeb object for top level website following code snippet can be used:
1) SPSite objSPSite = new SPSite("Absolute_URL");
SPWeb objSPWeb = objSPSite.OpenWeb(); OR
2) SPSite objSPSite = new SPSite("Absolute_URL");
SPWeb objSPWeb = objSPSite.RootWeb();
• To get SPWeb object for top level website as well as for each sub site, following code snippet can be
SPSite objSPSite = new SPSite("Absolute_URL");
SPWeb objSPWeb = objSPSite.AllWebs[index];
• To get SPWeb object for each sub site only, following code snippet can be used:
SPSite objSPSite = new SPSite("Absolute_URL");
SPWeb objSPWeb = objSPSite.OpenWeb();
SPWeb objSPWeb = objSPWeb.Webs[index];
SPList Object: Each shared list and document library in a SharePoint website is represented by SPList
object. SPList object has members that are used to manage the list or access items in the list.
• GetItems method can be used to perform queries that return specific items.
• Fields property returns a SPFieldCollection object that represents all fields, or columns, in list.
• Items property returns a SPListItemCollection object that represents all items, or rows, in list.
• Folders property returns the collection of folder items for the list.
• Lists property can be used to get the parent collection of lists to which the list belongs.
• ParentWeb property can be used to get the parent Web site for the list.
• Delete method can be used to delete the list.
• GetChanges method can be used to get from the change log the collection of changes that have
occurred in the list.
• Update method can be used to update the database with changes that are made to the list.
SPField Object: SPField object represents a field in a list.
• Title property can be used to get or set the display name for the field.
• Type property can be used to get or set the type of the field.
• Delete method can be used to delete the field.
• Update method can be used to update the database with changes that are made to field.
SPListItem Object: SPListItem object represents a single row item in the list.
• Fields property returns the collection of all fields in the parent list of the SPListItem.
• Delete method can be used to delete a row from the list.
• Update method can be used to update a row in the list.
• Following code snippet can be used to add a row in the list:
SpListItemObject = spListObject.Items.Add ();
//assign values for each column of this row
95. Logical Architecture of SharePoint Application
The Above pictorial view depicts the logical architecture of a SharePoint Application:
Below is given some important points to remember about SharePoint Applications:
• Each SharePoint web application can have multiple content databases.
• Each content database can have multiple site collections.
• A site collection is a set of Web sites that have the same owner and share administration settings.
• Each site collection contains a top-level Web site and can contain one or more sub sites.
• Each site (top-level site and sub sites) within site collection can have its own document libraries and
• The Page Layouts, Master Pages, and Web Parts can be shared only within a site collection.
• Sub sites within a site collection can inherit permissions from the top-level site.
• Site collections cannot inherit permissions from other site collections.
• There is no built-in navigation from one site collection to another.
• SharePoint search provides search results only within a single site collection and it does not include
results across multiple site collections.
• URL of the web application for different site collections will be like below:
Site Collection2: http://servername/sites/sitecollection2
96. Sandboxed Solutions
If you remember, in SharePoint 2007 all the solutions (.WSP) run with full trust which requires farm
administrators to pitch in and deploy the solutions. Also the solutions can be deployed at the minimum
at a web application level. It means if a solution is deployed in a web application, it will be applicable for
all the site collections available in that web application.
In SharePoint 2010, Sandboxed Solutions also called as User Solutions, is a new concept which addresses
the above issue by allowing site collection administrators to deploy solutions at the site collection level
which is safe to run and not affect the other site collections and web applications running on the same
farm. Farm administrators can monitor sandboxed solutions and place restrictions on the resources,
such as memory and CPU cycles, they can use. Sandboxed Solutions does not cover full SharePoint
object model but it addresses the key scenarios like custom web parts and event receivers.
The solution deployment as in SharePoint 2007 is still exists in SharePoint 2010 but those solutions are
called as Farm solutions.
97. What is the difference between Sandbox solution & farm solution?
We can create sandbox solution for particular site but not for the entire site collection or farm. It is not
applicable for farm solution. There is some restriction while creating the sandbox solution.
98. How can we create SharePoint workflow using SharePoint designer?
SharePoint designer helps us to create workflows and attach the workflows to a content type like list,
document etc. In other words SharePoint designer creates workflows and publishes the workflow on the
SharePoint server site.
We will create two lists one is the incomplete tasks and the other completes tasks. The workflow will
flow something like this:• User will create a task and enter the status of the task.
• If the task is incomplete nothing will happen.
• Once task is marked as complete. Task will be copied from incomplete task list to completed task list.
• The task will be deleted from the incomplete task list.
To understand it better we will build a simple work flow of completed and incomplete tasks.
So let’s understand the eight important steps we will need to create the above work flow using
Step 1:- Create a team site.
Step 2:- Create two task lists one is incomplete task list and the other completed task list. To create task
list, click on site action? Create: - Add a new library list? Create a task
Step 3:- Start the SharePoint designer.
Step 4:- Open the site in your SharePoint designer using click on file? Open site.
Step 5:- Go to workflows by clicking on file? new? SharePoint content and click ok as shown in the
Step 6:- This is an important step. In this step we define two important things first is this work flow will
be attached to which list. Currently we have attached the work flow to incompleted tasks list. Second
we need to define the events on which the workflow should be activated. For the current scenario we
have considered two events one when the item is created and the second when the item is updated.
Step 7:- This is one more crucial step where we need to define on what condition the work flow will
execute and what action should take place if the condition is true. So when a task status is completed
then two actions will take place. First the task will be copied from the incomplete task list to the
completed task list. Second the task is deleted from the incomplete task list.
Once you click finish you can see the work flow created in the share point designer. This workflow is also
published to the SharePoint server,
You can see if the work flow is associated with the incomplete task list. Go to incompleted tasks?
Settings? List settings? Workflow settings, you can see the work flow is attached to the incomplete task
Step 8:- Ok; now it’s time to see the work flow in action. So go to incomplete task list and create a task
with status completed.
Once you click ok you see the task for some seconds in the incomplete tasks list and then the task is
copied to the completed task list and deleted from the incomplete task list.
99. Does SharePoint only have three-state workflow?
If you install WSS then you will only see one work flow that is three-state workflow. But with MOSS
you will see 4 more workflows which cover almost all the scenarios you will ever need for a workflow.
Routes a document for approval. Approvers can approve or reject the document,
reassign the approval task, or request changes to the document.
Routes a document for review. Reviewers can provide feedback, which is compiled
and sent to the document owner when the workflow has completed.
Gathers signatures needed to complete a Microsoft Office document. This workflow
can be started only from within an Office client.
Manages document expiration and retention by allowing participants to decide
whether to retain or delete expired documents.
100. What is a three-state workflow in SharePoint?
Three-state workflow helps organization to track workflows which has three states and two transitions.
It’s designed to track status of list item, task etc.
with each transition between states the work flow assigns the task to some person and sends an email
alert about the task.
Figure: - Three state workflow
In order to better understand three-state we will create a simple task list. This task list will go through a
review process. Following is how the workflow will be executed:• Administrator creates the initiates the task. The task is assigned to the reviewer.
• The reviewer then reviews the task, makes his comments and makes the task in progress. Once he
• Acceptor finally does the complete review and closes the task.
Three state example
The first thing is to add two users in our computer domain one is the reviewer who will review and the
other is the acceptor who will close the task imitative.
To see the workflow go to Site actions? Site settings? Workflows. You will see the ‘Three-state’
Let first create a team site so click on Site actions? Site libraries and lists? Create a new content? Sites
Now click on ‘My team site’ , click on tasks and then click on list settings as shown in the below figure.
Once you click on ‘List setting’ you will see lot of options. Go to the permission and management section
and click on ‘Workflow Settings’ as shown in the below figure.
You will prompt to create a new work flow. So create a new workflow and you will need to fill in details
Give a nice name to the work flow, for the current sample we have given the name as ‘My workflow’.
We have specified saying that create workflow as soon as the item is created.
A workflow will have three states an initial state, middle state and final state.
These states will be decided on the choice field of the task list. So when the status is having value ‘Not
Started’ then the work flow is in the initial state. When the status is with value ‘In progress’ then the
workflow is in middle state. When the status is completed that means the work flow object will be
terminated and the workflow will be marked as closed.
Now the second step is to tell the three-state work flow what needs to be done on every work flow
state. So let’s fill what should happen when the work flow is initiated. When the work flow is initiated it
will be allocated to the user ‘reviewer’. You can see the values visually in the below figure.
When the reviewer reviews the document it’s assigned to an acceptor. So when the workflow is in the in
progress state it’s assigned to the acceptor for final closure.
So now that you have attached the work flow with the list its time to invoke the workflow on the
list. Click on new to add a task to the task list. Below are the details of task which we need to enter.
What we have done is we have entered a wrong statement with spelling mistakes.
Now as soon as you click ok, you will see that the task is assigned to a reviewer.
Now login as reviewer and click on ‘What is your name’?
Now as reviewer you will correct the sentence and mark the task as ‘In progresses.
As soon as you mark the task as in progress it’s assigned to the acceptor. Now login as an acceptor and
mark the task as complete.
Once done click on work flows and you should be able to see a complete tri-state flow.
You can see how the work flow was initiated, how the reviewer reviewed it and finally the acceptor
101. What are the different stages of SharePoint workflow life cycle?
SharePoint workflow cycle is very much unique to SharePoint environment. As we said SharePoint
workflow are always connected in context with SharePoint content like list or a document.
Figure: -Four different stages in SharePoint workflow
There are four stage in the SharePoint workflow cycle associate, initiate, modify and complete.
• Associate: - As said workflows in SharePoint are always talked in context with a content type.
So the first step is to associate a workflow with a content type like list or a document.
• Initiate: - The second step is to initiate the workflow instance. Work flows are nothing but
classes finally so a workflow instance needs to be created to start the work flow in action.
• Modify: - Later the workflow instance is modified as per the workflow stages.
Complete: - Finally the workflow object is terminated.
Figure: - Screen and SharePoint workflow
The web forms of share point interact with WSS who in turn then interacts with the windows work flow
runtime. The windows workflow runtime passed details to the appropriate workflow instance depending
on the data passed by WSS. The SharePoint workflow instance then runs the work flow logic and takes
appropriate action accordingly.
102. Is SharePoint workflow same as windows workflow?
The first basic important point to note is SharePoint workflow and windows are not different entities.
The base for SharePoint workflow is window workflow. In other words SharePoint workflow sits on the
The below figure reflects the broader definition of SharePoint workflow. It takes the core windows
workflow from .NET framework and then applies content centric workflow on it.
Content centric workflows are nothing but simple windows work flow attached to list, documents and
Figure: - Content type workflow
You can visualize SharePoint workflows as windows workflow with human workflow touch and feel. The
human work flow touches and feels comes when the work flow is attached to a content type like list,
document etc. For instance let’s say we have made approve and disapprove windows work flow. You
can attach this work flow with a student content type and the human work flow for student then
becomes student passed and student failed. If the content type is invoice then approve work flow can
become an invoice paid work flow and disapprove can become invoice not paid. In other words
SharePoint workflow is content centric and they depicting human work flow.
Figure: - Approve and Disapprove
103. What is a Content Type?
A content type is a reusable collection of metadata, information policies, form URLs, document
templates, event receivers, and workflows that is applied to a particular category of information. All
content that uses a particular content type contains the same metadata fields and behaviors. Metadata
is literally "data about data" or, in the case of a content type, information about the document or item
that is being described. A content type's metadata can include the columns in a list.
Content types help you to organize SharePoint content in meaningful ways and enable you to centralize
the metadata and behaviors that apply to different types of SharePoint content. By using content types,
you can also store different types of information in a single list or document library, while keeping the
functionality specific to each type of information. The following is some of the information that can be
stored in a content type:
• Metadata or properties of the information that is being captured.
• Custom New, Edit, and Display forms to be used with this content type.
• Workflows that is associated with items of this content type.
• Document templates for document-related content types.
• Any information that is required for custom solutions that are associated with this content type.
An example is a list item event receiver. You can store this information in the content type as
104. What’s the difference between content and custom columns, they do the same thing?
Custom columns can be added by end user and end user can mistake. For instance someone can add the
custom column as ‘Dept’ and someone can add the column as ‘Department name’. Content define a
document data type. For instance your invoice content type can have invoice number, invoice amount
etc. Your sales content can have sales date, customer code etc.
In other words content type helps you to force organization level policies. So you can define a content
type at the site level. When any user wants to create a document library he can use the appropriate
content type. Let’s say the organization wants to implement a policy saying that every document should
have department name and version number. So the SharePoint administrator can create a content type
called as ‘CompanyContentType’ and all document libraries can use this content type.
So you can use custom columns where the column is very much specific to that document library and
will not be repeated you can use the custom column. If you want to implement document level policy
and fields across organization you can use content types.
105. What are content types in SharePoint?
Content types are extensions to custom types. Content types bring in central control and consistency on
custom data type. For instance in the previous example we had added custom type as ‘Department’ now
someone can add the custom field as ‘Dept’. In other words this can bring in inconsistency and we will
not be able to query and filter data in a consistence manner. So in other words we can define a content
type and then apply this content type across documents. In other words we can really drive organization
level policies using content types.
To create a content type click on site action – site settings – from galleries section click site content
types and you will be shown a list of existing content types.
To create a new content type click create hyperlink from the same screen which is showing list of
You will thrown up a screen where you need to specify the name of your content type the parent
content type and group for the same.
106. Which are the various readymade list types that SharePoint provides currently?
There are approximately thirteen different readymade list types, below mentioned are some of the
most used ones.
Document library: Used for collaborating on documents with support for versioning, check-in and
check-out, and workflow. Includes support for deep integration with Microsoft Office.
Form library: Used to store XML documents and forms for use with Microsoft Office InfoPath.
Wiki page library: Used for collaborative Web pages based on wiki pages, which are dynamically
generated and collaboratively edited Web pages?
Picture library: A specialized document library enhanced for use with pictures. Includes support for slide
shows, thumbnails, and simple editing through Microsoft Office Picture Manager.
Announcements: Used for simple sharing of timely news with support for expiration.
Contacts: A list for tracking people and contact information, with support for integration into Microsoft
Office Outlook and other WSS-compatible contacts applications.
Discussions: A simple list for threaded discussions with support for approval and managing discussion
Links: A list for managing hyperlinks.
Calendar: A list for tracking upcoming events and deadlines. Includes support for integration and
synchronization with Office Outlook.
Tasks: A list of activity-based items that can integrate with workflow.
Project tasks: An enhanced tasks list with support for Gann chart rendering and integration with
Microsoft Office Project.
Issue tracking: A list for tracking issues and resolution, with support for prioritization.
Custom list: An empty list definition for extending with custom columns, or created using Microsoft
Office Excel spreadsheet