Monday, October 31, 2011

Custom Permission Level in Sharepoint 2010

an-overview-of-site-permissions
Creating a Custom Permission Level in Sharepoint 2010

Creating custom error page for SharePoint 2010 and All security


SharePoint Security / Permission Levels


SharePoint Security and Permission System Overview

Custom Permission Level in Sharepoint 2010

Manage Item Level Permissions Programmatically


Sharepoint People Picker control issue:"The control is not available because you do not have the correct permissions"


SharePoint 2010 List Throttling


How to set Item Level Permission for SharePoint 2007 (MOSS/WSS) List/Document Library Programmatically


Programmatically create user groups Sharepoint 2010


Creating SharePoint custom roles programmatically


Setting SharePoint list item level permissions programmatically


Create Groups Programmatically using SOA

Manage Item Level Permissions Programmatically

How to set Item Level Permission for SharePoint 2007 (MOSS/WSS) List/Document Library Programmatically

Setting SharePoint list item level permissions programmatically


Custom WebParts


Configuring My Site in SharePoint 2010

SharePoint Designer 2010


New Features in SharePoint Designer 2010


Managed Path in Sharepoint 2010


Using SharePoint Designer 2010 to surface data in External Lists through Business Connectivity Services SharePoint 2010


How to Create Custom SharePoint 2010 Page Layouts using SharePoint Designer 2010



Custom wiki

Modifying the Page Layout for Enterprise Wiki Pages in SharePoint 2010


IMP Blogs
http://elczara.wordpress.com/

http://www.myfriedmind.com/techblog/

Custom Action And Features

Sharepoint Custom Action Element Definition And Action Rights
Programmatically Add Custom Action ( Link ) in ECB menu of an List Item specific to a Content Type and open Application Page in Modal Dailog Popup in Sharepoint 2010

Understanding Scope of SharePoint Features


Sharepoint 2010 issues


Sample CustomActions for SharePoint


Creating User Custom Actions through Code


Restart Remote Machine IIS from Code


Access Denied error while using SPWeb.EnsureUser in SharePoint


Programmatically change the Welcome / Default page of a Sharepoint Publishing Web

SharePoint 2010 Site Actions Menu


[SharePoint 2010] Custom Actions Default Locations and Group IDs


Adding Custom Button to the SharePoint 2010 Ribbon

Custom Action Definition Schema

Tuesday, October 25, 2011

Display List Data with SPGridView


Display List Data with SPGridView


*************************************
asp:GridView ID="GridView1" runat="server"
asp:GridView
SPDataSource
SharePoint:SPDataSource runat="server" DataSourceMode="List" id="DataSrc1" SharePoint:SPDataSource

protected void Page_Load(object sender, EventArgs e)
{
SPSite mysite1= SPContext.Current.Site;

SPWeb myweb1= mysite1.OpenWeb();
SPList list = myweb1.Lists["ParentList"];
DataSrc1.List=list;
GridView1.DataSource =DataSrc1;
GridView1.DataBind(); }


*******************************

SPDataSource - every SharePoint developer's friend (part 1)


SPDataSource and Rollups with the Data View


SPDataSource


Deleting all items from lists

How To Customize Current Navigation (Left Navigation) in SharePoint 2010 To Show Multiple Levels?

Resolved] Could not load file or assembly 'XXXXX' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Resolved] Could not load file or assembly 'XXXXX' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Resolved: Could not load file or assembly ‘Microsoft.SharePoint.Search, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’ or one of its dependencies…

Friday, October 21, 2011

Display Sharepoint list items in a grid view.

Display Sharepoint list items in a grid view.

Displaying Data by Using the SPGridView Control in Windows SharePoint Services 3.0


How To: Use SharePoint 2010 WebParts with a GridView Control to get SQL Image Data type and other Values

TemplateType Property

For custom list templates, you can use the string representation of the type number, such as "10001" or "98765432", or the name, such as "MyCustomListTemplate." The type number is the value of the Type attribute of the element in the Elements.xml file that you create for the custom list template. See How to: Create a Custom List Definition. The name is the value of the Name attribute of that same element.

When creating custom list templates, assign Type values above 10000 to ensure that your numbers do not conflict with new built-in template types that Microsoft may include with future versions of SharePoint Foundation.

SharePoint List Type ID Numbers

Complete list of SharePoint 2010 list type's ID numbers for reference.

100 : Generic list
101 : Document library
102 : Survey
103 : Links list
104 : Announcements list
105 : Contacts list
106 : Events list
107 : Tasks list
108 : Discussion board
109 : Picture library
110 : Data sources
111 : Site template gallery
112 : User Information list
113 : Web Part gallery
114 : List template gallery
115 : XML Form library
116 : Master pages gallery
117 : No-Code Workflows
118 : Custom Workflow Process
119 : Wiki Page library
120 : Custom grid for a list
121 : Solution Catalog
122 : No Code Public Workflow
123 : Theme Catalog
130 : Data Connection library
140 : Workflow History
150 : Gantt Tasks list
200 : Meeting Series list
201 : Meeting Agenda list
202 : Meeting Attendees list
204 : Meeting Decisions list
207 : Meeting Objectives list
210 : Meeting text box
211 : Meeting Things To Bring list
212 : Meeting Workspace Pages list
301 : Blog Posts list
302 : Blog Comments list
303 : Blog Categories list
402 : Facility
403 : Whereabouts
404 : Call Track
405 : Circulation
420 : Timecard
421 : Holidays
499 : Input Method Editor Dictionary
600 : External List
1100 : Issue tracking
1200 : Administrator tasks list
1220 : Health Rules
1221 : Health Reports
2002 : Personal Document Library
2003 : Private Document Library
******************************************
Base Type ID
Custom List 0
Document Library 1
Not used 2
Obsolete. Use 0 for discussion boards. 3
Surveys 4
Issues List 5
Click here
Reference: http://msdn.microsoft.com/en-us/library/ms431081.aspx

Thursday, October 20, 2011

SP 2010: How To - Event Receivers and Custom Error Pages

SP 2010: How To - Event Receivers and Custom Error Pages


WSS / SharePoint : filter Users with the PeopleEditor control


How To Create a Basic SharePoint Web Part


Import User Profile Photos from Active Directory into SharePoint 2010


How to get domain user information from Active Directory in C#

Know the difference between SPWeb.Users and SPWeb.SiteUsers

Know the difference between SPWeb.Users and SPWeb.SiteUsers

Claims Architecture for SharePoint 2010 Develope

Claims Architecture for SharePoint 2010 Developers

Site definitions vs. Web templates and List def vsList Template

SharePoint 2010: What is Sandbox Solution?

Many of the SharePoint are working on the SharePoint for a long time. Many of then also started working in the SharePoint 2010. Their are many things that SharePoint 2010 made easier then from SharePoint 2007/Moss. Many improvements are given to the SharePoint to that it can build a better solution.

If you have been reading about exciting new features of SharePoint 2010 you probably heard about something called SandBox Solutions. What is the Sandbox solution?

SharePoint is a rich development platform with a large community actively developing solutions. The challenge, however, has always been the balance between creating solutions and deploying them in a way that you can trust will not damage or impair the SharePoint farm. Sandboxed solutions, new in SharePoint 2010, address this by allowing site collection administrators to deploy solutions that are safe to run. Sandboxed solutions are restricted to running under a subset of the SharePoint API and the framework can monitor these solutions and shut down any that risk the stability of the farm.

SandBox Solutions support the following SharePoint item types:

* List definitions
* List instances
* Content Types/Fields
* Navigation
* Web Parts derived from WebPart
* Event receivers
* Custom Workflow Actions
* Workflows

Development

For developing a sandbox solution you have to just create a new blank SharePoint Solution in Visual Studio 2010. Go to properties of the solution and change the solution type to true.

The structure of a sandboxed solution is very similar to a farm solution, which generally runs with full-trust permissions. The main differences lie in how a sandboxed solution is deployed and in the process that hosts the solution (which determines whether a solution is a sandboxed solution or a farm solution). This means that the same sandboxed solution can run with full trust when it’s deployed at the farm level and with partial trust when it’s deployed at the site collection level







SharePoint 2010 : Creating a Web/Site template

What Are Web Templates in general?


We can a web site template is a pre-designed web page or simply a web page without or with basic contents. Right?


What is web template in the SharePoint term?

Web templates on the other hand, are stored in the database, and are created using an existing site, with or without its specific content, as a model. This provides a means for reusing sites that you have customized.


In SharePoint 2007/2010 the meaning is same for both the version. But creating a web template is now different in the both version, means approach is different.
Like in MOSS we can create the web template using the existing site, SPD 2007 for UI and WSP for deployment. But in the SharePoint now you can create your Custom Web template using the SharePoint existing site. Well, for the custom template first you have to design and implement all the requirement on the existing site, and save the template in the Site templates. But here is the slightly change, we can create two types of the site template solution,

Farm

Sandbox

In VS 2010 their is a new template for the creating the solution from existing WSP is Import SharePoint Solution Package.





Now you can import your WSP in this solution and you can write your custom code or now you can modify UI etc. It will give great help when you are creating a sandbox solution and does not want to write a code. then just deploy all the solution on existing site and use that site WSP to import in this solution. Extract your required solution from it and implement in the your solution.

Web Templates



SharePoint 2010 and web templates



Site definitions vs. Web templates




webtemplate-training-materials




List def
http://johanolivier.blogspot.com/2010/05/developing-list-definition-in.html
http://johanolivier.blogspot.com/2010/08/sharepoint-2010-provider-consumer-web.html



Save as Site Template {Publishing Sites}
http://www.shareesblog.com/?cat=12
# Go to Site Actions, Site Settings
# In the Look and Feel section, click Save Site as Template. Note: if your site has the Publishing feature turned on or is

based on a Publishing site template the Save Site as Template link does not appear. Read the Microsoft Knowledge Base article

on how to save Publishing sites (or sites with Publishing turned on)Â as templates. There is a link available in a publishing

site so you have to navigate to url/_layouts/savetmpl.aspx to save as template in a publishing site.
**************

SharePoint 2010 and web templates



Site definitions vs. Web templates


#######################################################

Create Custom List Sharepoint 2010 Code

using System;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using System.Data;
using System.Data.SqlClient;

namespace SharePointProject4.CustomWebpart
{
[ToolboxItemAttribute(false)]
public class CustomWebpart : WebPart
{
protected override void CreateChildControls()
{

SqlConnection cn = new SqlConnection("Data Source =ex;Failover Partner=tracedb; Initial Catalog

=_MSCRM_CUSTOM;User Id=admin;password=password#");
DataSet ds = new DataSet();
string str = "select opportunityid,SPUrl from dbo.opportunity_spurl";
SqlDataAdapter da = new SqlDataAdapter(str ,cn );
da.Fill(ds);

using (SPSite oSPsite = new SPSite("http://dev:90"))
{
oSPsite.AllowUnsafeUpdates = true;

using (SPWeb oSPWeb = oSPsite.OpenWeb())

oSPWeb.AllowUnsafeUpdates = true;

// /* 1. create list from custom ListTemplate present within ListTemplateGalery */
// SPListTemplateCollection lstTemp = oSPsite.GetCustomListTemplates(oSPWeb);
// SPListTemplate template = lstTemp["custom template name"];
// oSPWeb.Lists.Add("List Name", "Description", template);


// /* 2. create list from sharepoint list content type (e.g. Links) */
// oSPWeb.Lists.Add("List Name", "Description", SPListTemplateType.GanttTasks);

// oSPWeb.AllowUnsafeUpdates = false;
// }

// oSPsite.AllowUnsafeUpdates = false;


// SPSite site = new SPSite("http://dev:90");

// SPWeb web = site.OpenWeb();

// web.AllowUnsafeUpdates = true;

// SPListCollection coll = web.Lists;

// SPListTemplateCollection tmplcoll = web.ListTemplates;


// SPFieldCollection fieldcoll;

// SPListTemplate temp = tmplcoll[0];

//Guid gd = coll.Add("CRMCustomList", "My Sharepoint List", temp);
//coll[gd].Fields.Add("SPUrl", SPFieldType.Text, false);

// //coll[gd].Fields.Add("Test2", SPFieldType.Text, false);
//coll[gd].Fields.Add("OpportunityId", SPFieldType.Number, false);

// coll[gd].Update();

// string defaultquery = coll[gd].Views[0].Query;

// SPViewCollection viewcoll = coll[gd].Views;

// Guid anothergd = coll[gd].Views[0].ID;

// viewcoll.Delete(anothergd);

// System.Collections.Specialized.StringCollection viewfields = new System.Collections.Specialized.StringCollection();

// viewfields.Add("Title");

// viewfields.Add("SPUrl");

// viewfields.Add("OpportunityId");

// coll[gd].Views.Add("All Items", viewfields, defaultquery, 100, true, true);

// coll[gd].Update();


// SPSite site = SPContext.Current.Site;
//site.AllowUnsafeUpdates = true;
//SPWeb web = site.RootWeb;
//web.AllowUnsafeUpdates = true;

//SPListCollection coll = web.Lists;
//SPListTemplateCollection temlcoll = web.ListTemplates;
//SPDocTemplateCollection docTemp = web.DocTemplates;
//SPFieldCollection fieldcoll = web.Fields;

//SPListTemplate temp = temlcoll[0];
////

////SPListTemplateType.CustomGrid is a list template that works like table in ASP.NET or Excel sheet.
//Guid gd = coll.Add("User_Data", "A custom list to store user data", SPListTemplateType.CustomGrid);
//coll[gd].Fields.Add("UserId", SPFieldType.Text, true);
//coll[gd].Fields.Add("Designation", SPFieldType.Text, true);

////a custom field type if you have one
//SPField objAge = coll[gd].Fields.CreateNewField("AgeTextBox1", "User Age1");

//coll[gd].Fields.Add(objAge);

////update the custom list with all those newly created fields
//coll[gd].Update();

//// //create the view for display in the site - both sides must match

//string defaultquery = coll[gd].Views[0].Query;
//SPViewCollection viewcoll = coll[gd].Views;
//Guid anothergd = coll[gd].Views[0].ID;
//viewcoll.Delete(anothergd);

//System.Collections.Specialized.StringCollection viewfields = new System.Collections.Specialized.StringCollection();

////Title field is always needed by SharePoint sites and it is always automatically created by WSS/MOSS even though you

didn't tell it to
//viewfields.Add("Title");
//viewfields.Add("UserId");
//viewfields.Add("Designation");


//coll[gd].Views.Add("View name", viewfields, defaultquery, 100, true, true);
//coll[gd].Update();



//// SPSite site = SPContext.Current.Site;
//// SPWeb web = site.OpenWeb();
//// web.AllowUnsafeUpdates = true; //get the list of list templates from the web
////SPListTemplateCollection customListTemplates = site.GetCustomListTemplates(web); //create the connection library using

the uploaded list template
//// SPListTemplate listTemplate = customListTemplates["listtemplatename"];
//// web.Lists.Add("User_Data", "A custom list to store user data", listTemplate);//A custom list to store user data
//// web.Update();

//SPSite site = SPContext.Current.Site;
//SPWeb web = site.RootWeb;
//web.AllowUnsafeUpdates = true;
//Guid listId = web.Lists.Add("Test Custom List", "The new custom list", SPListTemplateType.GenericList);
//SPList list = web.Lists[listId];
//web.AllowUnsafeUpdates = false;
//site.Dispose();
//web.Dispose();

// using(SPSite mySite = new SPSite(SPContext.Current.Site.Url))

// {

// using(SPWeb spWeb = mySite.OpenWeb())

// {

// SPListTemplateCollection listTemplates = mySite.GetCustomListTemplates(spWeb);



// SPListTemplate listTemplate = listTemplates["GeneralContact"];



//spWeb.Lists.Add("NewContact", "New Contact", listTemplate);




// }

// }





SPSite site = new SPSite("http://dev:90/");

SPWeb web = site.OpenWeb();

web.AllowUnsafeUpdates = true;

SPListCollection coll = web.Lists;

SPListTemplateCollection tmplcoll = web.ListTemplates;



SPFieldCollection fieldcoll;

SPListTemplate temp = tmplcoll[0];

Guid gd = coll.Add("Custom121", "CustomCRM", temp);

coll[gd].Fields.Add("SPUrl", SPFieldType.Text, false);

coll[gd].Fields.Add("OpportunityId", SPFieldType.Text, false);


coll[gd].Update();


coll[gd].Items.Add();


string defaultquery = coll[gd].Views[0].Query;

SPViewCollection viewcoll = coll[gd].Views;

Guid anothergd = coll[gd].Views[0].ID;

viewcoll.Delete(anothergd);



System.Collections.Specialized.StringCollection viewfields = new System.Collections.Specialized.StringCollection();

viewfields.Add("Title");

viewfields.Add("SPUrl");

viewfields.Add("OpportunityId");



coll[gd].Views.Add("All Items", viewfields, defaultquery, 100, true, true);

coll[gd].Update();
//coll[gd].Items[0]["SPUrl"] = "aa";
//coll[gd].Items[0].Update();
//list.items[0]["MyField"] = "text";
//list.items[0].Update();

//SPList List = web.Lists["Custom"];
//string s = ds.Tables[0].Rows[0][1].ToString();
//List.Items.Add(ds.Tables[0].Rows[0][0].ToString());
}
}
}


Sharepoint: Adding choice fields programmatically


As I know I will forget this, and I couldn't find any decent examples on the web to do this, the code below shows how to add

a choice field programmatically to a sharepoint list (with populated choices). Note that the class will need to reference the

Microsoft.Sharepoint namespace.

SPWeb web = new SPSite("http://localhost/sites/demosite").OpenWeb();
web.Lists.Add("Test List", "Test list description", SPListTemplateType.GenericList);


web.Lists["Test List"].Fields.Add("ExampleChoiceField", SPFieldType.Choice, false);


SPFieldMultiChoice choice = (SPFieldMultiChoice)web.Lists["Test List"].Fields["ExampleChoiceField"];
choice.Choices.Add("hello");
choice.Choices.Add("world");
choice.Update();
*************************
Building a SharePoint custom site definition with a project tasks list and a listviewwebpart in Gantt view on the homepage.


Webtemplate1


WebTemplateID issues –.WebTemplateID doesn’t report what you’d think

http://www.sp2010blog.com/Blog/Lists/Posts/Post.aspx?ID=49

Hide View All Site Content from Site Actions Menu SharePoint 2010
http://www.sp2010blog.com/Blog/Lists/Posts/Post.aspx?ID=40

SharePoint 2010 Site Template IDs

http://www.sp2010blog.com/Blog/Lists/Posts/Post.aspx?ID=48

Twitter Web Part - Works with Authentication :)

http://www.sp2010blog.com/Blog/Lists/Posts/Post.aspx?ID=22

Could SharePoint 2013 be SharePoint 2012?

If you were around back in 2009, and chances are you were, you know that I keep my ears close to the ground on what’s going on with new versions of SharePoint.

However, I’ve also paid close attention to what’s going on with the beta and leaked information revolving around Office 15. It seems that the rumors indicate a 2012 release of Office 15, and that got me thinking: Perhaps that means the next version of SharePoint is in fact SharePoint 2012.

I don’t think so now, however, and let me tell you why.

I know the cycle at Microsoft says it should be three years between a major Office release, but with the state of completion of Windows 8, and with the new Metro interface making an appearance, perhaps Microsoft aims to get Office 15 out as soon as possible, maybe even in 2012.

It wouldn’t make any sense to leave SharePoint behind then. Microsoft would want the Office client suite to take advantage of the latest and greatest, and that leads me to believe that if Office comes out named 2012, then SharePoint will be so too.

Scouring the interwebs for Office leaks tells no story about the name; it’s all called Office 15. Based on that, the only safe thing would be to call it SharePoint 15. However, a name isn’t the product, so let’s examine what we know.

1. SharePoint 2010 came out in May 2010.
2. SharePoint 2010 was a huge deal for Microsoft 12 months before release
(you may even remember the controversy around my SharePoint 2010 Beta series)
3. Even if SharePoint vNext comes out in late 2012, considering it’s already late 2011 now, it is highly unlikely that Microsoft will drop the bomb during SPC11.
4. None of my usual sources of behind-the-scenes information knows anything about SP vNext. Either Microsoft suddenly managed to clamp down every piece of information or there simply isn’t any information there yet.

However, the most compelling argument against the next version of SharePoint being SharePoint 2012 is this: The Office 15 client suite consistently refers to SharePoint 2010 and SharePoint 2013, for example in Visio, where you can create workflows for either SharePoint 2010 or SharePoint 2013. In fact, in Visio, even the next version of SharePoint Designer is called “SharePoint Designer 2013”.

Although it is still possible that SharePoint 2013 comes out in 2012, it will probably still be called SharePoint 2013, just as SharePoint 2007 was released in 2006.

Wednesday, October 19, 2011

SharePoint Health Analyzer

SharePoint Health Analyzer

SharePoint 2010 Ribbon Controls -

SharePoint 2010 Ribbon Controls

Creating a SharePoint 2010 Ribbon extension - part 1

Creating a SharePoint 2010 Ribbon extension - part 2

Creating FlyoutAnchor in SharePoint 2010 ribbon




/**********************************ECB Menu*************************\

http://msdn.microsoft.com/en-us/library/cc768565(v=office.12).aspx

http://www.chakkaradeep.com/post/SharePoint-Hiding-Menu-Items-from-the-Edit-Control-Block.aspx

http://weblogs.asp.net/shailesh/archive/2010/07/07/sharepoint-2010-introduction-to-client-object-model.aspx

The SharePoint 2010 4TB content database limit fine prints - just a warning!

The SharePoint 2010 4TB content database limit fine prints - just a warning!

Content database limits


Service Pack 1 for SharePoint 2010 is here

Content Type,List Templates Ids,Create Site Definition list definition/instance Features &Feature Stapling

Content Type in SharePoint

Create folder programatically in SharePoint Document library


Step By Step Guide to Create a Task List in SharePoint

Step By Step Guide to List Events Handling in SharePoint


Insert Multiple User in SharePoint list


SharePoint List Tutorial


Populating file names from SharePoint Document library in a drop down list


Programmatically adding document to SharePoint Document library


SharePoint 2010 Base Types, List Template and Definition IDs, and Content Types IDs


Create Custom Lists in CAML based on existing List Templates


How to determine your list template


Display All Base Content Type id

How to: Add a Content Type to a Site


Displaying Data by Using the SPGridView Control in Windows SharePoint Services 3.0


SharePoint 2010 List Definition using Visual Studio 2010


How to: Create an External Content Type Based on a Web Service
How to: Create an External Content Type Based on a SQL Server Table

Attributes for AD Users (Windows 2000 / Windows 2003)
Restore Deleted Site/Site Collections in SharePoint 2010 - SP1




List of Share Point 2007 site template names

Display Name Template name
Team Site STS#0
Blank Site STS#1
Document Workspace STS#2
Wiki Site WIKI#0
Blog BLOG#0
Basic Meeting Workspace MPS#0
Blank Meeting Workspace MPS#1
Decision Meeting Workspace MPS#2
Social Meeting Workspace MPS#3
Multipage Meeting Workspace MPS#4
Document Center BDR#0
Records Center OFFILE#1
Personalization Site SPSMSITE#0
Site Directory SPSITES#0
Report Center SPREPORTCENTER#0
Search Center with Tabs SRCHCEN#0
Search Center SRCHCENTERLITE#0
Publishing Site CMSPUBLISHING#0
Publishing Site with Workflow BLANKINTERNET#2
News Site SPSNHOME#0

Deleting all items from lists
----------------------------------
* Create a new console application and add reference to Microsoft.SharePoint.dll
* Use the below code.


using System;
using Microsoft.SharePoint;
using System.Collections.Generic;
using System.Text;

namespace SKN.CleanSPLists
{
class Program
{
static void Main (string[] args)
{
string webUrl = "http://ws2003";
bool deleteFromRecycleBin = true;
List listNames = new List();
listNames.Add("List Title 1");
listNames.Add("List Title 2");
listNames.Add("List Title 3");
listNames.Add("List Title 4");

using (SPSite site = new SPSite(webUrl))
{
using (SPWeb web = site.OpenWeb())
{
foreach (var listName in listNames)
{
SPList list = web.Lists[listName];

Console.WriteLine("Purging list: " + list.Title);
Console.WriteLine("Base Type: " + list.BaseType.ToString());

StringBuilder sbDelete = BuildBatchDeleteCommand(list);
web.ProcessBatchData(sbDelete.ToString());

Console.WriteLine("Done cleaning list : Presss a key to continue with next list.");
Console.WriteLine("");
Console.ReadKey();
}


if (deleteFromRecycleBin)
{
Console.WriteLine("Cleaning Recycle bin");
web.RecycleBin.DeleteAll();
site.RecycleBin.DeleteAll();
Console.WriteLine("Done cleaning Recycle bin");
Console.ReadKey();
}
}
}
}


///
/// Builds a batch string with a list of all the items that are to be deleted.
///

/// ///
private static StringBuilder BuildBatchDeleteCommand (SPList spList)
{
StringBuilder sbDelete = new StringBuilder();
sbDelete.Append("");
string command = "" + spList.ID +
"
{0}Delete
";

foreach (SPListItem item in spList.Items)
{
sbDelete.Append(string.Format(command, item.ID.ToString()));
}
sbDelete.Append("
");
return sbDelete;
}
}
}


Click here



Create Site Definition and Staple list definition/instance Features

Creating a new SharePoint site programmatically

Add an event receiver to a specific list programmatically



All About List/Site Definition


SharePoint 2010 Feature Stapling


Building a SharePoint custom site definition with a project tasks list and a listviewwebpart in Gantt view on the homepage.


SharePoint 2010 site templates not showing in create site page, How to get them?


SP 2010: How To - Relational lists in SharePoint 2010

How to use Sharepoint Lookup fields, Part 1.


Provisioning a SharePoint 2010 Lookup Column with CAML


SharePoint: Creating a custom field


SharePoint Feature Stapling

Create SPFieldLookup programatically


http://sp2010filteredlookup.codeplex.com/


Dynamically Creating Sharepoint Content Type

Must know Basic SharePoint terms

Must know Basic SharePoint terms

Main Difference between MOSS and WSS

LINQ to SharePoint 2010 and RestFul Using Microsoft ADO.NET Data Services and LINQ to XML

LINQ to SharePoint 2010

Versioning in SharePoint


All You wanted to know About LINQ To SharePoint


Using Microsoft ADO.NET Data Services


REST API in SharePoint 2010 for listdata.svc


Intro to Querying Lists with REST and ListData.svc in SharePoint 2010


Overview of using REST in SharePoint 2010


SharePoint 2010: Create Custom WCF Service



Creating Custom WebService In SharePoint 2007


Getting Started with SharePoint Web Services using LINQ to XML


Example using the new SharePoint 2010 REST interface with JSON and JQuery


Using the OData Rest API for CRUD Operations on a SharePoint List




SP 2010: Getting started with LINQ to SharePoint in SharePoint 2010


linq-to-sharepoint-2010

Workflow Architecture

Workflow Architecture


Types Of Workflows

Creating a SharePoint Designer workflow

Workflow actions for document sets

Add Sequential Workflow to a document library in SharePoint



8 Steps to create workflows using SharePoint designer


SharePoint Designer 2010 Workflow Second Look

Package and Deploy a SharePoint Designer Workflow

Step by Step Guide in Developing your own Workflow in Sharepoint 2010

Sharepoint 2010 workflows


Workflows1

Link1
Link2
Link3
Link4

Limk5

Where's sharepoint binaries located ?

Where's sharepoint binaries located

What is SSO


What is MOSS ?


Programatically removing webpart from all site collections

Create Custom Theme Using Microsoft Office for SharePoint 2010

Create Custom Theme Using Microsoft Office for SharePoint 2010

Custom Sandbox Application Page in SharePoint2010

Create a Web Part Page with a Web Part in Sharepoint 2010

Claims Walkthrough: Creating Claims Providers for Trusted Login Providers for SharePoint 2010

Claims Walkthrough: Creating Claims Providers for Trusted Login Providers for SharePoint 2010

Application Lifecycle Management in SharePoint 2010

SharePoint Online: An Overview for Developers

Tuesday, October 18, 2011

Developer Dashboard in SharePoint 2010

Developer Dashboard in SharePoint 2010

SharePoint 2010: Professional Developer Evaluation Guide and Walkthroughs


How to Enable the Developer Dashboard in SharePoint 2010


Developer Dashboard in SharePoint 2010

SharePoint 2010 Developer Dashboard

SharePoint 2010 release date announced

SharePoint 2010 and Office 2010 release date announced and it will be on May 12, 2010. Read more about it here.
we officially announced that May 12th, 2010, is the launch date for SharePoint 2010 & Office 2010. In addition, we announced our intent to RTM (Release to Manufacturing) this April 2010.

It’s an exciting time for us! We hope you can virtually join us on May 12th at 11am EST to listen to Stephen Elop, President of the Microsoft Business Division, announce the launch.

SharePoint 2010 & Office 2010 Launch Dates Announced!

Videos

Showing 'Please wait' message, not when there is an error in the validation


Showing 'Please wait' message, not when there is an error in the validation






Monday, October 17, 2011

CLOUD COMPUTING

1:Key Definition of Cloud Computing

2:Windows Azure



SharePoint 2010 and Windows Azure Training Course


Windows Azure Platform FAQs


SharePoint 2010 & Windows Azure: How they Play Together?


Clearing the Fog around Cloud Computing

Integrating azure & Sharepoint 2010


Use Windows Azure as your SharePoint Records Center



Windows Azure SDK 1.4


Section 1: Consuming a Windows Azure-Hosted WCF Service from SharePoint


Windows Azure Platform FAQs


Integrating azure & Sharepoint 2010



Cloud compluting
http://www.amazon.com/Cloud-Computing-Bible-Barrie-Sosinsky/dp/0470903562

http://www.amazon.com/Cloud-Computing-Dummies-Judith-Hurwitz/dp/0470484705/ref=pd_sim_b_6


http://www.free-ebooks-library.com/cloud-computing-bible/


http://www.filesonic.in/file/1584403401/ebook_0470903562_Cloud_Computing_Bible.zip

http://www.ebooktofreedownload.com/ebook/ebook-cloud-computing-with-the-windows-azure-platform-wrox-programmer-to-programmer.php

http://www.ebook3000.com/Cloud-Computing-with-the-Windows-Azure-Platform_35063.html

Errors

I booted up my server this afternoon and tried to deploy a SharePoint solution package. I ran a deployment script which called stsadm commands to install and deploy several wsp files. The install script looks something like:





SET stsadm ="%CommonProgramFiles%\Microsoft Shared\Web Server Extensions\12\BIN\STSADM.EXE"

%stsadm% -o addsolution -filename "MySolutionPackage.wsp"

%stsadm% -o execadmsvcjobs

%stsadm% -o deploysolution -name "MySolutionPackage.wsp" -allowgacdeployment -allcontenturls -immediate –force

%stsadm% -o execadmsvcjobs

Nothing special is happening here. After both the addsolution and deploysolution commands I get the following error:

The timer job for this operation has been created, but it will fail because the administrative service for this server is not enabled. If the timer job is scheduled to run at a later time, you can run the jobs all at once using stsadm.exe -o execadmsvcjobs. To avoid this problem in the future, enable the Windows SharePoint Services administrative service, or run your operation through the STSADM.exe command line utility.

I checked the services and found out that the Windows SharePoint Services Administration service wasn't running. After starting the service the errors weren't reproduced.

1:The timer job for this operation has been created, but it will fail because the administrative service for this server is not enabled

********************************************
"The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again"



1: The security validation for this page is invalid

2:"The security validation for this page is invalid" error when updating objects through SharePoint object model
3:Web Page Security Validation

4:The security validation for this page is invalid




**************************************************************************
Error occurred in deployment step ‘Recycle IIS Application Pool’: The communication object, System.ServiceModel.InstanceContext, cannot be used for communication because it has been Aborted
When we are developing custom code through Visual Studio 2010 for SharePoint 2010 sites and when we try to deploy the solution then we might see below error.

"Error occurred in deployment step ‘Recycle IIS Application Pool’: The communication object, System.ServiceModel.InstanceContext, cannot be used for communication because it has been Aborted."

When I see this very first time and did not get any clue of what it is looking for and why it is not able to communicate to SharePoint sites. After some time, I though of doing some combinations and all failed in deploying the custom piece to SharePoint.

Solution:

1. Sometimes when I do rebuild the project and didn't hit "Package" and deploy directly from Visual Studio it successful.
2. If it is not successful then the only way is RESTART your visual studio.

Frustrated? Yes, me too. But there is no way I found.


The remote server returned an error: (407) Proxy Authentication Required
1)http://www.codeguru.com/forum/showthread.php?t=492528
2)The remote server returned an error: (407) Proxy Authentication Required

3)HttpWebRequest WebExcepton: The remote server returned an error: (407) Proxy Authentication Required.


The maximum number of Web Parts for all zones on this page has been exceeded
Error: The maximum number of Web Parts for all zones on this page has been exceeded

I came across this message today when I was working on a page that has more than 50 web parts on it.

Later after a bit of research I learnt that

* The limit is customizable in web.config file,
* 50 (default) - http://technet.microsoft.com/en-us/library/cc262787.aspx
* 100 (recommended max) - http://technet.microsoft.com/en-us/library/cc287743.aspx


However, no documentation has been found about

* The maximum number of web parts per web part zone
* The maximum number of web part zones per page



**********************************************************
Please modify the following configration to increase the MaxZoneParts in the web.config for the web application.



Do not forget to restart IIS to make the setting work.

_________________________________________________________________
When you are looking at the page append the following at the end of your URL: ?contents=1

Your URL should look something like this:

http://contoso/site/default.aspx?contents=1

This will open the web part maintenance page. How many web parts are listed? You might have a large number of closed web parts that aren't showing on the page but are actually still there.

----------------------------------------------------------------------------------
Error in Activate Features from Visual Studio

cenario:
I was re-deploying a solution from Visual Studio. My solution had custom Fields / Content Type declarations and was getting deployed to an existing site collection.

I noticed following errors :

Error occurred in deployment step 'Activate Features': The field with Id {GUID} defined in feature {GUID} was found in the current site collection or in a subsite.

OR

Error occurred in deployment step 'Activate Features': The content type with Id {GUID} defined in feature {GUID} was found in the current site collection or in a subsite.

Reason:
First of all this is not a problem with Solution. As if you use STSADM / Powershell to deploy and activate features, it will work fine.

Actually there is something going on with VSSPHost4 process.

Solution:
There are 2 solutions to this issue.

1. Close the Visual Studio and start again :)

2. Kill VSSPHost4 process. This can be done from SharePoint Powershell Management shell command prompt

stop-process -processname vssphost4 -force

SharePoint 2010 - Search Error - The search service is not able to connect to the machine that hosts the administration component

SharePoint - Server error: The URL is invalid, it may refer to a nonexistent file or folder or refer to a valid file that is not in the current Web


Error: SharePoint folders that are created programatically are hidden.

SharePoint 2010 - Access denied for users that have full control on the site


Sharepoint 2010 - An exception occurred when trying to issue security token: The server was unable to process the request due to an internal error


How to build a dynamic query for SPQuery with multiple OR conditions programatically?

"The remote server returned an error: (401) Unauthorized." exception when you try to access a file in SharePoint Document Library"


Making a SharePoint 2010 site externally available (Alternate Access Mappings, Host Header Bindings)


SharePoint : System.InvalidOperationException: The farm is unavailable.



Welcome to 404 Error Pages .com

503 Service Unavailable


HTTP Status Codes

Get help with website error messages (HTTP errors)



Locale IDs Assigned by Microsoft

Page Layout: This Control is Currently Disabled.


Locale IDs (LCID) Assigned by Microsoft in SharePoint


Problem With List Views That Exceeds Browser Window Width

SharePoint 2010- Social Feedback and Tags

"What to know before learning SharePoint 2010"

STEP1:What to know before learning SharePoint 2010
STEP2:Hardware/Software requirements for SharePoint 2010

Top 10 Reasons forUpgrading to Sharepoint 2010


SharePoint Developer Building Blocks: Technologies for Creating SharePoint Applications

Integrating External Data with SharePoint 2010

SharePoint 2010 Top 10 Features and Resources
STEP2:SharePoint 2010 editions
1)SHAREPOINT 2010 COM

2)Creating a site using object model in forms authentication

3)Using the SharePoint 2010 Client Object Model
STEP3:1)Introduction to Templates and Definitions
2)Site Definitions Vs. Site Templates
3)SharePoint 2010 and web templates

3a)Using Web Templates to create Site Collections Example

4)Server and Site Architecture Overview
3b:Web Templates – What base template should I use?

STEP4:List all users and groups from SharePoint site collection

4a)Creating a Folder in a SharePoint List and adding Items to it programatically
4b)Programmatically Creating a SharePoint Content Type
4c)Sandboxed Solutions Overview by RAMESH


4d)Save site as template link missing in site settings
4e)Adding a 'Save site as template' Link to Site Settings in WSS v3/MOSS 2007 using a CustomAction Feature

Step5:Workflows

5a:Options for Deploying Reusable Workflows in SharePoint 2010


STEP6):0)SharePoint 2010 mixed Authentication
1:FBA
2:SharePoint 2010 Claims-Based Auth with ADFS v2


STEP7):All About Web Service in .Net
2)Getting Started With SharePoint Web Services
3)Web Services


4)Sharepoint Discoverter – Convert .wsdl/.disco files for Sharepoint

5:WSDL Create Proxy Class

6:Creating a Custom WCF Service in SharePoint Foundation

7:SharePoint Ports, Proxies and Protocols .... An overview of farm communications

8:InfoPath and Web Service data connection



9:SharePoint Ports, Proxies and Protocols .... Search Communication


7a):SharePoint 2010 Filtered Lookup Field
7b):How to Reduce the Size of Social Tagging Buttons in SharePoint 2010
7c)Posts from the 'OCT 2011 Entries' Category
7d)SharePoint Publishing Features Functionality

7e)SharePoint Application Pages Vs Site Pages,How to programmatically set default publishing page layout

7g)Masterpages

STEP8:Microsoft Dynamics CRM 2011 - Useful Links
1)8a:What is CRM (and xRM?)
8b)CRM

Useful link Click here

STEP9:
Guide to Installing and Booting Windows 8 Developer Preview off a VHD (Virtual Hard Disk)

9A)WINDOWS7 VHD
STEP10)SharePoint 2007 and WSS 3.0 Dispose Patterns by Example
10a:Deploying a Web Part&Debugging Web Parts,Code Access Security

STEP11:What is SharePoint 2007 ?

SYEP12:How to Use CAML Query to get Data from SharePoint 2007 List
STEP12:CACHING IN SHARE POINT 2010 BEST PRACTICE

step13:Feature Stapling In SharePoint 2010
12a:Features and their GUID’s in SP2010

STEP13:Working with Large Lists in SharePoint 2010 - List Throttling
1:Throttling: New Features of List in SharePoint 2010
2:Large List Improvements in SharePoint 2010


STEP 14:Business Connectivity Services
1:SharePoint 2010 Business Connectivity Services (BCS) Links
2:BCS External List Limitations
3:SharePoint 2010 RTM and BCS Permissions

STEP15:POWERSHELL
1:PowerShell Tool to Enumerate the Content Type Usage in SharePoint 2010


STEP16:SharePoint 2010 DEVELOPMENT
16a)Seven pages which doesn’t user Master Pages
In SharePoint 2010, following are pages which doesn’t use the Master page but still customizable :-

1) AccessDenied.aspx

2) Confirmation.aspx

3) Error.aspx

4) Login.aspx

5) Reqacc.aspx

6) SignOut.aspx

7) WebDeleted.aspx



16b)LINQ To SharePoint

17)What’s New and Improved in SharePoint 2010?


List Definitions versus List Templates and deciding on the correct customization approach


Deciding Between Site Definitions and Custom Site Templates

Saturday, October 01, 2011

Sharepoint 2010 CodePlex

* Customer Care Portal - SharePoint 2010 for Internet Sites
* Deploying a InfoPath 2010 List Form in a Visual Studio 2010 solution package HERE Click

* SharePoint 2010 automatic sign-in with mixed authentication
* SharePoint 2010 Conditional Lookup Control

* SharePoint 2010 Custom Login


* SharePoint 2010 Feature Upgrade Kit

* SharePoint 2010 Filtered Lookup Field
* SharePoint 2010 Master Page Picker

* SharePoint 2010 MasterPages & CSS

* SharePoint 2010 Search Results Customization


* SharePoint 2010 Server-Side-Scanner WebPart - embDocumentInhalator

* SharePoint Manager 2010

* Starter Master Pages for SharePoint 2010

* Stramit SharePoint 2007 Caml Viewer



1)SharePoint Language translator web part using Sandbox

2)Reference webpart in SharePoint 2010

SharePoint 2010 templates

Microsoft released 10 new SharePoint themes

http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=964

SHAREPOINT 2010 INTERVIEW QUESTIONS























Q. How does Client object model works?
Ans. When we use SharePoint client API’s to perform a specific task, the SharePoint Foundation 2010 managed client object model bundles up these uses of the API into XML and sends it to the server that runs SharePoint Foundation. The server receives this request, and makes appropriate calls into the object model on the server, collects the responses, forms them into JavaScript Object Notation (JSON), and sends that JSON back to the SharePoint Foundation 2010 managed client object model. The client object model parses the JSON and presents the results to the application as .NET Framework objects (or ECMAScript objects for ECMAScript).
Q. How many types of Client Object model extension are available in 2010 and when would you use one or the other.
Ans. To develop rich client side solutions, three set of client-side APIs has been introduced in the Microsoft.SharePoint.Client namespace. The three APIs are targeted for three different types of clients.
1. .net Managed applications – These are used when we have to create console applications or window applications, web applications which are not running inside SharePoint Contex.
2. For Silverlight applications
3. ECMAScript – It is a client object model extension for using with JavaScript or JScript. This is used for creating applications which are hosted inside SharePoint. For example, web part deployed in SharePoint site can use this JavaScript API for accessing SharePoint from browser using JavaScript.
Q. What is difference between Load() and LoadQuery() methods ?
Ans. Load method populates the client object directly with what it gets data from the server i.e. a collection object like ListItemCollection etc. but LoadQuery returns the data as a completely new collection in IEnumerable format. Other major difference is that the Collections that you load using the Load() method are eligible for garbage collection only when the client context variable itself goes out of scope where as, in these collections go out of scope at the end of IEnumerable list.
Q. How can you write efficient and better performing client object applications ?
Ans. You can always use Lambda expressions in your queries to return only specific properties that will be used in your block. You can also use LoadQuery() method and specify multiple levels of properties to load for e.g. while returning specific properties of the lists using LoadQuery(), you can also specify the fields to return from each list to optimize the data access.
Q. What are the Authentication methods for your client object model application ?
Ans. Basically there are three (3) authentication options you can use when you’re working with the Client Object Model in SharePoint 2010:
* Anonymous
* Default
* FormsAuthentication
You can specify clientContext.Authentication = Anonymous\Default\FormsAuthentication, If you do not choose an authentication method in your code, the application will default to using the client’s Windows Credentials (DefaultCredentials).
Q. How do you access ECMAScript object model API’s ?
Ans. The ECMAScript library is available in a number of JS files in the LAYOUTS folder. The main file among number of .js files is SP.js. When you include this file in the APSX page using a ScriptLink control, all other required JS files are loaded automatically. By linking SP.js to your page, the SP namespace gets registered. SP is the SharePoint namespace that contains all objects. For debugging purposes every js file also has a ‘debug’ equivalent in the same folder.

Q. What is the purpose of calling clientContext.ExecuteQuery() ?
Ans. ExecuteQuery gives you the option to minimize the number of roundtrips to the server from your client code. All the components loaded into the clientcontext are executed in one go.
Q. Why would you use LINQ over CAML for data retrieval?
Ans. Unlike CAML, with LINQ to SharePoint provider, you are working with strongly typed list item objects. For example, an item in the Announcements list is an object of type Announcement and an item on a Tasks list is an object of type Task. You can then enumerate the objects and get the properties for your use. Also, you can use LINQ syntax and the LINQ keywords built into C# and VB for LINQ queries.
Q. Can we use our custom master page with the application pages in SharePoint 2010 ?
Ans. With 2010, you can now set whether the pages under _Layouts use the same Master Page as the rest of your site. You can enable or disable this functionality through the web application settings in Central Administration. This however, is not applicable to your custom application pages. If you want your custom applictaion page to inherit the site master page you must derive it from Microsoft.SharePoint.WebControls.LayoutsPageBase class.
Q. What are WebTemplates and Site Definitions ?
Ans. Site definitions consist primarily of multiple XML and ASPX files stored on a front-end Web server in folders under the %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\SiteTemplates directory.
Custom Web templates on the other hand, are stored in the database, and are created using an existing site, with or without its specific content, as a model. This provides a means for reusing sites that you have customized.In some ways, Web templates continue to depend, throughout their lifecycle, on the site definition that is their ultimate foundation.
Q. How do you write to SharePoint ULS logs in 2010 ?
Ans. In SharePoint Foundation, ULS exposes configurable settings in two ways, through the – Object model and Windows PowerShell cmdlets. For writing to SharePoint ULS logs developers can can use Diagnostics Service, which will make the customized categories viewable in the administrative UI for our errors.
or they can use the number of cmdlets available for accessing ULS logs using powershell. Some of the cmdlets are Get-SPDiagnosticConfig ,Get-SPLogEvent etc.

Q. What does CMDUI.XML contain?
Ans. The definitions for the out-of-the-box ribbon elements are split across several files in the SharePoint root, with TEMPLATE\GLOBAL\XML\CMDUI.XML being the main one.
Q. What has Changed in SharePoint 2010 Object model?
Ans. Microsoft has replaced the “12 hive” structure that we had in SharePoint 2007 with “14 Hive” structure in 2010.
It has apparently added four new folders to its hive.
The Folders are :
* Policy
* UserCode
* WebClients
* WebServices
Q. How would you deploy WebPart Using Windows PowerShell?
Ans. At the Windows PowerShell command prompt (PS C:\>), type the below command :
Install -SPWebPartPack -LiteralPath “FullPathofCabFile” -Name “Nameof WebPart”
Q. How would you re-deploy the old custom solutions in SharePoint 2010.What Changes are needed to the old Solution files.
Ans. SharePoint 2010 object model contains many changes and enhancements, but our custom code will still compile and, will run as expected. You should however, rewrite and recompile any code that refers to files and resources in “12 hive”.
For Details See :
SharePoint Object Model – Backward Compatibility
Q. How would you add a link in the Ribbon?
Ans. You can add any link or Custom Action under any of the existing tabs of the ribbon or can create a new a new tab and place your links under it.
Q. What does CMDUI.XML contain?
Ans. The definitions for the out-of-the-box ribbon elements are split across several files in the SharePoint root, with TEMPLATE\GLOBAL\XML\CMDUI.XML being the main one.
Q. What are the Disadvantages of Using LINQ in your Code?
Ans. LINQ translates the LINQ queries into Collaborative Application Markup Language (CAML) queries thus adding an extra step for retrieving the items.
Q. What is different with SharePoint 2010 workflows ?
Ans. Some of the additions in workflow model are :
1. SharePoint 2010 workflows are build upon the the workflow engine provide .Net Framework 3.5.
2. In addition to the SharePoint lists we can now create workflows for SharePoint sites as well.
3. SharePoint Designer 2010 also has a new graphical workflow designer for designing workflows and deploying them directly to SharePoint.
4. Another Improvement in SharePoint Designer 2010 is that it now allows you to edit the out-of-the-box workflows that come with SharePoint.
Q. How does Ribbon works ?
Ans. A file called CMDUI.XML stays at the web front end which contains the Out-of-Box site wide Ribbon implementation i.e. all the Ribbon UI for the entire site. In addition to this you have a CustomAction for each ribbon component. These CustomActions have CommandUIExtentions block which has CommandUIDefinitions and CommandUIHandlers which make up the activity of the ribbon component. So, when the ribbon is loaded the CommandUIDefinition merges with Out-of-Box definition in the CMDUI.XML
Q. How will you use WebParts or other solutions Created in SharePoint 2007 in SharePoint 2010 ?
Ans. In SharePoint 2010 the 12 hive is now replaced by 14 hive, So we will rewrite and recompile any code that refers to files and resources in “12″ hive. In addition to we must recompile custom code written for Windows SharePoint Services 3.0 and Office SharePoint Server 2007 that does not run on IIS.
Q. What is the advantage in using Windows PowerShell over stsadm in SharePoint 2010 ?
Ans. Unlike stsadm, which accept and return text, Windows PowerShell is built on the Microsoft .NET Framework and accepts and returns .NET Framework objects.Windows PowerShell also gives you access to the file system on the computer and enables you to access other data stores, such as the registry and the digital signature certificate stores etc..
Q. What is REST ? How is it used in SharePoint 2010 ?
Ans. REST (Representational State transfer) is a protocol (powered by ADO.NET services) which is used for getting data out of sharepoint via Url. It is mostly used to access data from sharepoint even when you are not in the sharepoint context.
Q. What datatype is retured by REST ?
Ans. REST does not return an object of type SharePoint Site\List. Instead, it returns an XML output.
Q. What is a workflow?
Ans. Workflows are the way an organization functions, a series of actions that correspond to a work process, such as the process for purchase orders.SharePoint 2010 helps you automate these workflows, thereby increasing the efficiency and productivity of the organization.
Q. What are the types of workflow that you can design in SharePoint 2010.
Ans. you can design List Workflows, Reusable List Workflows and Site workflows using SharePoint designer 2010.
Q. What Reusable List Workflows and Site workflows ?
Ans.
Reusable List Workflows -
You can create a reusable list workflow (reusable workflow) in the top-level site in the site collection, and that workflow can be made globally reusable — meaning that the workflow can be associated to any list, library, or content type in the site collection. You can also create a reusable workflow in any subsite in the site collection; this workflow is available for reuse in that particular subsite.
Site workflows - A site workflow is associated to a site — not to a list, library, or content type. So unlike most workflows, a site workflow is not running on a specific list item. Because of this, many of the actions that are available for items not available for site workflows.
Q. Can you modify the Out-of-Box workflows in SharePoint 2010 ?
Ans. In SharePoint 2010, you have an option to customize the Out-of-Box workflows. The four most popular workflows in SharePoint Server 2007 — the Approval, Collect Feedback, Collect Signatures, Publishing Approval workflows — have been completely rebuilt as declarative reusable workflows, meaning that they are now fully customizable in SharePoint Designer 2010.
Q. What are events, actions, conditions and steps?
Ans. Lets look at this one by one.
Events - An event is what starts or initiates a workflow. Events can also be used to manage the timing of actions within a workflow, such as waiting for the status of an item to change. There are three events that can start a workflow:
* An item is created.
* An item is changed.
* A workflow participant clicks a start button on the SharePoint site.

Actions – An action is the most basic unit of work in a workflow. SharePoint Designer 2010 provides a set of ready-made, reusable actions for you to incorporate into your workflow.
For example, your workflow can:
* Create, copy, change, or delete list items (including documents).
* Check items in or out.
* Send an e-mail message.
Conditions - When you design a workflow, you can use the workflow editor to create rules that apply conditional logic to SharePoint sites, lists, items and content types. A rule establishes a condition where the workflow performs the associated action only if that condition is true. For example, you can create a rule where the workflow sends a reviewer an e-mail message only if an item is created by a specific person.
Q. What are Parallel and Serial actions ?
Ans. When you have more than one action associated with a condition, the actions can be set up to run at the same time (parallel) or one after another (serial), the default.
Q. What are the Types of forms associated with the workflow ?
Ans. With SharePoint Designer 2010, you can create three types of workflow forms:
Initiation form – An initiation form gathers information from the workflow participant when they start the workflow. It is automatically generated when you create the workflow in SharePoint Designer 2010. Initiation forms are displayed to users when they manually start a workflow on a given SharePoint item. With an initiation form, users can specify additional parameters or information about the workflow as it applies to the given SharePoint item.

Task form – A custom task form allows workflow participants to interact with tasks in the Tasks list specified for the workflow. With the Custom Task Wizard, you can easily create custom form fields and add them to a custom task form. When you finish designing the workflow, SharePoint Designer 2010 automatically generates the InfoPath or ASP.NET forms for your custom tasks.
Reusable workflow – association form – A reusable workflow, by default, only provides the fields common to all items, such as Created and Modified by. This is because a reusable workflow isn’t by default associated with a list, library, or content type. An association form enables you to associate fields with a reusable workflow so that the fields will be available when you design and run the workflow.
Q. When are these forms get created ? And how do you customize it ?
Ans. SharePoint Designer 2010 automatically generates the forms, but you can customize them by going to the settings page for the workflow, in the Forms section, click the form you want to customize. Workflow forms are either InfoPath or ASP.NET pages. They are stored on the SharePoint site with the workflow source files.
Reference Links
http://www.learningsharepoint.com/2010/07/02/sharepoint-2010-developer-interview-questions/ (Part-1)
http://www.learningsharepoint.com/2010/07/21/sharepoint-2010-developer-interview-questions-ii/ (Part-2)
http://www.learningsharepoint.com/2010/06/19/sharepoint-2010-interview-questions/
http://www.learningsharepoint.com/2010/06/05/interview-questions-sharepoint-2010/
http://www.learningsharepoint.com/2010/07/26/sharepoint-2010-workflow-interview-questions/

##################################################################################
50 SharePoint 2010 Interview Questions With Answers – IT Pro / Architect

In the tradition of providing relevant interview questions for SharePoint, and you can find my interview questions for SharePoint 2007 development here and the related answers here, I have put together interview questions for both a SharePoint 2010 IT Pro / Architect track after having to prepare to interview some folks for a local organization. As stated in the previous interview question postings, these questions will be targeted to a particular platform and thus for 2007 concepts while maybe sharing some broad concepts, you should visit the aforementioned pages in order to get this information. I am going to order these by major technology components so you can sorta pick and choose the questions that you think would be relevant for the particular SharePoint position that you seek to staff. Developer track questions will be coming along shortly, they just take a while to aggregate.
SharePoint 2010 Interview Questions – IT Pro / Architect

Basic Intro SharePoint Architecture Questions

1) What are Web Applications in SharePoint?

An IIS Web site created and used by SharePoint 2010. Saying an IIS virtual server is also an acceptable answer.

2) What is an application pool?

A group of one or more URLs that are served by a particular worker process or set of worker processes.

3) Why are application pools important?

They provide a way for multiple sites to run on the same server but still have their own worker processes and identity.

4) What are zones?

Different logical paths (URLs meaning) of gaining access to the same SharePoint Web application.

5) What are Web Application Policies?

Enables security policy for users at the Web application level, rather than at the site collection or site level. Importantly, they override all other security settings.

6) What is a site collection?

A site collection contains a top-level website and can contain one or more sub-sites web sites that have the same owner and share administration settings.

7) What are content databases?

A content database can hold all the content for one or more site collections.

8) What is a site?

A site in SharePoint contains Web pages and related assets such as lists, all hosted within a site collection.

9) What are My Sites?

Specialized SharePoint sites personalized and targeted for each user.

10) What is the difference between Classic mode authentication and Claims-based authentication?

As the name implies, classic authentication supports NT authentication types like Kerberos, NTLM, Basic, Digest, and anonymous. Claims based authentication uses claims identities against a against a trusted identity provider.

11) When would you use claims, and when would you use classic?

Classic is more commonly seen in upgraded 2007 environments whereas claims are the recommended path for new deployments.

12) Describe the potential components for both a single server, and multiple servers, potentially several tiered farms:

A single-server SharePoint Server 2010 environment leverages a built-in SQL Server 2008 Express database. The problems with this environment is scalability, not being able to install the with built-in database on a domain controller, the database cannot be larger than 4 GB, and you cannot use User Profile Synchronization in a single server with built-in database installation.

An example of a multiple tier farm would be a three-tier topology, considered one of the more efficient physical and logical layouts to supports scaling out or scaling up and provides better distribution of services across the member servers of the farm. This is considered a good architecture since one can add Web servers to the Web tier, add app servers to the application tier, and add database servers to the database tier.

SharePoint Backup and Restore Questions

13) What are some of the tools that can be used when backing up a SharePoint 2010 environment?

* SharePoint farm backup and recovery
* SQL Server
* System Center Data Protection Manager

14) What Microsoft tool can be used for incremental backups?

System Center Data Protection Manager

Managed Metadata Questions

15) What is Managed Metadata?

Managed metadata is a hierarchical collection of centrally managed terms that you can define, and then use as attributes for items.

16) What are Terms and Term Sets?

A term is a word or a phrase that can be associated with an item. A term set is a collection of related terms.

17) How do Terms And Term Sets relate to Managed Metadata?

Managed metadata is a way of referring to the fact that terms and term sets can be created and managed independently from the columns themselves.

18) Are there different types of Term Sets?

There are Local Term Sets and Global Term Sets, one created within the context of a site collection and the other created outside the context of a site collection, respectively.

19) How are terms created and used?

There are several ways; however the most common is to use the Term Store Management Tool.

20) How is Managed Metadata, and the related Term technology used?

Through the UI, the most common use is through the managed metadata list column which allows you to specify the term set to use. It also related to searching and enhancing the user search experience.

Sandbox Solutions Questions

21) What is a sandboxed solution?

Components that are deployed to run within the sandboxed process rather than running in the production Internet Information Services (IIS) worker process.

22) What are some examples of things that might run within the SharePoint sandbox?

Any of the following are acceptable answers:

Web Parts
Event receivers
Feature receivers
Custom Microsoft SharePoint Designer workflow activities
Microsoft InfoPath business logic

others….

23) Why are sandboxed solutions used?

Primarily because they promote high layers of isolation. By default they run within a rights-restricted, isolated process based around Code Access Security (CAS). Isolation is possible to increase with activities like running the sandboxing service on only specific SharePoint 2010 servers.

SharePoint Search Questions

24) What is a content source in relation to SharePoint search? What’s the minimum amount of content sources?

A content source is a set of options that you can use to specify what type of content is crawled, what URLs to crawl, and how deep and when to crawl. You must create at least one content source before a crawl can occur.

25) What is a search scope?

A search scope defines a subset of information in the search index. Users can select a search scope when performing a search.

26) What is a federated location with SharePoint search?

Federated locations provide information that exists outside of your internal network to your end-users.

27) How does managed metadata affect search?

Enhances the end-user search experience by mapping crawled properties to managed properties. Managed properties show up in search results and help users perform more successful queries.

28) What is query logging in SharePoint 2010?

Collects information about user search queries and search results that users select on their computers to improve the relevancy of search results and to improve query suggestions.

29) What authentication type does the SharePoint crawler use?

The crawl component requires access to content using NTLM authentication.

Services Architecture Questions

30) Please describe what a Service Application is in SharePoint 2010.

Service applications in SharePoint 2010 are a set of services that can possibly be shared across Web applications. Some of these services may or may not be shared across the SharePoint 2010 farm. The reason these applications are shared is the overall reduction of resources required to supply the functionality these services cultivate.

31) Please provide an example of one of these service applications.

Any of the below are acceptable answers:

Access Services
Business Data Connectivity service
Excel Services Application
Managed Metadata service
PerformancePoint Service Application
Search service
Secure Store Service
State service
Usage and Health Data Collection service
User Profile service
Visio Graphics Service
Web Analytics service
Word Automation Services
Microsoft SharePoint Foundation Subscription Settings Service

32) What are Service Application Groups used for?

Just provides a logical grouping of services that are scoped to a particular Web Application.

33) How are Service Applications deployed in terms of IIS (Internet Information Services)?

They are provisioned as a single Internet Information Services (IIS) Web site.

34) Explain how connections are managed with Service Applications.

A virtual entity is used that is referred to as a proxy, due to label in PowerShell.

35) What are some common examples of SharePoint 2010 services architectures, and what are the advantages of each design?

The three most popular designs are single farms with either a single service application group or multiple service application groups, or Enterprise services farms.

Single farms with a single service application group are generally the most common, and have the advantages of easy deployment, simple service application allocation, effective resource utilization and cohesive management.

Single farms with multiple service application groups is less common, and have the advantage of potential individual management of service applications as well as allowing data isolation, and while being more complex to deploy and maintain allows targeting of sites to particular service applications.

Enterprise Service Farms is pretty uncommon as it is a complete farm dedicated to Service Applications but promotes autonomous management and high levels of data isolation.

36) Are there any other type of relevant service architectures?

Depending on the environment requirements, a specialized farm can also be used in order to deploy specific services tailored to the organizational requirements which can aid in scaling out and conservation of resources.

37) What is the User Profile service?

Allows configuring and managing User profile properties, Audiences, Profile synchronization settings, organization browsing and management settings, and My Site settings.

38) What are User Profiles?

Aggregates properties from diverse identity content sources together to create unified and consistent profiles across an organization, used throughout the SharePoint environment.

39) What is Excel Services?

Allows sharing, securing, managing, and using Excel 2010 workbooks in a SharePoint Server Web site or document library. Excel Services consists of the Excel Calculation Services (ECS), Microsoft Excel Web Access (EWA), and Excel Web Services (EWS) components.

40) What is PerformancePoint Services?

Allows users to monitor and analyze a business by building dashboards, scorecards, and key performance indicators (KPIs).

41) What is Visio Services?

Allows users to share and view Microsoft Visio Web drawings. The service also enables data-connected Microsoft Visio 2010 Web drawings to be refreshed and updated from various data sources.

42) What is Access Services?

Allows users to edit, update, and create linked Microsoft Access 2010 databases that can be viewed and manipulated by using an internet browser, the Access client, or a linked HTML page.

43) What is the Secure Store Service (SSS)?

A secure database for storing credentials that are associated with application IDs

44) What is Content Deployment?

Content deployment enables you to copy content from a source site collection to a destination site collection.

Backup / DR Questions

45) Describe how redundancy can be built into a SharePoint environment. Please be specific in regards to any auxiliary components.

Multiple front-end web servers (WFE’s) can be deployed and correlated through Windows NLB or anything approach. Application servers can be deployed into the farm for a variety of purposes, depending on organizational requirements. Databases can be clustered or mirrored, again depending on requirements and environment.

46) From a basic standpoint, what is the difference between SQL clustering and mirroring?

Clustering provides a failover scenario whereby one or more nodes can be swapped as active depending on whether a node goes down. In mirroring, transactions are sent directly from a principal database and server to a mirror database to establish essentially a replica of the database.

Governance Questions

47) What Is Governance in terms of SharePoint 2010?

Governance is the set of policies, roles, responsibilities, and processes that guide, direct, and control how an organization’s business divisions and IT teams cooperate to achieve business goals.

48) What are some useful, OOB features of SharePoint that aid with governance of an environment?

Any of the below are acceptable answers. There are some others but these are the major ones that I generally look for from a candidate:

Site templates – consistent branding, site structure, and layout can be enforce a set of customizations that are applied to a site definition.

Quotas – limits to the amount of storage a site collection can use.

Locks - prevent users from either adding content to a site collection or using the site collection.

Web application permissions and policies – comprehensive security settings that apply to all users and groups for all site collections within a Web application.

Self-service site creation - enables users to create their own site collections, thus must be incorporated into a governance scheme.

Monitoring Questions

49) Describe the monitoring features that are baked into SharePoint 2010.

Diagnostic logging captures data about the state of the system, whereas health and usage data collection uses specific timer jobs to perform monitoring tasks, collecting information about:

* Performance Counter Fata
* Event Log Data
* Timer Service Data
* Metrics For Site Collections and Sites
* Search Usage Data

General Workflow Questions

50) What is a declarative workflow? Can non-authenticated users participate in workflows?

Workflows created by using Microsoft SharePoint Designer 2010, the default setting enables deployment of declarative workflows. Yes, however you do not give non-authorized users access to the site. The e-mail message and attachments sent from notifications might contain sensitive information

SharePoint Developer Interview Questions – Answers

As promised, here are the answers to the SharePoint Developer Interview Questions that I posted last week. Some of the answers are long, some are really short, for the longer ones there might be too much content. The reason that there is a lot of content is because the answer can vary heavily from person to person. There is a concrete answer to all of these questions, and I have done my best to give you a general, albiet short, idea of what that is. There might be several answers, so don’t take anything that I have written here to heart, and be sure to make your own decisions.

I wrote these answers in under an hour. If there are discrepancies, or spelling errors, just post the problem in the comments of the page and I will adjust the answers accordingly. If you would like to contribute to the list, do the same, and I will move your comment with credit to the post.

Note: A LOT of these questions are specific to SharePoint 2007, and won't have applicability for SharePoint 2003!

1) What are the two base classes a WebPart you are going to use within SharePoint 2007 can inherit from?

There are two base classes that a WebPart which is going to be consumed by SharePoint can inherit from, either the SharePoint WebPart Base class or the ASP.NET 2.0 WebPart base class. When inheriting from the SharePoint WebPart Base class your derived WebPart class will inherit from Microsoft.SharePoint.WebPartPages.WebPart. When inheriting from the ASP.NET 2.0 WebPart base class your derived WebPart class will inherit from System.Web.UI.WebControls.WebParts.WebPart. It is considered good practice to use the ASP.NET WebPart base class since the old base class is meant for backwards compatibility with previous version of SharePoint, however there are four exception when it is better to leverage functionality from the SharePoint WebPart base class:

Cross page connections

Connections between Web Parts that are outside of a Web Part zone

Client-side connections (Web Part Page Services Component)

Data caching infrastructure

2) What are the differences between the two base classes and what are the inherit benefits of using one over another?

The difference is the Microsoft.SharePoint.WebPartPages.WebPart base class is meant for backward compatibility with previous versions of SharePoint. The benefit of using the SharePoint WebPart base class is it supported:

Cross page connections

Connections between Web Parts that are outside of a Web Part zone

Client-side connections (Web Part Page Services Component)

Data caching infrastructure

ASP.NET 2.0 WebParts are generally considered better to use because SharePoint is built upon the ASP.NET 2.0 web architecture. Inheriting from the ASP.NET 2.0 base class offers you features that inherit to ASP.NET 2.0, such as embedding resources as opposed to use ClassResources for deployment of said types.

3) What is the GAC?

The GAC stands for the global assembly cache. It is the machine wide code cache which will give custom binaries place into the full trust code group for SharePoint. Certain SharePoint assets, such as Feature Receivers need full trust to run correctly, and therefore are put into the GAC. You should always try to avoid deployment to the GAC as much as possible since it will possibly allow development code to do more than it was intended to do.

4) What is strong naming (signing) a WebPart assembly file mean?

Signing an assembly with a strong name (a.k.a strong naming) uses a cryptographic key pair that gives a unique identity to a component that is being built. This identity can then be referred throughout the rest of the environment. In order to install assemblies into the GAC, they must be strongly named. After signing, the binary will have a public key token identifier which can be use to register the component in various other places on the server.

5) What are safe controls, and what type of information, is placed in that element in a SharePoint web.config file?

When you deploy a WebPart to SharePoint, you must first make it as a safe control to use within SharePoint in the web.config file. Entries made in the safe controls element of SharePoint are encountered by the SharePointHandler object and will be loaded in the SharePoint environment properly, those not will not be loaded and will throw an error.

In the generic safe control entry (this is general, there could be more), there is generally the Assembly name, the namespace, the public key token numeric, the typename, and the safe declaration (whether it is safe or not). There are other optional elements.

6) What is the CreateChildControls() method? How can you use it to do something simple like displaying a Label control?

The CreateChildControls method in WebParts is used to notify the WebPart that there are children controls that should be output for rendering. Basically, it will add any child ASP.NET controls that are called instantiating each control with its relevant properties set, wire any relevant event handlers to the control, etc. Then the add method of the control class will add the control to the controls collection. In the relevant WebPart render method, the EnsureChildControls method can be called (or set to false if no child controls should be called) to ensure that the CreateChildControls method is run. When using CreateChildControls it implies that your WebPart contains a composition of child controls.

In order to create something like a label control in Create, you would create a new label control using the new keyword, set the various properties of the control like Visible=True and ForeColor = Color.Red, and then use Controls.Add(myLabelControl) to add the control to the controls collection. Then you can declare EnsureChildControls in the Render method of the WebPart.

7) What does the RenderContents method do in an ASP.NET 2.0 WebPart?

The render contents method will render the WebPart content to the writer, usually an HtmlTextWriter since WebParts will output to an HTML stream. RenderContents is used to tell how the controls that are going to be displayed in the WebPart should be rendered on the page.

*** Side Question: I got asked what the difference between CreateChildControls and the RenderContents method. The CreateChildControls method is used to add controls to the WebPart, and the RenderContents method is used to tell the page framework how to render the control into HTML to display on a page.

8) What is the WebPartManager sealed class? What is its purpose?

The WebPartManager sealed class is responsible for managing everything occurring on a WebPart page, such as the WebParts (controls), events, and misc. functionality that will occur in WebPartZones. For example, the WebPartManager is responsible for the functionality that is provided when you are working with moving a WebPart from WebPartZone to WebPartZone. It is known as the “the central class of the Web Part Control Set.”

*** Side Question: I got asked how many WebPartManager controls should be on a page. In order to have WebParts on a page there has to be just one WebPartManager control to manage all the WebParts on the page.

9) What is a SPSite and SPWeb object, and what is the difference between each of the objects?

The SPSite object represents a collection of sites (site collection [a top level sites and all its subsites]). The SPWeb object represents an instance SharePoint Web, and SPWeb object contains things like the actual content. A SPSite object contains the various subsites and the information regarding them.

10) How would you go about getting a reference to a site?
PLAIN TEXT
C#:

1.
oSPSite = new SPSite("http:/server");
2.

3.
oSPWeb = oSPSite.OpenWeb();

11) What does a SPWebApplication object represent?

The SPWebApplication objects represents a SharePoint Web Application, which essentially is an IIS virtual server. Using the class you can instigate high level operations, such as getting all the features of an entire Web Application instance, or doing high level creation operations like creating new Web Applications through code.

12) Would you use SPWebApplication to get information like the SMTP address of the SharePoint site?

Yes, since this is a Web Application level setting. You would iterate through each SPWebApplication in the SPWebApplication collection, and then use the appropriate property calls (OutboundMailServiceInstance) in order to return settings regarding the mail service such as the SMTP address.

Side Question: I got asked if there are other ways to send emails from SharePoint. The answer is yes, there is. You can use the SendMail method from the SPutility class to send simple emails, however it is not as robust as using the System.Net.Mail functionality since it doesn’t allow things like setting priorities on the email.

13) How do you connect (reference) to a SharePoint list, and how do you insert a new List Item?
PLAIN TEXT
C#:

1.
using(SPSite mySite = new SPSite("yourserver"))
2.
{
3.
using(SPWeb myWeb = mySite.OpenWeb())
4.
{
5.
SPList interviewList = myWeb.Lists["listtoinsert"];
6.
SPListItem newItem = interviewList.Items.Add();
7.

8.
newItem["interview"] = "interview";
9.
newItem.Update();
10.
}
11.
}

14) How would you loop using SPList through all SharePont List items, assuming you know the name (in a string value) of the list you want to iterate through, and already have all the site code written?
PLAIN TEXT
C#:

1.
SPList interviewList = myWeb.Lists["listtoiterate"];
2.
foreach (SPListItem interview in interviewList)
3.
{
4.
// Do Something
5.
}

15) How do you return SharePoint List items using SharePoint web services?

In order to retrieve list items from a SharePoint list through Web Services, you should use the lists.asmx web service by establishing a web reference in Visual Studio. The lists.asmx exposes the GetListItems method, which will allow the return of the full content of the list in an XML node. It will take parameters like the GUID of the name of the list you are querying against, the GUID of the view you are going to query, etc.

Side Question: I got asked how I built queries with the lists.asmx web service. In order to build queries with this service, one of the parameters that the GetListItems method exposes is the option to build a CAML query. There are other ways to do this as well, but that was how I answered it.

16) When retrieving List items using SharePoint Web Services, how do you specify explicit credentials to be passed to access the list items?

In order to specify explicit credentials with a Web Service, you generally instantiate the web service, and then using the credentials properties of the Web Service object you use the System.Net.NetworkCredential class to specify the username, password, and domain that you wish to pass when making the web service call and operations.

*** Side Question: I got asked when you should state the credentials in code. You must state the credentials you are going to pass to the web service before you call any of the methods of the web service, otherwise the call will fail.

17) What is CAML, and why would you use it?

CAML stands for Collaborative Application Markup Language. CAML is an XML based language which provides data constructs that build up the SharePoint fields, view, and is used for table definition during site provisioning. CAML is responsible for rending data and the resulting HTML that is output to the user in SharePoint. CAML can be used for a variety of circumstances, overall is used to query, build and customize SharePoint based sites. A general use would be building a CAML query in a SharePoint WebPart in order to retrieve values from a SharePoint list.
18) What is impersonation, and when would you use impersonation?

Impersonation can basically provide the functionality of executing something in the context of a different identity, for example assigning an account to users with anonymous access. You would use impersonation in order to access resources on behalf of the user with a different account, that normally, that wouldn’t be able to access or execute something.

19) What is the IDesignTimeHtmlProvider interface, and when can you use it in WebParts?

The IDesignTimeHtmlProvider interface uses the function GetDesignTimeHtml() which can contain your relevant render methods. It was helpful to use in 2003 since it allowed your WebPart to have a preview while a page was edited in FrontPage with the Webpart on it, because the GetDesignTimeHtml() method contains the HTML for the designer to render.

20) What are WebPart properties, and what are some of the attributes you see when declaring WebPart properties in code?

WebPart properties are just like ASP.NET control properties, they are used to interact with and specify attributes that should be applied to a WebPart by a user. Some of the attributes you see with ASP.NET 2.0 properties are WebDescription, WebDisplayName, Category, Personalizable, and WebBrowsable. Although most of these properties come from the System.Web.UI.WebControls.WebParts class, ones like Category come out of System.ComponentModel namespace.

21) Why are properties important in WebPart development, and how have you exploited them in past development projects? What must each custom property have?

Properties are important because WebParts allow levels of personalization for each user. WebPart properties make it possible for a user to interact, adjust, and increase overall experience value with the programmatic assets that you develop without having the need to use an external editor or right any code. A very simple example of exploiting a property would be something like allowing the user to change the text on the WebPart design interface so that they can display whatever string of text they desire.

Each custom property that you have must have the appropriate get and set accessor methods.

22) What are ClassResources? How do you reference and deploy resources with an ASP.NET 2.0 WebPart?

ClassResources are used when inheriting from the SharePoint.WebPart.WebPartPages.WebPart base class, and are defined in the SharePoint solution file as things that should be stored in the wpresources directory on the server. It is a helpful directory to use in order to deploy custom images. In ASP.NET 2.0, typically things such as images are referenced by embedding them as resources within an assembly. The good part about ClassResources is they can help to eliminate recompiles to change small interface adjustments or alterations to external JavaScript files.

23) What is a SharePoint Solution File? How does it differ from WebPart .cab files in legacy development? What does it contain?

A SharePoint solution file is essentially a .cabinet file with all a developers ustom componets suffixed with a .wsp extension that aids in deployment. The big difference with SharePoint solution files is is that a solution:

allows deployment to all WFE’s in a farm

is highly manageable from the interface allowing deployment, retraction, and versioning

Can package all types of assets like site definitions, feature definitions (and associated components), Webparts, etc.

Can provide Code Access Security provisioning to avoid GAC deployments

Just to name a few things…

24) What is a .ddf file and what does it have to do with SharePoint Solution creation?

A .ddf file is a data directive file and is used when building the SharePoint solution bundle specifying the source files and their destination locations. The important thing for someone to understand is that the .ddf file will be passed as a parameter to the MAKECAB utility to orchestrate construction of the SharePoint solution fiel.

25) What file does a SharePoint solution package use to orchestrate (describe) its packaged contents?

The solution Manifest.XML file.

26) What deployment mechanism can you use to instigate Code Access Security attributes for your WebParts?

SharePoint solution files can add in order to handle code access security deployment issues. This is done in the element in the SharePoint solution manifest.XML, which makes it easier to get assemblies the appropriate permissions in order to operate in the bin directory of the web application.

27) What is a SharePoint Feature? What files are used to define a feature?

A SharePoint Feature is a functional component that can be activated and deactivate at various scopes throughout a SharePoint instances, such as at the farm, site collection, web, etc. Features have their own receiver architecture, which allow you to trap events such as when a feature is installing, uninstalling, activated, or deactivated. They are helpful because they allow ease of upgrades and versioning.

The two files that are used to define a feature are the feature.xml and manifest file. The feature XML file defines the actual feature and will make SharePoint aware of the installed feature. The manifest file contains details about the feature such as functionality.

Side Question: I got asked how the introduction of features has changed the concept of site definitions. SharePoint features are important when understanding the architecture of site definitions, since the ONET.XML file has been vastly truncated since it has several feature stapled on it.

28) What types of SharePoint assets can be deployed with a SharePoint feature?

Features can do a lot. For example, you could deploy

Simple site customizations

Custom site navigation

WebParts

pages

list types

list instances

event handlers

workflows

custom actions

just to name a few….

29) What are event receivers?

Event receivers are classes that inherit from the SpItemEventReciever or SPListEventReciever base class (both of which derive out of the abstract base class SPEventRecieverBase), and provide the option of responding to events as they occur within SharePoint, such as adding an item or deleting an item.

30) When would you use an event receiver?

Since event receivers respond to events, you could use a receiver for something as simple as canceling an action, such as deleting a document library by using the Cancel property. This would essentially prevent users from deleting any documents if you wanted to maintain retention of stored data.

31) What base class do event receivers inherit from?

Event receivers either inherit from the SPListEventReciever base class or the SPItemEventReciever base class, both which derive from the abstract base class SPEventReceiverBase.

32) If I wanted to not allow people to delete documents from a document library, how would I go about it?

You would on the ItemDeleting event set: properties.Cancel= true.

33) What is the difference between an asynchronous and synchronous event receivers?

An asynchronous event occurs after an action has taken place, and a synchronous event occurs before an action has take place. For example, an asynchronous event is ItemAdded, and its sister synchronous event is ItemAdding.

34) How could you append a string to the title of a site when it is provisioned?

In the OnActivated event:
PLAIN TEXT
C#:

1.
SPWeb site = siteCollection.RootWeb;
2.
site.Title += "interview";
3.
site.Update();

35) Can an event receiver be deployed through a SharePoint feature?

Yes.

36) What is a content type?

A content type is an information blueprint basically that can be re-used throughout a SharePoint environment for defining things like metadata and associated behaviors. It is basically an extension of a SharePoint list, however makes it portable for use throughout an instance regardless of where the instantiation occurs, ergo has location independence. Multiple content types can exist in one document library assuming that the appropriate document library settings are enabled. The content type will contain things like the metadata, listform pages, workflows, templates (if a document content type), and associated custom written functionality.

37) Can a content type have receivers associated with it?

Yes, a content type can have an event receiver associated with it, either inheriting from the SPListEventReciever base class for list level events, or inheriting from the SPItemEventReciever base class. Whenever the content type is instantiated, it will be subject to the event receivers that are associated with it.

38) What two files are typically (this is kept generally) included when developing a content type, and what is the purpose of each?

There is generally the main content type file that holds things like the content type ID, name, group, description, and version. There is also the ContentType.Fields file which contains the fields to include in the content type that has the ID, Type, Name, DisplayName, StaticName, Hidden, Required, and Sealed elements. They are related by the FieldRefs element in the main content type file.

39) What is an ancestral type and what does it have to do with content types?

An ancestral type is the base type that the content type is deriving from, such as Document (0x0101). The ancestral type will define the metadata fields that are included with the custom content type.

40) Can a list definition be derived from a custom content type?

Yes, a list definition can derive from a content type which can be seen in the schema.XML of the list definition in the element.

41) When creating a list definition, how can you create an instance of the list?

You can create a new instance of a list by creating an instance.XML file.

42) What is a Field Control?

Field controls are simple ASP.NET 2.0 server controls that provide the basic field functionality of SharePoint. They provide basic general functionality such as displaying or editing list data as it appears on SharePoint list pages.

43) What base class do custom Field Controls inherit from?

This varies. Generally, custom field controls inherit from the Microsoft.SharePoint.WebControls.BaseFieldControl namespace, but you can inherit from the default field controls.

44) What is a SharePoint site definition? What is ghosted (uncustomized) and unghosted (customized)?

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. Ghosted means that when SharePoint creates a new site it will reference the files in the related site definition upon site provisioning. 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 file system.

45) How does one deploy new SharePoint site definitions so that they are made aware to the SharePoint system?

The best way to deploy site definitions in the SharePoint 2007 framework is to use a SharePoint solution file, so that the new site definition is automatically populated to all WFE’s in the SharePoint farm.



***********************************************************

https://www.nothingbutsharepoint.com/sites/devwiki/SP2010Dev/Pages/Site%20Templates%20in%20SharePoint%202010.aspx

1)Page layouts
Web Template , Web Template Name ,Web Template ID

What is the difference between Site Pages Vs Application Pages?

Site Pages
1. Site Pages are available for each site in a site collection
2. Site Pages allow customization
3. Site Pages do not allow in-line code
Application Pages
1. Application Pages are primarily used for administrative purposes
2. Application Pages are located in _layouts folder under 12 hive (FileSystem)
3. Application Pages support in-line code
4. Application Pages do not support customization.

# Difference between Site Definition Vs Site Templates

Site Definition
1. Site Definitions are stored on the File System in 12 hive.
2. Site Definitions are much faster to load from file system
3. Site Definitions changes get reflected immediately across all sites.
4. Site Definitions are changed using ONET.XML.
Site Templates
1. Site Templates are stored in the configuration database.
2. Site Templates are slower as they get compiled before rendering.
3. Site Templates are copied every time a site is created. So changing site templates after site is created does not affect.
4. Site Templates are usually modified using UI.

What are the ways to dispose of SharePoint objects effectively?
1. "using" method
2. With "Dispose()" method
3. Setting "null" in try...catch...finally block.

SharePoint Interview Questions and Answers

Q What is SharePoint?
Ans SharePoint is a browser based document collaboration platform given by Microsoft.

Q What are features of SharePoint 2010?
Ans Some features are :
· Document Collaboration
· Enterprise Search FAST Search
· New Enhance Web Part
· Ready made Silver Light web part
· Business Connectivity Services
· Social Media Investments
· Large lists
· Enhanced collaboration features
· Visio Services
· Usage reporting and logging
· Better Network Differencing & SharePoint Offline in SharePoint Workspace
· High Availability/ Disaster Recovery Innovation
· Admin Insights through the Logging & Usage database, and dev dashboard
· Service Applications
· SharePoint Designer Enhancements like portable workflows, and granular delegation
· Sandbox Solutions

Q What is WSS ?
Ans Windows SharePoint Services (WSS) is a Web portal used for collaboration within a business or organization. WSS is easily accessible through an Internet browser such as Internet Explorer. SharePoint is a hosted application - which means in order to use it to full potential, it must be hosted on a Windows server.
WSS provides a solid base to set up one or more intranet sites.
The main WSS features are:
* Unlimited number of team sites or portals
* Document management with collaboration and sharing capabilities (Check-in/Check-
out, workflow, meta-data, 'warn me', discussions...)
* Task management and calendars on group level
* Central notification management (problems, complaints, help desk...)
* Collecting information/surveys via question forms
* Extended search engine within each site
* Workflow (examples: expense reports, holiday administration...)
* Digital dashboards, with or without scorecarding

Q What is MOSS?
Ans MOSS stands for Microsft Office Share Point Server. MOSS is a portal based platform for complete management of documents & web services. It is a platform for creation of customized web based applications & portals like blogs, wiki etc. MOSS provides security features and can be configured to return separate content based on the fact that the user has logged on using internet, intranet or extranet.
MOSS provides extra features as compared with WSS
* Consolidation of all the team sites within the organization
* Enterprise search : search through different sources within the organization with one
interface (portals, mail, ERP, CRM ...)
* Central personnel data base with extended search capabilities, linked (or not) to
internal personnel management.
* Business Data Catalog (BDC): default link to external systems (e.g. CRM/ERP)
* Report Center : central management of all reports and data connections.
* Excel Services : provides Excel features in the web browser.
* Creation of web-based e-Forms, full web-browser access.


Q Difference between Library vs List ?
Ans Library is used to store the document and Lists are the container of similar items in form of rows and columns. In Library you can create core document like Word, Excel, PowerPoint. But in List You can not create document, instead of that you can attach document in a particular List.


Q What is difference between Document Library and Form Library?
Ans Document Library contains core document such as , MS word, Excel, Powerpoint. But Form library contains document in XML form. Such as InfoPath form.

Q What is Central Admin in SharePoint?
Ans Central admin is the default website by sharepoint while installing.

Q What is stsadm command?
Ans Stsadm command is used to perform all administrative work. For e.g. backup, restore, installing feature, adding web part to site etc.

Q What is the command to take backup and restore for sharepoint site?
Ans Backup command:
stsadm -o backup -url http://moss:4002/ -filename c:\bkupsite.bak
To restore :
stsadm -o restore -url http://moss:4004/ -filename c:\bkupsite.bak

Q What is a Farm?
Ans n the context of SharePoint, the term ‘farm’ is used to describe a collection of one or more SharePoint servers and one or more SQL servers that come together to provide a set of basic SharePoint services bound together by a single Configuration Database in SQL.
Farms can range in size from having everything (all SharePoint roles and SQL server) on one machine to scaling out every individual SharePoint serve role onto dedicated sets of servers. A farm the highest administrative boundary for SharePoint and everything that happens inside SharePoint happens in a farm.
In Short : A sharepoint Farm is a collection of one or more sharepoint server which having a single configuration database.

Q What are sites available in SharePoint?
Ans
Team Site
Blank Site
Document Workspace
Blog
Group Work Site
Visio Process Repository
Basic Meeting Workspace
Blank Meeting Workspace
Decision Meeting Workspace
Social Meeting Workspace
Multipage Meeting Workspace
Assets Web Database
Charitable Contributions Web Database
Contacts Web Database
Issues Web Database
Projects Web Database
Document Center
Records Center
Business Intelligence Center
My Site Host
Personalization Site
Enterprise Search Center
Basic Search Center
FAST Search Center
Enterprise Wiki
Publishing Portal
Publishing Site
Publishing Site With Workflow
Central Administration



Q. What is a site definition in sharepoint?
Ans Site definition is a combination of template and XML. Site definition available in sharepoint are STS for Team and Blank Site, MPS for ,meeting workspace. BLOGS for Blogs site.


Q. What are SharePoint object model?
Ans. In Sharepoint Object model there are two Important namespaces.

The Microsoft.Office.Server namespace is the root namespace of all Office Server objects and Microsoft.SharePoint is the root namespace for all WSS objects.


Q. What is a site collection?
Ans. Site Collection is collection of sharepoint site. i.e. Sharepoint site collection is logical grouping of multiple sharepoint site.
A site collection is a group of Web sites that have the same owner and share administration settings, for example, permissions. When you create a site collection, a top-level site is automatically created in the site collection. You can then create one or more subsites below the top-level site.
A site collection must exist within a Web application. You can create a site collection based on an existing Web application, or you can create a Web application and then create a site collection within that application.



Q. What is a site?
Ans.

* Site is a collection of web pages which is used to store information in organised 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.


Q. What are web Parts in Sharepoint?
Ans 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.
Webparts are smallest component in sharepoint. Web parts are used to give more functionality to the page. In sharepoint we have custom web part as well as ready made 3rd party web part. You can create a custom web part by using visual studio
Various web parts available in sharepoint web part gallery are:
Data view web part, Content editor web part, Form web part, Excel web access web part, Image web part etc.


Q. What is web application in Sharepoint?
Ans. In sharepoint Webapplication is a IIS website. Each web application is associated with one IIS website. For each web application, content database is created.


Q. What is CAML?
Ans. CAML stands for Collaborative application markup languages. It is in xml form. And it can be sued to retrieve the data from sharepoint list as well to update and insert.


Q. What are Content types?
Ans. A content type is a reusable thing provided by WSS. content type defines the column for an item in a library or list and same can be used for any library or list in that sharepoint application.
For e.g. you are creating a list for leave application then if you are creating column for HR department, IT department then it does not makes any sense.
So used content type where you can create your own column or site column (Given by sharepoint) and you can use this content type with any list or library.


Q. What is BDC?
Ans. BDC i.e. Business Data Catalouge. It is a middleware for your sharepoint site and back end data such as SAP, Siebel and any other Line of Business application.
In BDC you can not modify data from your sharepoint list. It will be available to your site in read only.
In Sharepoint 2010 it is named as BCS (Business Connectivity Services). BCS is two way, i.e. Data can be edit from sharepoint list as well from the back end data base.


Q. What is workspace?
Ans. A site or workspace is when you want a new place for collaborating on Web pages, lists and document libraries. For example, you might create a site to manage a new team or project,collaborate on a document or prepare for a meeting.


Q. Workflow can be applied to what all elements of SharePoint ?
Ans.
While workflow associations are often created directly on lists and document libraries, a workflow association can also be created on a content type that exists within the Content Type Gallery for the current site or content types defined within a list.
In short, it can be applied ...

* At the level of a list (or document library)
* At the level of a content type defined at site scope
* At the level of a site ( Sharepoint 2010 )



Q. What are the ways to initiate the workflow ?
Ans.

* Automatic (on item added or item deleted)
* Manual (standard WSS UI interface)
* Manual (Custom UI Interface)
* Programatically through custom code



Get More Questions and Answers
Q. What are the types of input forms that can be created for a workflow ?
Ans.
You can create four different types of input forms including an association form, an initiation form, a modification form, and a task edit form. Note that these forms are optional when you create a workflow template.


Q. What are ways to create input forms for workflow ?
Ans.
Two different approaches can be used to develop custom input forms for a WSS workflow template.

* You can create your forms by using custom application pages, which are standard .aspx pages deployed to run out of the _layouts directory. ( disadv: lot of code required when compared to Infopath approach)
* using Microsoft Office InfoPath 2007 /2010 (disadv: picks up a dependenct on MOSS, i.e. it cannot run in a standalone WSS environment)



Q. What is the difference between method activity and event activity in WF ?
Ans A method activity is one that performs an action, such as creating or updating a task. An event activity is one that runs in response to an action occurring.


Q. What is different with SharePoint 2010 workflows ?
Ans. Some of the additions in workflow model are :
1. SharePoint 2010 workflows are build upon the the workflow engine provide .Net Framework 3.5.
2. In addition to the SharePoint lists we can now create workflows for SharePoint sites as well.
3. SharePoint Designer 2010 also has a new graphical workflow designer for designing workflows and deploying them directly to SharePoint.
4. Another Improvement in SharePoint Designer 2010 is that it now allows you to edit the out-of-the-box workflows that come with SharePoint.


Q. What is the difference between an Internet and an intranet site?
Ans. An internet site is a normal site that anyone on the internet can access (e.g., www.msn.com, www.microsoft.com, etc.). You can set up a site for your company that can be accessed by anyone without any user name and password.
An intranet (or internal network), though hosted on the Web, can only be accessed by people who are members of the network. They need to have a login and password that was assigned to them when they were added to the site by the site administrator


Q. What are the various kinds of roles the users can have?
Ans.
A user can be assigned one of the following roles

* Reader - Has read-only access to the Web site.
* Contributor - Can add content to existing document libraries and lists.
* Web Designer - Can create lists and document libraries and customize pages in the Web site.

Administrator - Has full control of the Web site.


Q. What are the types of authentication available for Sharepoint 2010 ?
Ans.

* Claims
* Windows
* Forms-based authentication

Ref : http://technet.microsoft.com/en-us/library/cc262350(office.14).aspx


Q.
What is claims based authentication ?
Ans.
Claims is a new authentication method that SharePoint 2010 can utilize. This allows a single authentication store for multiple types of authentication (Windows NTLM, SQL FBA, LDAP, etc) which allows all of these types of authentication to access SharePoint under a single URL.

Claims creates a SAML token based on the sign-in, that contains the user’s identity.

Ref: http://blogs.technet.com/ritaylor/archive/2009/06/03/claims-based-authentication-an-overview.aspx


Q. How do we use the claims identity outside of SharePoint?
Ans.

* LOB systems
* External partner services
* Separate SharePoint farms



Q. What is LINQ to Sharepoint ?
Ans.

* LINQ is a feature of the programming languages C# 3.0 and Visual Basic .NET
* LINQ adds, to each of the languages, a SQL-like syntax and vocabulary for querying data sources.
* LINQ to Sharepoint allows developers to use SQL-like syntax to query Lists and Libraries in Sharepoint.
* LINQ to Sharepoint internally converts the LINQ query to a CAML query to fetch records
* Advantage : Strongly typed access to the entities of the list.
* Disadvantage : If the new columns are added or its datatype changed, the datacontext class used by LINQ is no longer valid and may break the code



Q. Name the tool used to create DataContent classes for use in LINQ queries?
Ans.
SPMetal.exe


Q. What are the advantages and disadvantages of LINQ to Sharepoint ?
Ans.
Advantages:

* Intellisense
* Strongly typed access to the entities of the list
* Faster development
* Simplify complex queries

Disadvantages:

* If the new columns are added or its datatype changed, the datacontext class used by LINQ is no longer valid and may break the code
* Extra layer to the actual CAML query



Q. Can MS Visio be used to create a Sharepoint workflow ?
Ans.
MS Visio cannot be used to create the Sharepoint workflow itself, but can be used for workflow visualization. What this means is that, the flow diagram designed in Visio can be imported in Sharepoint Designer where all the functionality can be added and deployed to Sharepoint.
Note:
To use Visio 2010 for workflow visualization, you must be running the Enterprise version of SharePoint Server 2010 and Visio 2010 Premium.


Q.
Whats new in Shared Service Provider (SSP ) in Sharepoint 2010 ? ( Alt Q: What is "Service Application" ? )
Ans.
“Service Application” or “Service App” is a concept in Sharepoint 2010, where SSP Services are split out into separate services.
What is replaced :

* Profiles, Audiences = People Service App
* Search = Search Service App
* Excel = Excel Service App

Whats new :

* Project Server = Project Server App
* Visio Services = Visio Service App

Advantages :

* Web applications can be configured to only use a subset of the deployed services.
* You can deploy multiple instances of the same service in a farm by giving the new service instances unique names.
* You can share services across multiple web applications in a farm.


Ref :
http://blogs.msdn.com/uksharepoint/archive/2009/10/21/sharepoint-2010-new-shared-services.aspx
http://aknauer.blogspot.com/2009/11/sharepoint-2010-advantages-of-service.html
http://www.andrewconnell.com/blog/archive/2009/10/19/the-new-service-application-architecture-in-sharepoint-server-2010.aspx
http://www.andrewmilsark.com/blog/post/2009/10/20/SharePoint-2010-Service-Applications-(Shared-Services)-Overview.aspx


Q. Explain types of SharePoint Sites
Ans. Types of sharepoint sites:
Wiki: This is usually where everyone is allowed to add/change content for a common knowledgebase.
Blog: This type of site is for posting specialized articles or information for everyone to read.
Publishing site: This site is used to approving particular content before it’s published to everyone.
Document library: A site mainly used for document management purposes.
Download site: This type of site helps in monitoring the count of downloads and track them.
List or Forum: The idea is to have specific people post a topic and then allow others to comment on the posts.
Survey: Usually a site that’s accessed by everyone for conducting a survey.
Dashboard: The idea of a dashboard is for business executives to gain information and perform reporting tasks.


Q. What is SharePoint Workflow? Explain its purposes
Ans. Workflows are implementation of business processes allowing people to collaborate on documents through various project tasks assigned to individuals. They enhance productivity and organization of work in an organization. This enables people to only concentrate on tasks given to them. It’s basically a planned series of tasks assigned to individuals to achieve an outcome.
Workflows included in MOSS:
Approval
Collect Feedback
Collect signatures
Disposition approval
Three-state
Group approval
Translation management
Overall MOSS workflows target at higher productivity keeping collaboration and business processes in mind.


Q. How is SharePoint Portal Server different from the Site Server?
Ans. The Sharepoint Site Server has search capabilities which are more advanced using SharePoint. It uses digital dashboard technology, which provides a nice interface for creating web parts and also allows showing them on dashboards pages. Site Server on the other hand, does not have anything as advanced as that. The biggest difference would be Sharepoint Portal Server’s document management features which also integrate with web folders and MS Office.


Q. What are ways to create input forms for workflow?
Ans. MOSS has the capability for a workflow participant to fill an initiation form to start a workflow. The initiation form can have fields that support:

* Single line of text
* Multiple lines of text
* Number (up/down counter arrows)
* Yes/No (Checkbox)
* Choice (dropdowns)
* Date and time (calendar)

One can use these to create forms by using custom application pages (aspx pages), which are deployed to run out of the _layout directory on MOSS server or using Microsoft Office Infopath 2007 /2010


Q. What is an application pool?
Ans. A group of one or more URLs that are served by a particular worker process or set of worker processes.


Q. Why are application pools important?
Ans. They provide a way for multiple sites to run on the same server but still have their own worker processes and identity.


Q. What are zones?
Ans. Different logical paths (URLs meaning) of gaining access to the same SharePoint Web application.


Q. What are Web Application Policies?
Ans. Enables security policy for users at the Web application level, rather than at the site collection or site level. Importantly, they override all other security settings.


Q. What are content databases?
Ans. A content database can hold all the content for one or more site collections.


Q. What are My Sites?
Ans. Specialized SharePoint sites personalized and targeted for each user.


Q. What is the difference between Classic mode authentication and Claims-based authentication?
Ans. As the name implies, classic authentication supports NT authentication types like Kerberos, NTLM, Basic, Digest, and anonymous. Claims based authentication uses claims identities against a against a trusted identity provider.


Q. When would you use claims, and when would you use classic?
Ans. Classic is more commonly seen in upgraded 2007 environments whereas claims are the recommended path for new deployments.


Q. Describe the potential components for both a single server, and multiple servers, potentially several tiered farms.
Ans. A single-server SharePoint Server 2010 environment leverages a built-in SQL Server 2008 Express database. The problems with this environment is scalability, not being able to install the with built-in database on a domain controller, the database cannot be larger than 4 GB, and you cannot use User Profile Synchronization in a single server with built-in database installation.
An example of a multiple tier farm would be a three-tier topology, considered one of the more efficient physical and logical layouts to supports scaling out or scaling up and provides better distribution of services across the member servers of the farm. This is considered a good architecture since one can add Web servers to the Web tier, add app servers to the application tier, and add database servers to the database tier.


Q. What are some of the tools that can be used when backing up a SharePoint 2010 environment?
Ans.

* SharePoint farm backup and recovery
* SQL Server
* System Center Data Protection Manager



Q. What Microsoft tool can be used for incremental backups?
Ans. System Center Data Protection Manager


Q. What is Managed Metadata?
Ans. Managed metadata is a hierarchical collection of centrally managed terms that you can define, and then use as attributes for items.


Q. What are Terms and Term Sets?
Ans. A term is a word or a phrase that can be associated with an item. A term set is a collection of related terms.


Q. How do Terms And Term Sets relate to Managed Metadata?
Ans. Managed metadata is a way of referring to the fact that terms and term sets can be created and managed independently from the columns themselves.


Q. Are there different types of Term Sets?
Ans. There are Local Term Sets and Global Term Sets, one created within the context of a site collection and the other created outside the context of a site collection, respectively.


Q. How are terms created and used?
Ans. There are several ways; however the most common is to use the Term Store Management Tool.


Q. How is Managed Metadata, and the related Term technology used?
Ans. Through the UI, the most common use is through the managed metadata list column which allows you to specify the term set to use. It also related to searching and enhancing the user search experience.


Q. What is a sandboxed solution?
Ans. Components that are deployed to run within the sandboxed process rather than running in the production Internet Information Services (IIS) worker process.


Q. What are some examples of things that might run within the SharePoint sandbox?
Ans. Any of the following are acceptable answers:
· Web Parts
· Event receivers
· Feature receivers
· Custom Microsoft SharePoint Designer workflow activities
· Microsoft InfoPath business logic
· Etc.


Q. Why are sandboxed solutions used?
Ans. Primarily because they promote high layers of isolation. By default they run within a rights-restricted, isolated process based around Code Access Security (CAS). Isolation is possible to increase with activities like running the sandboxing service on only specific SharePoint 2010 servers.


Q. What is a content source in relation to SharePoint search? What’s the minimum amount of content sources?
Ans. A content source is a set of options that you can use to specify what type of content is crawled, what URLs to crawl, and how deep and when to crawl. You must create at least one content source before a crawl can occur.


Q. What is a search scope?
Ans. A search scope defines a subset of information in the search index. Users can select a search scope when performing a search.


Q. What is a federated location with SharePoint search?
Ans. Federated locations provide information that exists outside of your internal network to your end-users.


Q. How does managed metadata affect search?
Ans. Enhances the end-user search experience by mapping crawled properties to managed properties. Managed properties show up in search results and help users perform more successful queries.


Q. What is query logging in SharePoint 2010?
Ans. Collects information about user search queries and search results that users select on their computers to improve the relevancy of search results and to improve query suggestions.


Q. What authentication type does the SharePoint crawler use?
Ans. The crawl component requires access to content using NTLM authentication.


Q. Please describe what a Service Application is in SharePoint 2010.
Ans. Service applications in SharePoint 2010 are a set of services that can possibly be shared across Web applications. Some of these services may or may not be shared across the SharePoint 2010 farm. The reason these applications are shared is the overall reduction of resources required to supply the functionality these services cultivate.


Q. Please provide an example of one of these service applications.
Ans. Any of the below are acceptable answers:
· Access Services
· Business Data Connectivity service
· Excel Services Application
· Managed Metadata service
· PerformancePoint Service Application
· Search service
· Secure Store Service
· State service
· Usage and Health Data Collection service
· User Profile service
· Visio Graphics Service
· Web Analytics service
· Word Automation Services
· Microsoft SharePoint Foundation Subscription Settings Service


Q. What are Service Application Groups used for?
Ans. Just provides a logical grouping of services that are scoped to a particular Web Application.


Q. How are Service Applications deployed in terms of IIS (Internet Information Services)?
Ans. They are provisioned as a single Internet Information Services (IIS) Web site.


Get More Questions and Answers
Q. Explain how connections are managed with Service Applications.
Ans. A virtual entity is used that is referred to as a proxy, due to label in PowerShell.


Q. What are some common examples of SharePoint 2010 services architectures, and what are the advantages of each design?
Ans. The three most popular designs are single farms with either a single service application group or multiple service application groups, or Enterprise services farms.
Single farms with a single service application group are generally the most common, and have the advantages of easy deployment, simple service application allocation, effective resource utilization and cohesive management.
Single farms with multiple service application groups is less common, and have the advantage of potential individual management of service applications as well as allowing data isolation, and while being more complex to deploy and maintain allows targeting of sites to particular service applications.
Enterprise Service Farms is pretty uncommon as it is a complete farm dedicated to Service Applications but promotes autonomous management and high levels of data isolation.


Q. Are there any other type of relevant service architectures?
Ans. Depending on the environment requirements, a specialized farm can also be used in order to deploy specific services tailored to the organizational requirements which can aid in scaling out and conservation of resources.


Q. What is the User Profile service?
Ans. Allows configuring and managing User profile properties, Audiences, Profile synchronization settings, organization browsing and management settings, and My Site settings.


Q. What are User Profiles?
Ans. Aggregates properties from diverse identity content sources together to create unified and consistent profiles across an organization, used throughout the SharePoint environment.


Q. What is Excel Services?
Ans. Allows sharing, securing, managing, and using Excel 2010 workbooks in a SharePoint Server Web site or document library. Excel Services consists of the Excel Calculation Services (ECS), Microsoft Excel Web Access (EWA), and Excel Web Services (EWS) components.


Q. What is PerformancePoint Services?
Ans. Allows users to monitor and analyze a business by building dashboards, scorecards, and key performance indicators (KPIs).


Q. What is Visio Services?
Ans. Allows users to share and view Microsoft Visio Web drawings. The service also enables data-connected Microsoft Visio 2010 Web drawings to be refreshed and updated from various data sources.


Q. What is Access Services?
Ans. Allows users to edit, update, and create linked Microsoft Access 2010 databases that can be viewed and manipulated by using an internet browser, the Access client, or a linked HTML page.


Q. What is the Secure Store Service (SSS)?
Ans. A secure database for storing credentials that are associated with application IDs


Q. What is Content Deployment?
Ans. Content deployment enables you to copy content from a source site collection to a destination site collection.



Backup / DR Questions
Q. Describe how redundancy can be built into a SharePoint environment. Please be specific in regards to any auxiliary components.
Ans. Multiple front-end web servers (WFE’s) can be deployed and correlated through Windows NLB or anything approach. Application servers can be deployed into the farm for a variety of purposes, depending on organizational requirements. Databases can be clustered or mirrored, again depending on requirements and environment.


Q. From a basic standpoint, what is the difference between SQL clustering and mirroring?
Ans. Clustering provides a failover scenario whereby one or more nodes can be swapped as active depending on whether a node goes down. In mirroring, transactions are sent directly from a principal database and server to a mirror database to establish essentially a replica of the database.



Governance Questions
Q. What Is Governance in terms of SharePoint 2010?
Ans. Governance is the set of policies, roles, responsibilities, and processes that guide, direct, and control how an organization’s business divisions and IT teams cooperate to achieve business goals.


Q. What are some useful, OOB features of SharePoint that aid with governance of an environment?
Ans. Any of the below are acceptable answers. There are some others but these are the major ones that I generally look for from a candidate:
Site templates – consistent branding, site structure, and layout can be enforce a set of customizations that are applied to a site definition.
Quotas – limits to the amount of storage a site collection can use.
Locks - prevent users from either adding content to a site collection or using the site collection.
Web application permissions and policies – comprehensive security settings that apply to all users and groups for all site collections within a Web application.
Self-service site creation - enables users to create their own site collections, thus must be incorporated into a governance scheme.



Monitoring Questions
Q. Describe the monitoring features that are baked into SharePoint 2010.
Ans.
Diagnostic logging captures data about the state of the system, whereas health and usage data collection uses specific timer jobs to perform monitoring tasks, collecting information about:

* Performance Counter Fata
* Event Log Data
* Timer Service Data
* Metrics For Site Collections and Sites
* Search Usage Data




General Workflow Questions
Q. What is a declarative workflow? Can non-authenticated users participate in workflows?
Ans. Workflows created by using Microsoft SharePoint Designer 2010, the default setting enables deployment of declarative workflows. Yes, however you do not give non-authorized users access to the site. The e-mail message and attachments sent from notifications might contain sensitive information


Q. What is Windows Powershell ?
Ans. Windows PowerShell is a new Windows command-line shell designed especially for system administrators. In the SharePoint administration context, Windows PowerShell is another administration tool that supersedes the existing Stsadm.exe.


Q. How is Windows Powershell different from Stsadm ?
Ans. Unlike stsadm, which accept and return text, Windows PowerShell is built on the Microsoft .NET Framework and accepts and returns .NET Framework objects. In addition to that it also gives you access to the file system on the computer so that you can access registry,digital signature certificate etc..


Q. What are cmdlet's?
Ans. Windows PowerShell introduces the concept of a cmdlet which are simple build in commands, written in a .net language like C# or VB.


Q. Can you Create PowerShell scripts for deploying components in SharePoint ?
Ans. If you are creating a webpart with VS 2010 then you can deploy it using ctrl + f5. However, to activate the webpart feature you can write a powershell script (.ps1) and execute it after dpeloyment.


Q. Where is Powershell located in sharePoint ?
Ans. On the Start menu, click All Programs -> Click Microsoft SharePoint 2010 Products -> Click SharePoint 2010 Management Shell.


Q. If you need going to install a webpart or any custom solution in SharePoint 2010 using PowerShell What permissions do you need?
Ans. In order to use Windows PowerShell for SharePoint 2010 Products, a user must be a member of the SharePoint_Shell_Access role on the configuration and content database. In addition to this, the user must also be a member of the WSS_ADMIN_WPG local group on the computer where SharePoint 2010 Products is installed.


Q. How to list all the commands in PowerShell ?
Ans. Get-Command * commands gets you all the Powershell command


Q. What is the advantage in using Windows PowerShell over stsadm in SharePoint 2010 ?
Ans. Unlike stsadm, which accept and return text, Windows PowerShell is built on the Microsoft .NET Framework and accepts and returns .NET Framework objects.Windows PowerShell also gives you access to the file system on the computer and enables you to access other data stores, such as the registry and the digital signature certificate stores etc..



Q. How would you deploy WebPart Using Windows PowerShell?
Ans. At the Windows PowerShell command prompt (PS C:\>), type the below command :
Install -SPWebPartPack -LiteralPath “FullPathofCabFile” -Name “Nameof WebPart”



Q. What is a site definition?
Ans. It’s a methods for providing prepackaged site and list content.


Q. What is a template?
Ans. A template is a pre-defined set of functions or settings that can be used over time. There are manytemplates within SharePoint,Site Templates, Document Templates, Document Library and ListTemplates.


Q. How do you install web parts?
Ans. Web Parts should be distributed as a .CAB (cabinet) file using the MSI Installer.


Q. What is a DWP?
Ans. The file extension of a web part.


Q. What is the GAC?
Ans. Global Assembly Cache folder on the server hosting SharePoint. You place your assemblies there for web parts and services to share them.


Q. Can I post any kind of document? Can i restrict some document types
Ans. You can post documents in many formats, including .pdf, .htm and .doc. In addition, if you are using Microsoft Office XP, you can save documents directly to your Windows SharePointServices site. Yes, you can restrict document types by either adding them to central admin or by using a custom event receiver.


Q. Can I create custom templates?
Ans. Yes you can. You can create site or list templates which are nothing but a set of files, pages and data so that they can be re-used for business process. For e.g. creating a issue tracking list template will be used to various other teams.


Q. How can I make My site public?
Ans. By default, all sites are created private.If you want your site to be a public Web site, enable anonymous access for the entire site. Then you can give out your URL to anybody in yourbusiness card, e-mail or any other marketing material. The URL for your Web site will be:http:// yoursitename.wss.bcentral.com Hence, please take special care to name your site.These Web sites are ideal for information and knowledge intensive sites and/or sites where you need to have shared Web workspace.Remember: Under each parent Web site, you can create up to 10 sub-sites each with unique permissions, settings and security rights.


Q. How do I make my site non-restricted?
Ans. If you want your site to have anonymous access enabled (i.e., you want to treat it like any site on the Internet that does not ask you to provide a user name and password to see the content of the site), follow these simple steps:

# Login as an administrator
# Click on site settings
# Click on Go to Site Administration
# Click on Manage anonymous access
# Choose one of the three conditions on what Anonymous users can access:** Entire Web site** Lists and libraries** Nothing Default condition is nothing; your site has restricted access.
The default conditions allow you to create a secure site for your Web site.

Q. Can each user have access to their own calendar?
Ans. Yes there are two ways to do this,
* by creating a calendar for each user, or
* by creating a calendar with a view for each user.


Q. What types of files can I upload / post to the site?
Ans. The only files restricted are those ending with the following extensions: .asa, .asp, .ida, .idc, .idq.Microsoft reserves the right to add additional file types to this listing at any time. Also, no content that violates the terms of service may be uploaded or posted to the site.

Q. Can SharePoint be linked to an external data source?
Ans. SharePoint data can be opened with Access and Excel as an external data source. Thus, SharePoint can be referenced as an external data source. SharePoint itself cannot reference an external datasource.

Q. How does Ribbon works ?
Ans. A file called CMDUI.XML stays at the web front end which contains the Out-of-Box site wide Ribbon implementation i.e. all the Ribbon UI for the entire site. In addition to this you have a CustomAction for each ribbon component. These CustomActions have CommandUIExtentions block which has CommandUIDefinitions and CommandUIHandlers which make up the activity of the ribbon component. So, when the ribbon is loaded the CommandUIDefinition merges with Out-of-Box definition in the CMDUI.XML


Q. How would you add a link in the Ribbon?
Ans. You can add any link or Custom Action under any of the existing tabs of the ribbon or can create a new a new tab and place your links under it.


Q. What does CMDUI.XML contain?
Ans. The definitions for the out-of-the-box ribbon elements are split across several files in the SharePoint root, with TEMPLATE\GLOBAL\XML\CMDUI.XML being the main one.


Q. What is REST ? How is it used in SharePoint 2010 ?
Ans. REST (Representational State transfer) is a protocol (powered by ADO.NET services) which is used for getting data out of sharepoint via Url. It is mostly used to access data from sharepoint even when you are not in the sharepoint context.


Q. What datatype is retured by REST ?
Ans. REST does not return an object of type SharePoint Site\List. Instead, it returns an XML output.


Q. What is the difference between a Site Definition and a Site Template?
Ans. Site Definitions are stored on the hard drive of the SharePoint front end servers. They are used by the SharePoint application to generate the sites users can create. Site Templates are created by users as a copy of a site they have configured and modified so that they do not have to recreate lists, libraries, views and columns every time they need a new instance of a site.


Q. How will you use WebParts or other solutions Created in SharePoint 2007 in SharePoint 2010 ?
Ans. In SharePoint 2010 the 12 hive is now replaced by 14 hive, So we will rewrite and recompile any code that refers to files and resources in “12″ hive. In addition to we must recompile custom code written for Windows SharePoint Services 3.0 and Office SharePoint Server 2007 that does not run on IIS.


Q. What has Changed in SharePoint 2010 Object model?
Ans. Microsoft has replaced the “12 hive” structure that we had in SharePoint 2007 with “14 Hive” structure in 2010.
It has apparently added four new folders to its hive.
The Folders are :
* Policy
* UserCode
* WebClients
* WebServices


Q. How do you create a Custom action for an item in a list ?
Ans. This can be done by adding a new feature into SharePoint. You would need to use customaction tag in your elements.xml file and will have to set various properties like imageurl or UrlAction for your customaction. You can later add this feature into sharepoint using stsadm install feature command.


Q. How would you bind this CustomAction to a specific list ?
Ans. To do this you can either create a new list type(again a feature) and use the listtype number for the new list in your RegistrationType property of the Customaction. The CustomAction will then show up only for the items of this list type. or You can create a new content type and then use that content type's id in your cutsomaction to bind the custom action to items of just that content type. Add the new content type to the list where you need this customaction.


Get More Questions and Answers
Q. How do make an existing non-publishing site Publishing?
Ans. You can simply activate the SharePoint Publishing Feature for the Site, you want to make publishing.


Q. What are Application Pages in SharePoint?
Ans. Unlike site pages (for example, default.aspx), a custom application page is deployed once per Web server and cannot be customized on a site-by-site basis. Application pages are based in the virtual _layouts directory. In addition, they are compiled into a single assembly DLL.
A good example of an Application Page is the default Site Settings page: every site has one, and it's not customizable on a per site basis (although the contents can be different for sites).
With application pages, you can also add inline code. With site pages, you cannot add inline code.


Q. What is Authentication and Authorization?
Ans. An authentication system is how you identify yourself to the computer. The goal behind an authentication system is to verify that the user is actually who they say they are.
Once the system knows who the user is through authentication, authorization is how the system decides what the user can do.


Q. Which is faster a WebPart or a User Control?
Ans. A WebPart renders faster than a User Control. A User Control in SharePoint is usually loaded by a webpart which adds an overhead. User Controls however, gives you an Interface to add controls and styles.


Q. What SharePoint Databases are Created during the standard Install?
Ans. The databases that are automatically created when you run the SharePoint Products Configuration Wizard for SharePoint Server 2010, Standard Edition -

1. Secure Store database - The Secure Store service application database stores and maps credentials, such as account names and passwords. Prefixed with "Secure_Store_Service_DB_".

2. State database - The State service application database stores temporary state information for InfoPath Forms Services, the chart Web Part, and Visio Services. Prefixed with "StateService".

3. Web Analytics Staging database - The Staging database temporarily stores un-aggregated fact data, asset metadata, and queued batch data for the Web Analytics service application. Prefixed with "WebAnalyticsServiceApplication_StagingDB_"

4. Web Analytics Reporting database - The Reporting database stores aggregated standard report tables, fact data aggregated by groups of sites, date and asset metadata, and diagnostics information for the Web Analytics service application. Prefixed with "WebAnalyticsServiceApplication_ReportingDB_"

5. Search service application Administration database - The Administration database hosts the Search service application configuration and access control list (ACL), and best bets for the crawl component. This database is accessed for every user and administrative action. Prefixed with "Search_Service_Application_DB_".

6. Search service application Crawl database - The Crawl database stores the state of the crawled data and the crawl history. Prefixed with "Search_Service_Application_CrawlStoreDB_'.

7. Search service application Property database - The Property database stores information that is associated with the crawled data, including properties, history, and crawl queues. Prefixed with "Search_Service_Application_PropertyStoreDB_"

8. User Profile service application Profile database - The Profile database stores and manages users and associated information. It also stores information about a user's social network in addition to memberships in distribution lists and sites. Prefixed with "User Profile Service Application_ProfileDB_".

9. User Profile service application Synchronization database -The Synchronization database stores configuration and staging data for use when profile data is being synchronized with directory services such as Active Directory.Prefixed with "User Profile Service Application_SyncDB_".

10. User Profile service application Social Tagging database - The Social Tagging database stores social tags and notes created by users, along with their respective URLs.Prefixed with "User Profile Service Application_SocialDB_".

11. Managed Metadata database - The Managed Metadata service application database stores managed metadata and syndicated content types. Prefixed with "
Managed Metadata Service_".


In addition to all the databases created with Standard edition, Enterprise addition install adds two more databases :

1. PerformancePoint service application database - The PerformancePoint service application database stores temporary objects, persisted filter values, and user comments. Name Prefix "PerformancePointServiceApplication_.."

2. Word Automation Services database - The Word Automation Services database stores information about pending and completed document conversions.Name Prefix "WordAutomationServices_..."


Note : You do not have to use these naming conventions. You can either specify database names when you create them, or change the database names after they have been created.


Q. What files gets created on a file system, when a Site collection is created ?
Ans. Windows SharePoint Services does not create any files or folders on the file system when the site collection or sites are created; everything is created in the content database. The Pages for the site collection are created as instances in the content database. These instances refer to the actual file on the file system.


Q. How would you remove a webapart from the WebPart gallery? Does it get removed with Webpart retraction?
Ans. No, Webpart does not get removed from the WebPart gallery on retraction. You can write a feature receiver on Featuredeactivating method to remove the empty webpart from the gallery.


Q. what is the difference between SharePoint Portal Server and Windows SharePoint Services?
Ans.
SharePoint Portal Server is the global portal offering features like global navigation and searching. Windows SharePoint Services is more content management based with document libraries and lists. You apply information to certain areas within your portal from Windows SharePoint Services or directly to portal areas.


Q. what is a document library?
Ans. A document library is where you upload your core documents. They consist of a row and column view with links to the documents. When the document is updated so is the link on your site. You can also track metadata on your documents. Metadata would consist of document properties.


Q.
what is a meeting workspace?
Ans. A meeting workspace is a place to store information, attendees, and tasks related to a specific meeting.


Q. what is a document workspace?
Ans. Document workspaces consist of information surrounding a single or multiple documents.


Q. what is a web part?
Ans Web parts consist of xml queries to full SharePoint lists or document libraries. You can also develop your own web parts and web part pages.


Q. what is a web part zone?
Ans. Web part zones are what your web parts reside in and help categorize your web parts when designing a page.


Q.
how is security managed in SharePoint?
Ans.
Security can be handled at the machine, domain, or sharepoint level.


Q. how are web parts developed?
Ans.
Web parts are developed in Visual Studio .Net. VS.Net offers many web part and page templates and can also be downloaded from the Microsoft site.


Q. what is a site definition?
Ans. It’s a methods for providing prepackaged site and list content.


Q. what is a template?
Ans. A template is a pre-defined set of functions or settings that can be used over time. There are many templates within SharePoint, Site Templates, Document Templates, Document Library and List Templates.


Q. what are the differences between web part page gallery, site gallery, virtual server gallery and online gallery?
Ans. Web Part Page Gallery is the default gallery that comes installed with SharePoint. Site Gallery is specific to one site. Virtual Server gallery is specific to that virtual server and online gallery are downloadable web parts from Microsoft.




Q. What does AllowUnsafeUpdates do ?
Ans.
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 AllowUnsafeUpdates property. C#:

using(SPSite mySite = new SPSite("yourserver"))
{ using(SPWeb myWeb = mySite.OpenWeb())
{
myWeb.AllowUnsafeUpdates = true;
SPList interviewList = myWeb.Lists["listtoinsert"];
SPListItem newItem = interviewList.Items.Add();
newItem["interview"] = "interview";
newItem.Update();
}
}
Q What does RunWithElevatedPrivileges do?
Ans.
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 site-administration 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. C#:

SPSite siteColl = SPContext.Current.Site;
SPWeb site = SPContext.Current.Web;
SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPSite ElevatedsiteColl = new SPSite(siteColl.ID))
{
using (SPWeb ElevatedSite = ElevatedsiteColl.OpenWeb(site.ID))
{
string SiteCollectionOwner = ElevatedsiteColl.Owner.Name;
string Visits = ElevatedsiteColl.Usage.Visits.ToString();
string RootAuditEntries = ElevatedSite.RootFolder.Audit.GetEntries().Count.ToString();
}
}
}
)

Q. What is a SharePoint Feature? What files are used to define a feature?
Ans.
A SharePoint Feature is a functional component that can be activated and deactivate at various scopes throughout a SharePoint instances.
Scopes include

* Farm
* WebApplication
* Site (site collection)
* Web (site)

Features have their own receiver architecture, which allow you to trap events such as when a feature is

* installing
* uninstalling
* activated
* deactivated

The element types that can be defined by a feature include

* menu commands
* link commands
* page templates
* page instances
* list definitions
* list instances
* event handlers
* workflows

The two files that are used to define a feature are

* feature.xml
* manifest file(elements.xml)

The feature XML file defines the actual feature and will make SharePoint aware of the installed feature. The manifest file contains details about the feature such as functionality.
Common stsadm commands associated with feature are

* stsadm -o installfeature
* stsadm -o uninstallfeature
* stsadm -o activatefeature
* stsadm -o deactivatefeature


Q. What are content types ?
Ans.
A content type is a flexible and reusable WSS type definition that defines the columns and behavior for an item in a list or a document in a document library.
For example,
-you can create a content type for a customer presentation document with a unique set of columns, an event handler, and its own document template.
-You can create a second content type for a customer proposal document with a different set of columns, a workflow, and a different document template.
Then you can attach both the contenttypes to a document library, which allows you to capture metadata based on the contenttype selected during creation of the document.

Content type can be created by the following

* from the rootweb of a site collection, go to Site Action > Site Settings > Galleries > Site content types
* using a feature

Q. What does SPWeb.EnsureUser method do?
Ans.
Checks whether the specified login name belongs to a valid user of the Web site, and if the login name does not already exist, adds it to the Web site. e.g SPUser usr = myWeb.EnsureUser("mmangaldas");
Q.
While creating a Webpart, which is the ideal location to Initialize my new controls ?
Ans. Override the CreateChildControls method to include your new controls. To make sure that the new controls are initialized.. call 'EnsureChildControls' in the webparts Render method. You can control the exact Rendering of your controls by calling the .Render method in the webparts Render method.
Q. How to query from multiple lists ?
Ans.
Use SPSiteDataQuery to fetch data from multiple lists. more details..
Q. How Does SharePoint work?
Ans. The browser sends a DAV packet to IIS asking to perform a document check in. PKMDASL.DLL, an ISAPI DLL, parses the packet and sees that it has the proprietary INVOKE command. Because of the existence of this command, the packet is passed off to msdmserv.exe, who in turn processes the packet and uses EXOLEDB to access the WSS, perform the operation and send the results back to the user in the form of XML.
Q. What is the difference between Syncronous & Asyncronous events?
Ans.
Syncronous calls ending with 'ing' E.g. ItemDeleting Event Handler code execute BEFORE action is committed WSS waits for code to return Option to cancel and return error code
Asyncronous calls ending with 'ed' E.g. ItemDeleted Event Handler code executes AFTER action is committed WSS does not wait for code to return Executed in its own Worker thread.
Q. What is ServerUpdate() ?
Ans.
Any changes in the list, i.e. new addition or modification of an item.. the operation is complete by calling the Update method.But if a List is set to maintain versions .. and you are editing an item, but don't want to save it as a new version, then use the SystemUpdate method instead and pass in 'false' as the parameter.
Q. What is query.ViewAttributes OR How can you force SPQuery to return results from all the folders of the list?
Ans.
If you use SPQuery on any SPlist .. it will bring back results from the current folder only. If you want to get results from all the folders in the list.. then you need to specify the scope of the query by the use of ViewAttributes..
e.g. query.ViewAttributes = "Scope=\"Recursive\"";
Q. What are the two base classes a WebPart you are going to use within SharePoint 2007 can inherit from?
Ans.
There are two base classes that a WebPart which is going to be consumed by SharePoint can inherit from, either the SharePoint WebPart Base class or the ASP.NET 2.0 WebPart base class. When inheriting from the SharePoint WebPart Base class your derived WebPart class will inherit from Microsoft.SharePoint.WebPartPages.WebPart. When inheriting from the ASP.NET 2.0 WebPart base class your derived WebPart class will inherit from System.Web.UI.WebControls.WebParts.WebPart. It is considered good practice to use the ASP.NET WebPart base class since the old base class is meant for backwards compatibility with previous version of SharePoint, however there are four exception when it is better to leverage functionality from the SharePoint WebPart base class:

* Cross page connections
* Connections between Web Parts that are outside of a Web Part zone
* Client-side connections (Web Part Page Services Component)
* Data caching infrastructure

Q. What are the differences between the two base classes and what are the inherit benefits of using one over another?
Ans.
The difference is the Microsoft.SharePoint.WebPartPages.WebPart base class is meant for backward compatibility with previous versions of SharePoint. The benefit of using the SharePoint WebPart base class is it supported:

* Cross page connections
* Connections between Web Parts that are outside of a Web Part zone
* Client-side connections (Web Part Page Services Component)
* Data caching infrastructure

ASP.NET 2.0 WebParts are generally considered better to use because SharePoint is built upon the ASP.NET 2.0 web architecture. Inheriting from the ASP.NET 2.0 base class offers you features that inherit to ASP.NET 2.0, such as embedding resources as opposed to use ClassResources for deployment of said types.
Q. What is the GAC?
Ans.
The GAC stands for the global assembly cache. It is the machine wide code cache which will give custom binaries place into the full trust code group for SharePoint. Certain SharePoint assets, such as Feature Receivers need full trust to run correctly, and therefore are put into the GAC. You should always try to avoid deployment to the GAC as much as possible since it will possibly allow development code to do more than it was intended to do.
Q. What is strong naming (signing) a WebPart assembly file mean?
Ans.
Signing an assembly with a strong name (a.k.a strong naming) uses a cryptographic key pair that gives a unique identity to a component that is being built. This identity can then be referred throughout the rest of the environment. In order to install assemblies into the GAC, they must be strongly named. After signing, the binary will have a public key token identifier which can be use to register the component in various other places on the server.
Q. What are safe controls, and what type of information, is placed in that element in a SharePoint web.config file?
Ans.
When you deploy a WebPart to SharePoint, you must first make it as a safe control to use within SharePoint in the web.config file. Entries made in the safe controls element of SharePoint are encountered by the SharePointHandler object and will be loaded in the SharePoint environment properly, those not will not be loaded and will throw an error.
In the generic safe control entry (this is general, there could be more), there is generally the Assembly name, the namespace, the public key token numeric, the typename, and the safe declaration (whether it is safe or not). There are other optional elements.
Q.
What is the CreateChildControls() method? How can you use it to do something simple like displaying a Label control?
Ans.
The CreateChildControls method in WebParts is used to notify the WebPart that there are children controls that should be output for rendering. Basically, it will add any child ASP.NET controls that are called instantiating each control with its relevant properties set, wire any relevant event handlers to the control, etc. Then the add method of the control class will add the control to the controls collection. In the relevant WebPart render method, the EnsureChildControls method can be called (or set to false if no child controls should be called) to ensure that the CreateChildControls method is run. When using CreateChildControls it implies that your WebPart contains a composition of child controls.
In order to create something like a label control in Create, you would create a new label control using the new keyword, set the various properties of the control like Visible=True and ForeColor = Color.Red, and then use Controls.Add(myLabelControl) to add the control to the controls collection. Then you can declare EnsureChildControls in the Render method of the WebPart.
Q. What does the RenderContents method do in an ASP.NET 2.0 WebPart?
Ans.
The render contents method will render the WebPart content to the writer, usually an HtmlTextWriter since WebParts will output to an HTML stream. RenderContents is used to tell how the controls that are going to be displayed in the WebPart should be rendered on the page.
*** Side Question: I got asked what the difference between CreateChildControls and the RenderContents method. The CreateChildControls method is used to add controls to the WebPart, and the RenderContents method is used to tell the page framework how to render the control into HTML to display on a page.
Q. What is the WebPartManager sealed class? What is its purpose?
Ans.
The WebPartManager sealed class is responsible for managing everything occurring on a WebPart page, such as the WebParts (controls), events, and misc. functionality that will occur in WebPartZones. For example, the WebPartManager is responsible for the functionality that is provided when you are working with moving a WebPart from WebPartZone to WebPartZone. It is known as the “the central class of the Web Part Control Set.”
*** Side Question: I got asked how many WebPartManager controls should be on a page. In order to have WebParts on a page there has to be just one WebPartManager control to manage all the WebParts on the page.
Q. What is a SPSite and SPWeb object, and what is the difference between each of the objects?
Ans.
The SPSite object represents a collection of sites (site collection [a top level sites and all its subsites]). The SPWeb object represents an instance SharePoint Web, and SPWeb object contains things like the actual content. A SPSite object contains the various subsites and the information regarding them.
Q. How would you go about getting a reference to a site?
Ans.
C#:
oSPSite = new SPSite("http:/server");

oSPWeb = oSPSite.OpenWeb();
Q. What does a SPWebApplication object represent?
Ans.
The SPWebApplication objects represents a SharePoint Web Application, which essentially is an IIS virtual server. Using the class you can instigate high level operations, such as getting all the features of an entire Web Application instance, or doing high level creation operations like creating new Web Applications through code.
Q. Would you use SPWebApplication to get information like the SMTP address of the SharePoint site?
Ans.
Yes, since this is a Web Application level setting. You would iterate through each SPWebApplication in the SPWebApplication collection, and then use the appropriate property calls (OutboundMailServiceInstance) in order to return settings regarding the mail service such as the SMTP address.
Side Question: I got asked if there are other ways to send emails from SharePoint. The answer is yes, there is. You can use the SendMail method from the SPutility class to send simple emails, however it is not as robust as using the System.Net.Mail functionality since it doesn’t allow things like setting priorities on the email.
Q. How do you connect (reference) to a SharePoint list, and how do you insert a new List Item?
Ans.
C#:
using(SPSite mySite = new SPSite("yourserver"))
{
using(SPWeb myWeb = mySite.OpenWeb())
{
SPList interviewList = myWeb.Lists["listtoinsert"];
SPListItem newItem = interviewList.Items.Add();

newItem["interview"] = "interview";
newItem.Update();
}
}
Q. How would you loop using SPList through all SharePont List items, assuming you know the name (in a string value) of the list you want to iterate through, and already have all the site code written?
Ans.
C#:
SPList interviewList = myWeb.Lists["listtoiterate"];
foreach (SPListItem interview in interviewList)
{
// Do Something
}
Q. How do you return SharePoint List items using SharePoint web services?
Ans.
In order to retrieve list items from a SharePoint list through Web Services, you should use the lists.asmx web service by establishing a web reference in Visual Studio. The lists.asmx exposes the GetListItems method, which will allow the return of the full content of the list in an XML node. It will take parameters like the GUID of the name of the list you are querying against, the GUID of the view you are going to query, etc.
Side Question: I got asked how I built queries with the lists.asmx web service. In order to build queries with this service, one of the parameters that the GetListItems method exposes is the option to build a CAML query. There are other ways to do this as well, but that was how I answered it.
Q. How customizable is the user-to-user access?
Ans.
User permissions apply to an entire Web, not to documents themselves. However, you can have additional sub webs that can optionally have their own permissions. Each user can be given any of four default roles. Additional roles can be defined by the administrator.
Can each user have access to their own calendar?
Yes there are two ways to do this,

* by creating a calendar for each user, or
* by creating a calendar with a view for each user

Q. Can SharePoint be linked to a SQL database?
Ans.
This is possible via a custom application, but it not natively supported by SharePoint or SQL Server.
Q. What does partial trust mean the Web Part developer?
Ans.
If an assembly is installed into the BIN directory, the code must be ensured that provides error handling in the event that required permissions are not available. Otherwise, unhandled security exceptions may cause the Web Part to fail and may affect page rendering on the page where the Web Part appears
Q. How can I raise the trust level for assemblies installed in the BIN directory?
Ans.
Windows SharePoint Services can use any of the following three options from ASP.NET and the CLR to provide assemblies installed in the BIN directory with sufficient permissions. The following table outlines the implications and requirements for each option.
Option

Pros

Cons
Increase the trust level for the entire virtual server. For more information, see "Setting the trust level for a virtual server"

Easy to implement.
In a development environment, increasing the trust level allows you to test an assembly with increased permissions while allowing you to recompile assemblies directly into the BIN directory without resetting IIS.

This option is least secure.
This option affects all assemblies used by the virtual server.

There is no guarantee the destination server has the required trust level. Therefore, Web Parts may not work once installed on the destination server.
Create a custom policy file for your assemblies. For more information, see "How do I create a custom policy file?"

Recommended approach.
This option is most secure.

An assembly can operate with a unique policy that meets the minimum permission requirements for the assembly.

By creating a custom security policy, you can ensure the destination server can run your Web Parts.

Requires the most configuration of all three options.
Install your assemblies in the GAC

Easy to implement.
This grants Full trust to your assembly without affecting the trust level of assemblies installed in the BIN directory.

This option is less secure.
Assemblies installed in the GAC are available to all virtual servers and applications on a server running Windows SharePoint Services. This could represent a potential security risk as it potentially grants a higher level of permission to your assembly across a larger scope than necessary

In a development environment, you must reset IIS every time you recompile assemblies.

Licensing issues may arise due to the global availability of your assembly.
Q. When retrieving List items using SharePoint Web Services, how do you specify explicit credentials to be passed to access the list items?
Ans.
In order to specify explicit credentials with a Web Service, you generally instantiate the web service, and then using the credentials properties of the Web Service object you use the System.Net.NetworkCredential class to specify the username, password, and domain that you wish to pass when making the web service call and operations.
*** Side Question: I got asked when you should state the credentials in code. You must state the credentials you are going to pass to the web service before you call any of the methods of the web service, otherwise the call will fail.
Q. What is CAML, and why would you use it?
Ans.
CAML stands for Collaborative Application Markup Language. CAML is an XML based language which provides data constructs that build up the SharePoint fields, view, and is used for table definition during site provisioning. CAML is responsible for rending data and the resulting HTML that is output to the user in SharePoint. CAML can be used for a variety of circumstances, overall is used to query, build and customize SharePoint based sites. A general use would be building a CAML query in a SharePoint WebPart in order to retrieve values from a SharePoint list.

Q. What is impersonation, and when would you use impersonation?
Ans. Impersonation can basically provide the functionality of executing something in the context of a different identity, for example assigning an account to users with anonymous access. You would use impersonation in order to access resources on behalf of the user with a different account, that normally, that wouldn’t be able to access or execute something.
Q. What is the IDesignTimeHtmlProvider interface, and when can you use it in WebParts?
Ans.
The IDesignTimeHtmlProvider interface uses the function GetDesignTimeHtml() which can contain your relevant render methods. It was helpful to use in 2003 since it allowed your WebPart to have a preview while a page was edited in FrontPage with the Webpart on it, because the GetDesignTimeHtml() method contains the HTML for the designer to render.
Q. What are WebPart properties, and what are some of the attributes you see when declaring WebPart properties in code?
Ans.
WebPart properties are just like ASP.NET control properties, they are used to interact with and specify attributes that should be applied to a WebPart by a user. Some of the attributes you see with ASP.NET 2.0 properties are WebDescription, WebDisplayName, Category, Personalizable, and WebBrowsable. Although most of these properties come from the System.Web.UI.WebControls.WebParts class, ones like Category come out of System.ComponentModel namespace.

Q. Why are properties important in WebPart development, and how have you exploited them in past development projects? What must each custom property have?
Ans.
Properties are important because WebParts allow levels of personalization for each user. WebPart properties make it possible for a user to interact, adjust, and increase overall experience value with the programmatic assets that you develop without having the need to use an external editor or right any code. A very simple example of exploiting a property would be something like allowing the user to change the text on the WebPart design interface so that they can display whatever string of text they desire.
Each custom property that you have must have the appropriate get and set accessor methods.

Q. What are ClassResources? How do you reference and deploy resources with an ASP.NET 2.0 WebPart?
Ans.
ClassResources are used when inheriting from the SharePoint.WebPart.WebPartPages.WebPart base class, and are defined in the SharePoint solution file as things that should be stored in the wpresources directory on the server. It is a helpful directory to use in order to deploy custom images. In ASP.NET 2.0, typically things such as images are referenced by embedding them as resources within an assembly. The good part about ClassResources is they can help to eliminate recompiles to change small interface adjustments or alterations to external JavaScript files.

Q. What is a SharePoint Solution File? How does it differ from WebPart .cab files in legacy development? What does it contain?
Ans.
A SharePoint solution file is essentially a .cabinet file with all a developers ustom componets suffixed with a .wsp extension that aids in deployment. The big difference with SharePoint solution files is is that a solution:
allows deployment to all WFE’s in a farm
is highly manageable from the interface allowing deployment, retraction, and versioning
Can package all types of assets like site definitions, feature definitions (and associated components), Webparts, etc.
Can provide Code Access Security provisioning to avoid GAC deployments
Just to name a few things…
Q. What is a .ddf file and what does it have to do with SharePoint Solution creation?
Ans.
A .ddf file is a data directive file and is used when building the SharePoint solution bundle specifying the source files and their destination locations. The important thing for someone to understand is that the .ddf file will be passed as a parameter to the MAKECAB utility to orchestrate construction of the SharePoint solution file.
Q. What file does a SharePoint solution package use to orchestrate (describe) its packaged contents?
Ans.
The solution Manifest.XML file.
Q. What deployment mechanism can you use to instigate Code Access Security attributes for your WebParts?
Ans.
SharePoint solution files can add in order to handle code access security deployment issues. This is done in the element in the SharePoint solution manifest.XML, which makes it easier to get assemblies the appropriate permissions in order to operate in the bin directory of the web application.
Q. What is a SharePoint Feature? What files are used to define a feature?
Ans.
A SharePoint Feature is a functional component that can be activated and deactivate at various scopes throughout a SharePoint instances, such as at the farm, site collection, web, etc. Features have their own receiver architecture, which allow you to trap events such as when a feature is installing, uninstalling, activated, or deactivated. They are helpful because they allow ease of upgrades and versioning.
The two files that are used to define a feature are the feature.xml and manifest file. The feature XML file defines the actual feature and will make SharePoint aware of the installed feature. The manifest file contains details about the feature such as functionality.
Side Question: I got asked how the introduction of features has changed the concept of site definitions. SharePoint features are important when understanding the architecture of site definitions, since the ONET.XML file has been vastly truncated since it has several feature stapled on it.
Q. What types of SharePoint assets can be deployed with a SharePoint feature?
Ans.
Features can do a lot. For example, you could deploy

* Simple site customizations
* Custom site navigation
* WebParts
* pages
* list types
* list instances
* event handlers
* workflows
* custom actions

Q. What are event receivers?
Ans.
Event receivers are classes that inherit from the SpItemEventReciever or SPListEventReciever base class (both of which derive out of the abstract base class SPEventRecieverBase), and provide the option of responding to events as they occur within SharePoint, such as adding an item or deleting an item.
Q. When would you use an event receiver?
Ans.
Since event receivers respond to events, you could use a receiver for something as simple as canceling an action, such as deleting a document library by using the Cancel property. This would essentially prevent users from deleting any documents if you wanted to maintain retention of stored data.
Q. What base class do event receivers inherit from?
Ans.
Event receivers either inherit from the SPListEventReciever base class or the SPItemEventReciever base class, both which derive from the abstract base class SPEventReceiverBase.
Q. If I wanted to not allow people to delete documents from a document library, how would I go about it?
Ans.
You would on the ItemDeleting event set: properties.Cancel= true.
33) What is the difference between an asynchronous and synchronous event receivers?
An asynchronous event occurs after an action has taken place, and a synchronous event occurs before an action has take place. For example, an asynchronous event is ItemAdded, and its sister synchronous event is ItemAdding.
Q. How could you append a string to the title of a site when it is provisioned?
Ans. In the OnActivated event:
SPWeb site = siteCollection.RootWeb;
site.Title += "interview";
site.Update();
Q. Can an event receiver be deployed through a SharePoint feature?
Ans. Yes
Q. What is a content type?
Ans.
A content type is an information blueprint basically that can be re-used throughout a SharePoint environment for defining things like metadata and associated behaviors. It is basically an extension of a SharePoint list, however makes it portable for use throughout an instance regardless of where the instantiation occurs, ergo has location independence. Multiple content types can exist in one document library assuming that the appropriate document library settings are enabled. The content type will contain things like the metadata, listform pages, workflows, templates (if a document content type), and associated custom written functionality.
Q. Can a content type have receivers associated with it?
Ans.
Yes, a content type can have an event receiver associated with it, either inheriting from the SPListEventReciever base class for list level events, or inheriting from the SPItemEventReciever base class. Whenever the content type is instantiated, it will be subject to the event receivers that are associated with it.
Q. What two files are typically (this is kept generally) included when developing a content type, and what is the purpose of each?
Ans.
There is generally the main content type file that holds things like the content type ID, name, group, description, and version. There is also the ContentType.Fields file which contains the fields to include in the content type that has the ID, Type, Name, DisplayName, StaticName, Hidden, Required, and Sealed elements. They are related by the FieldRefs element in the main content type file.
Q. What is an ancestral type and what does it have to do with content types?
Ans.
An ancestral type is the base type that the content type is deriving from, such as Document (0x0101). The ancestral type will define the metadata fields that are included with the custom content type.
Q. Can a list definition be derived from a custom content type?
Ans.
Yes, a list definition can derive from a content type which can be seen in the schema.XML of the list definition in the element.
Q. When creating a list definition, how can you create an instance of the list?
Ans.
You can create a new instance of a list by creating an instance.XML file.
Q. What is a Field Control?
Ans.
Field controls are simple ASP.NET 2.0 server controls that provide the basic field functionality of SharePoint. They provide basic general functionality such as displaying or editing list data as it appears on SharePoint list pages.
Q. What base class do custom Field Controls inherit from?
Ans.
This varies. Generally, custom field controls inherit from the Microsoft.SharePoint.WebControls.BaseFieldControl namespace, but you can inherit from the default field controls.
Q. What is a SharePoint site definition? What is ghosted (uncustomized) and unghosted (customized)?
Ans.
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. Ghosted means that when SharePoint creates a new site it will reference the files in the related site definition upon site provisioning. 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 file system.
Q. How does one deploy new SharePoint site definitions so that they are made aware to the SharePoint system?
Ans. The best way to deploy site definitions in the SharePoint 2007 framework is to use a SharePoint solution file, so that the new site definition is automatically populated to all WFE’s in the SharePoint farm.
Q. What is an ancestral type and what does it have to do with content types?
Ans.
An ancestral type is the base type that the content type is deriving from, such as Document (0x0101). The ancestral type will define the metadata fields that are included with the custom content type.
Q. Can a list definition be derived from a custom content type?
Ans.
Yes, a list definition can derive from a content type which can be seen in the schema.XML of the list definition in the element.
Q. When creating a list definition, how can you create an instance of the list?
Ans.
You can create a new instance of a list by creating an instance.XML file
Q. Can multiple SharePoint installs point to the same DB?
Ans. Multiple SharePoint installs can use the same database server. Not literally the same database on that server. That server must be SQL Server 2000 or SQL Server 2005. It cannot be Oracle or another vendor.

Blog Archive