Thursday, December 31, 2009

'Feature {Guid} for list template is not installed in this farm. The operation could not be completed'

Hi All,

I was developing a SharePoint solution where I have to provision a link list with some kind of manipulations.
The solution was successfully deployed and I was testing the solution. Accidently, I uninstall the solution and NOT DEACTIVATE the feature.

I got this weird error:
"Feature {Guid} for list template is not installed in this farm. The operation could not be completed"

It was utterly frustrating till I found a solution in “CodePlex”:
"SharePoint List Instance Fix Tool ".

Q. How this tool solves the issue?

What actually does is that, asks us to use a different template altogether and we just click on “Fix” button. Apparently, by choosing a pre-defined template the farm can detect the template and therefore there is no error.

Later on, we can delete this list.


Monday, December 28, 2009

Examining the differences between "Site Defintion" and "Site Template"

Hi all,

The concepts of "Site Definitions" and "Site Templates" are slightly confusing. I have jotted down the basic differences between the two. 

The concept is quite similar to the "Application pages" and "Site Pages" whereas 
 i) Application pages: are on the file system, complex to develop, only developers can create etc. 
ii) Site pages: are on the database, simple to develop, end users can do using Web UI etc. 

For more information on the "Application pages" and "Site Pages", please refer to my blog.  

Site Definitions

Site Templates

1) Requires administration access to the server

Installable  from the Web UI by site owners

2) Supports feature stapling
Additional features must be activated in gallery

3) Files on the file system

Files on the database. 

4) Can provision multiple webs 

Single web only

5) Relatively complex 

Relatively simple


How to: Create a customized "Application Page" in SharePoint 2007 using WSPBuilder - Part 1

Hi all,

Developing an application page in SharePoint is not very straightforward. In this walk through, I will demonstrate and explain step-by-step. 

Please read my blog about "Application Pages" and "Site Pages"

Following is a the screen shot of an customized application page:

Step1) Fire up Visual Studio.NET.

File >> New >> Project >> WSPBuilderProject >> ProjectName: WSPBuilderApplicationProject

Step2) Prepare 12 hive structure with proper folders.

>> Create a folder named "TEMPLATE"
>> Under "Template" folder,create a sub-folder named
>> Under "Images" folder , create a folder "ASPXAJAX"
>> Under "ASPXAJAX" create an image named "aspx_ajax.png"

>> Under "Template" folder,create a sub-folder named
>> Under "Layouts" folder , create a folder "ASPX"
>> Under "ASPX", Right click on the ASPX folder, Add new item, Select Text File and Rename the TextFile1.txt to “CustomPage.aspx”

>> Right click on the "WSPBuilderApplicationPage", Add >> Add Folder and name it to "Assembly"
>> Under "Assembly" folder, create a sub-folder names "WebControls"
>> Right click on the WebControls folder, Add new item, select class and rename Class1.cs to Control1.cs

Step3) Add a reference to System.Web.dll

>> Go to the Project menu, click Add Reference
>> Locate the "System.Web.dll"
>> Click the OK button.

Step4) Modifying the "CustomPage.aspx" page.

>> On the first line specify the MasterPageFile
<%@ Page Language="C#" MasterPageFile="~/_layouts/application.master" %>

>> Adding the content place handlers. 

<%--Control Place Holder--%>
<asp:Content ID="Main" runat="server" ContentPlaceHolderID="PlaceHolderMain">
                <CustomControls:Control1 ID="control1" runat="server" />
                <asp:Label ID="Label1" runat="server" Text="Label">Hello World</asp:Label> <br />
                <br />
                <asp:Calendar ID="Calendar1" runat="server" ></asp:Calendar>
            <td align="right">
              Customized application page with custom control

>> Add site title to the browser and to the page

<%--Site Title in the Browser--%>
<asp:Content ID="PageTitle" runat="server" ContentPlaceHolderID="PlaceHolderPageTitle">
    Customized application page with custom control

<%--Site Title in the Page --%>
<asp:Content ID="PageTitleInTitleArea" runat="server" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea">
    Customized application page with custom control

Step5) Modifying the "Control1.cs" class.

>> Add these "using" statements.

using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI.WebControls;
using System.Web.UI;
using System.Web;

>> . Override the "CreateChildControls" method with this code:

namespace WSPBuilderApplicationPage.WebControls
    public class Control1 : System.Web.UI.WebControls.WebControl
        protected override void CreateChildControls()
            Image imgButton = new Image();
            imgButton.ImageUrl = "/_layouts/images/ASPXAJAX/asp-net-ajax.png";
            imgButton.ToolTip = "ASPXAJAX";
            imgButton.Attributes.Add("OnClick", "location.href('http://testserver/sites/apac/default.aspx')");
            imgButton.Attributes.Add("style", "cursor: hand;");


Step6 ) Deploying  the WSP solution.

>> Build the solution and check if there is any error.
>> Right click on the "WSPBuilder" menu >> Build WSP >> Deploy.
>> Also on the menu select "Copy to GAC".
>> Get the assembly information from the GAC which is located at C:\Windows\assembly
>> Add the assembly information to the "CustomPage.aspx", just below the

CustomPage.aspx (Full code)
<%@ Page Language="C#" MasterPageFile="~/_layouts/application.master" %> i.e. 

<%@ Register TagPrefix="CustomControls" Namespace="ApplicationPageWithCustomControl.WebControls"
    Assembly="ApplicationPageWithCustomControl, Version=, Culture=neutral, PublicKeyToken=6b80c524e7fdd639" %>

<%--Control Place Holder--%>
<asp:Content ID="Main" runat="server" ContentPlaceHolderID="PlaceHolderMain">
                <CustomControls:Control1 ID="control1" runat="server" />
                <asp:Label ID="Label1" runat="server" Text="Label">Hello World</asp:Label> <br />
                <br />
                <asp:Calendar ID="Calendar1" runat="server" ></asp:Calendar>
            <td align="right">
              Customized application page with custom control

<%--Site Title in the Browser--%>
<asp:Content ID="PageTitle" runat="server" ContentPlaceHolderID="PlaceHolderPageTitle">
    Customized application page with custom control

<%--Site Title in the Page --%>
<asp:Content ID="PageTitleInTitleArea" runat="server" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea">
    Customized application page with custom control

------------------------------------END OF CustomPage.aspx ------------------------------

 Control1.cs (Full code)
using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI.WebControls;
using System.Web.UI;
using System.Web;

namespace WSPBuilderApplicationPage.WebControls
    public class Control1 : System.Web.UI.WebControls.WebControl
        protected override void CreateChildControls()
            Image imgButton = new Image();
            imgButton.ImageUrl = "/_layouts/images/ASPXAJAX/asp-net-ajax.png";
            imgButton.ToolTip = "ASPXAJAX";
            imgButton.Attributes.Add("OnClick", "location.href('http://testserver/sites/apac/default.aspx')");
            imgButton.Attributes.Add("style", "cursor: hand;");

----------------------END OF Control1.cs-----------------------------------------------------------

>> Deploy the solution again by hitting the "Upgrade" option of the "WSPBuilder".

 Step7) On the "Central Administration ", go to "Operations" >> "Solution Management" and check if our solution is successfully deployed on the farm.

To test our customized application page, go to:


Examining the differences between "Application Pages" and "Site Pages"

Hi all,

There are lot of differences between "Application Pages" and "Site Pages". To really understand these concepts, we have to examine the WSS 3.0 integration with ASP.NET. So, let's get started.

Q. What are the WSS 3.0 design goals and why we needed WSS in the first place?
A. When WSS 3.0 was not the market, ASP.NET developers had to contentiously create web-sites and they have to be monitored, updated and deleted. Apparently, it takes weeks (if not months) to develop full-fledged sites.

WSS 3.0 has a high-level design goals and are on top of the ASP.NET framework. The basic design goals are:

a) Requires sites to be created contentiously created, updated and deleted.
b) Site provisioning engine:
The act of the provisioning (a fancy word for creating) that allow site administrators to quickly create pages, lists, document libraries etc.

The bigger picture of WSS architecture are
i) Manageability
ii) Scalability

Site pages:

Concept of SPVirtualPathProvider and Page Ghosting: 

>> Strength of WSS over ASP.NET
Its the ability to provision and customize pages within a site WITHOUT to make changes to the local file system.

>> How its done??
Its possible to store customized version of .ASPX and .MASTER files inside the "content database" (SQL Server) and retrieving them on demand when they are needed to process on incoming page requests.

For e.g.

i) We modify the "default.aspx" page using SharePoint designer and save it.
ii) Behind the scenes, WSS will save to this page into "content database" (not in the file-system).
iii)WSS team created a virtual path "SPVirtualPathProvider" that is integrated with every web application.

Its able to retrieve an ASP.NET page from the content database along with ASP.NET run time for parsing.

Typically, web-sites and pages are stored on the disk. Contrary to SharePoint which capitalizes the concept of  "SPVirtualPathProvider"and stores in the content database. Therefore, "Site Pages" get the information from the content database and allows the Site scale out thousands of pages. 

The basic reason:

Site pages are generally templates with only a fairly small amount of different data each. This data is stored in the database, to be used in specifically located "place-holders" on the user pages.Moreover, if we have thousands of pages using database technologies, is generally much faster to extract the required changes via stored procedures, rather than disk-i/o.

Page ghosting: 

Definition (Ted Pattison):
"Page ghosting describes the act of processing a request for an uncustomized "page instance" by using a "page template" loaded into memory from the file system of the front-end Web server."

In short, a page is considered ghosted its NOT customized. 
There are couple of benefits of page ghosting:

i)  It eliminates the need to transfer the contents of a page definition file from the SQL Server computer with the content database to the front-end Web server computer.

ii) Ghosting does not mean that it has the same data as the next page, but it does have the same layout, to use the same un-customized template.

Therefore it makes is possible to process the home-pages for hundreds different sites by using a single page template.

iii) Its an optimization technique and supports page customization. 

>> Site pages are that support user customization.

>> Examples of "Site Pages" are
associated with lists and document libraries  default.aspx (home page), NewForm.aspx, EditForm.aspx, DispForm.aspx etc.

>> Users can customize and there is NO need to developer.

>> Customized versions (from users) stored in content database and NOT in file-system. The saving and retrieving of content from the database is provided using "SPVirutalPathProvider" class.

>> "Site pages" could exist either in customized(unghosted) or uncustomized(ghosted) state and they are stored in content database.

GHOSTED (uncustomized):
An un-customized Site Page that can be stored as a template and combined with data from the content database is called ghosted. (template + data)

UN-GHOSTED (customized):
Whole page must be stored in the database, it is called un-ghosted.(Whole page)

>> Site Pages DO NOT support in-line code .i.e. . This security feature prevents a user from injecting code into page which may maliciously, or unintentionally, bring down a server, snoop data, etc. 

>> Provides scalability but impact performance and Security
as compared to application pages.   However when page is customized, SPVirtualPathProvider retrieves the customized version of the page from the content database and passes it to ASP.NET parser. Now these pages aren’t compiled into assembly. They are processed by ASP.NET parser in no-compile mode.

Application Pages: 

 Developing application pages for SharePoint can be challenging. pplication pages are .aspx pages that reside in the _layouts folder on each web front-end server, and can be accessed from any site within SharePoint by using the /_layouts virtual folder (for example http://Server/SiteCollection/Site/_layouts/MyPage.aspx). The pages are usually used for administration pages to this end, and in some cases this is the only option.

More details about Application pages:

>> "Application pages" DO NOT support user customization.

>> Application pages generally use a master page to enforce a consistent look and feel, but in this case they will mostly use the ~/_layouts/application.master page.

>> They have to developed by a SharePoint developer.

>> They are file based and stores on "layouts" under 12 hive.

 >> By default, compiled into individual DLLs and loaded into memory. In all, it is a fact that they are more powerful and run faster than Site pages.Thereby give better performance and security.

This post gives a detailed comparison between "Site Pages" and "Application Pages".
Developing an application page is not super easy and in next post, I will walk though to develop an application page.


Thursday, December 24, 2009

How to: Create a Web Part using using user control in SharePoint 2007 - Part 1

Hi all, 

I attended a Microsoft event last weekend (19 Dec 2009) and Randy Williams demonstrated new development techniques pertaining to SharePoint 2010. There are lot of new innovations such as: 
  • Developer dashboard 
  • Client model (Object Model - OM)
  • SilverLight 
  • Sandboxed Solutions  
  • REST (Representational State Transfer
  • Language Integrated (LINQ) for SharePoint
  • Visual Web Part
Apparently the concept of "Visual Web Part" is not an entirely new in SP 2007. The SmartPart has been used which has drag-drop capabilities. But it has few drawbacks such as it has to be on farm level and after we can use it. 

There is one more technique which I am showing in this post. As we know that writing a web part in the code is ghastly task and particularity when we have to add controls such as drop down, calendar, lists etc. by hand. Adding these controls are succumb to errors and developers have to really troubleshoot on the controls instead on the business logic.     

Following on steps where we have to: 

i) Create a new ASP.NET project
ii) Design the User Control (.aspx) using Visual Studio 2005/2008. 
iii) Copy the User control to the WSS file system. 
iv) Create a WSPBuilder project and wrap the user control. 
v) Deploy Web Part, Activate the feature and add web part on the SharePoint 2007 page. 

Create an ASP.NET project.

Step 1) Fire up Visual Studio, 
File >> New >> Web Site >>

Step 2)  Right click on project >> Add new item >> Web User Control 

NOTE: We should uncheck "Place code in separate file" as the demo we are doing is simple. It's possible to add c sharp as well for complex solutions.

Step 3) Put some text and drag a calendar control. 

Step 4) Build the site. 

Step 5) Copy this WebUserControl.ascx to the "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\CONTROLTEMPLATES"

Create a WSPBuider project

Step 6) Create a WSPBuidler project name: WSPWebPart

Step 7) From the Categories: WSPBuilder; Templates: Web Part Feature

Step 8) Modify this simple code:

protected override void CreateChildControls()
            if (!_error)
                    UserControl userControl;

                    // Your code here...
                    this.Controls.Add(new LiteralControl(this.MyProperty));
                    userControl = (UserControl)this.Page.LoadControl(@"/_controltemplates/WebUserControl.ascx");

                catch (Exception ex)

Step 9) Use WSPBuider menu >> Build WSP >> Deploy

Step 10) Activate the feature 

Step 11) Site Actions >> Edit Page >> 

Step 12)  Add that web part

But, there are few minor issues here: 

i) We have to copy the ASP.NET user control to the WSS file system. If we forget this step, we will surely get an error such as "The file '/_controltemplates/WebUserControl.ascx does not exist."

ii) At times we have to "web.config" trust level from "WSS_Mininal" to "Full". The issue becomes more serious if we have to deploy on the production where we do not have on the production enviorment.

iii) Web Part stays in WSS file system and therefore can not used in a SandBoxed solutions. (concept of SP 2010)

SP 2010 has definitely eased the overall designing the web part and provides a "Visual Web Part"template  which is a part of Visual Studio 2010. 


Download the source

Tuesday, December 22, 2009

SharePoint 2007 BLOBS

Hi All,

As we know that SharePoint 2007 is web-file system. It has particular folder structure, it has files and on top of it, it has site model and an associated API. In the hierarchy, we have lists, folder and we code against them.

The SharePoint product and technology 2007 recommends 100 GB of content database per site collection as the best practice for WSS v3 and MOSS 2007 deployments. SharePoint is based on SQL Server 2003/2008 and studying the database is worth and it always better to optimize our farm.    A very common question arises here??

Q. Why SharePoint 2007 database is restricted to 100 GB?
A.   To explain, firstly we have to understand SharePoint 2007 database.

To dissect this issue, we need to understand SharePoint 3 main databases:

Farm (such as SharePoint_Config):  It has tables like Servers, Globals, Web-Apps, WSP Solutions. Its related Central Administration.

Web App (such as WSS_Content_80): It has tables like Sites, Webs, Workflow, WebParts, Roles, Permissions,  Recycle bin, All Documents, Features, Event Receiver, Lists, Pages etc.

SSP (such as SharedServices): It has tables like Serach (properties), SSP  (My site host config, Profiles, BDC config, Excel Services) etc.

Please refer to a detailed and crisp article on "Understanding on SharePoint database. (by Joel Oleson). 

Let's discuss this in detail: 

1) SharePoint Config: 

Its the soul of the farm. It relates to "Central Administration". All the global settings, WSP solutions, timer jobs and configuration are stored here.  When are doing some updates on Operations tab, we are apparently making changes on config database.
The config db knows all of the server names of the servers in your farm, databases, and it knows the web applications by name.  Even down to the site collection, it keeps track of what site collections are in what databases.

It is to be noted if we have multiple servers, then each server will have one "SharePoint_Config". Moreover, if we have a single sever configuration, then we will have just ONE "SharePoint_Config" 

2) Content Database:

This is most important database which we have to focus for this post. All the documents which we upload through SharePoint UI are stored in content database. There are lot of information with respect to the meta data, content types, other tables including context information like webs and sites. For our discussions with respect to is a table called: "AllDocStreams" which has all BLOBS and "AllDocs".

All the documents and files which are uploaded or attached sits on "AllDocStreams" table. Few others points to noticed:

>> This table is the one which stores ALL documents and files.
>> One of the column, "Content" store document.
>> "Content column" is of "Binary (image)" format.

We can also observe that there are few important columns such as:
>> ID           -  The document identifier of the document.
>> SiteID     - The Site Collection Identifier of the site collection containing the document.
>> Size       - The size of the document stream, in bytes. For a ghosted (or uncustomized) document, this can be NULL.

Its quite essential to understand that WSS file system has to 2 main tables namely:
  1. AllDocs - A file system itself. 
  2. AllDocsStream - Binary of uploaded files. 
“Customized” or “Unghosted” pages are saved into WSS File System instead of hard drive. This document shows the way of how to return them back to the physical disk.

So,we have observed that SharePoint database has table which stores all the documents which uses uploads into SharePoint UI and that table is "AllDocsStream".

What is a BLOB? 
A BLOB differs from regular database data in that it is not forced into a certain structure. A large proportion of data files are represented as unstructured binary files—that is, binary large object (BLOB) data files.

However, a large proportion of data in a typical enterprise deployment of Windows SharePoint Services (WSS) is stored as unstructured, binary data streams (BLOBS) associated with SharePoint files. These binary streams, or BLOBs, which correspond with SharePoint files, often comprise a majority of your data.

In short, BLOBs are Binary Large OBjects – a container of unstructured bytes of data. Particularly, when users search for a document they do not look for a document as a whole but for a category or a particular column i.e. querying the  from the database.

SharePoint data that is not meta-data (documents – most other list items are completely meta-data) is stored in BLOBs in SQL databases.  BLOBs typically account for 60-70% of all content storage.  Most SharePoint operations act against the meta-data, not the BLOB data – until you go to click on the link and open the document.

We have a rough knowledge of BLOBs, they just are unstructured data and users really do not query the whole document but they look of some kind of categories or tagging.

Problems with BLOBS when content database reaches 100+ GB 

SharePoint has a strength in the document management and cross-team collaborations i.e. Enterprise Content Management (ECM) solutions. When it comes to large scale ECM solutions, SharePoint lacks on this area.

I have read a beautiful article by "Michael Nemtsev" and he details about large scale ECM solutions.

A small snippet of his article:

Requirement 1: Large ECM scenarios can require to store millions documents in the single folder or document repository, including deep, nested folding structure to accommodate all of the organization’s documents.
Issue: SharePoint 2007 has limitation of sub-folders support, number of documents stored in list libraries, crawling limitations and etc
- SharePoint 2010 solves such issues, and you can store millions items in folders and sub folders without impact on querying data, rendering and search

As he argues that SharePoint 2010 solves this. I have to still create an environment to simulate set up.

Apparently, when we have large ECM and content database swells to more than 100+ GB, we can choose 3rd party components such as "Documentum" and "Open Text". And following is their strategy:

Typically SharePoint may have multiple content database and each content database is limited to 100 GB database. What these third party components capitalize the fact that content data has 60-70% of the storage volume in these databases is binary large object (BLOB) which is not necessary for queries to the database,  and thereby unload this BLOB content to an external storage device. Using this technique, we amplify the content database and site collection limit to far more than 100 GB (< 400-500 GB).

SQL storage is inherently expensive and more data existing in SQL which performance load there to retrieve it. Particularity, in case for large data sets and their recovery/backup is slow. In SharePoint 2010 comes for the rescue with something called as "RBS (Remote BLOB Storage)".

In SP 2007, we have to rely on the 3rd party complements (EBS (External BLOB Storage)) and they were responsible for both managing external BLOB storage and creating the API libraries to interface with SharePoint. Microsoft still supports but its deperecated.

RBS is fully managed code, can be scoped to individual content databases (instead of at the farm level), can be configured and managed via PowerShell, supports many providers (including third-party), and supports migration both ways.

Check out RBS team blog to get more information.

Concluding this post, SP 2007 could not support large ECM and it relies on extrenal vendors through SharePoint API. In new flavour of SP 2010, they have overcome this issue and RBS team seamlessly interact with SP 2010.


Sky Soft
Michael Nemtsev (ECM solutions)

Monday, December 21, 2009

Community Technology Update (CTU) 2009 Event, Singapore

Hi all,

Community Technology Update (CTU) 2009 event had been held at Microsoft office today (19 Dec 2009). In its 6th incarnation, the event was bigger than before. There were different tracks for the IT professionals:

i) IT Pro - Windows Server 2008 R2
      >> Remote Desktop Services - The technical overview
      >> How to configure CAS array for Exchange 2010
      >> Windows Security Internals
      >> BranchCache (Windows 7 and Windows Server 2008 R2)

ii) Developers track:
     >> What's new in .NET Framework 4.0 (By Justin Lee, Microsoft employee)
     >> Jumpstart Your Team Development with VS2010 and TFS Basic
     >> ronRuby and the Dynamic Language Runtime
     >> Developing "Cloud" Applications with Windows Azure and SQL Azure  

 iii) Special track
     >> Migration from Lotus Notes to Exchange Server
     >> Development on Sharepoint 2010 using VS2010 (By Randy Williams, SharePoint MVP)
     >> Enhancing Sharepoint Web 2.0 with customizations (By Loke Kit Kai, SharePoint MVP)
     >> Turn on your Unified Communications (By Sarbjit Singh Gill, SharePoint MVP)

There were hands-on labs were also there.
The tracks that were bold; were the one which I attended.

So, lets get started.  

9:00 - 9:45 AM - Keynote Session

Welcome address by John Fernandes who is director at Developer and Platform Evangelism Microsoft Singapore. He has been working at Microsoft for 14 years and worked in US, Dubai and Singapore. He is primarily focusing on Singapore and working with developer, IT professional, academic, startup, and venture capital communities. His team leverages software as an enabler to innovation, entrepreneurship, and the next generation, be it students, business models, or technology paradigms.

Microsoft is in forefront when it comes to technical standpoint. It not only provides enterprise solutions and also working at different levels such as:
  •  Conduction competitions as Students level (DreamSpark, Imagine cup)
  •  Working with Startups (BizSpark, Innovation Centers),
  •  Community-based collaboration (RIAaction, Geeks-engaged)
  •  Successful Global business (IDA, MDA, Innovation.Next() etc.)
Next speaker was Matthew Hardman who is Windows client BH lead at Microsoft Singapore. He introduced concept of "The New Wave of Efficiency".   He really understands that in these economic times, we have tremendous pressure on all of us to with less, do more. And "New Efficiency" comes into picture.

Definition: The "New Efficiency" is where: there is cost cutting, get more out of your people and organization (Productivity), capture & create new revenue - unlocking creativity & imagination (innovation): come together through IT to deliver operational improvements while amplifying the impact of your people.

Microsoft has understood the basic needs of the customers/companies and they want to systems should be cost-effective, innovative. The whole concept of "The NEW Efficiency" can be succinctly wrapped: With LESS, do MORE. 

With new suit of Microsoft products particularly Windows 7, Windows Server 2008 R2, Exchange Server 2010 and other products  deliver on the "New Efficiency" target cost-savings, productivity and innovations come together. The new efficiency has built for Enterprise.

Lets consider a case study.  

----------------------------------START ----------------------

Consider we have a business traveler (John) who travels from New York City to San Francisco and he about to board his flight in few minutes. The meetings is for corporate financial earnings. He just switch on his laptop to hits his "Outlook Web App" to check his emails using Windows 7.

"Outlook Web App" is a part of Microsoft Exchange Server 2010. Exchange Server 2010 and Outlook Web App deliver a rich, familiar Web e-mail experience, so your users can work and collaborate more effectively wherever they are. Users can access e-mail, voice mail, instant messaging, SMS text messages, and more—all in one place and through all major Web browsers.

Now, he check an email from his colleague (Ben) who is working on corporate financial earnings. Apparently, the email is in restricted way which means he can not forward or reply to this email. This happens automatically as corporate compliance team filters few phrases like financial earnings in the email subject and potential sensitive for an organization. The compliance team works with IT team to implement Exchange IRM rules. These rules automatically scans an individual or groups and restrict if subject has a potential sensitive information.

Apparently, Ben forgot to attach financial earnings for one of small division and he has already on vacation. Exchange server 2010 has a new feature which is instant messaging integration and John is looking for a colleague who worked on financial earnings. John send an instant message to his colleague. This colleague sends a link to SharePoint 2010 site which is hosted on the intranet. The site opens and John downloads the excel sheet to his laptop.

What is outstanding here is John is able to connect to the site WITHOUT using VPN. This is possible is because Window 7 uses a new feature called as "DirectAccess." Direct access  give mobile users seamless access to corporate networks without a need to VPN. DirectAccess in Windows 7 and Windows Server 2008 R2 enhances the productivity of mobile workers by connecting them seamlessly and more securely to their corporate network any time they have Internet access—without the need to VPN.

John can look into this excel sheet and compare to his final draft, span in/out using Windows 7 and he is done. John then copies that file to USB drive. Using Windows 7, we can encrypt using "BitLocker Drive Encryption and when someone want to use a USB drive, he has to enter a password before can copy files to it. Its an added functionality. And this is called New Efficiency. 

------------------------------------------------END ----------------------------------------- 

For more information on this topic, with truck loads of videos, presentations, slides etc.:

10:00 - 11:15 am - What's new in .NET Framework 4.0 (by Justin Lee)

Client Profile: 

It's a huge release from Microsoft and they included lot of "Best Practices". When we download 3.0 or 3.5 framework, the download size is around 150-200 MB .NET Framework 4.0 has come up with something called as "Client Profile". Its a strip down  version and size is dramatically reduced to 35 MB.  If we download .NET Framework 4.0 client profile and on your PC/Workstation does not have a .NET Framework 4.0 then it will automatically download the framework. 

In the "Client Profile" may have lesser classes. 

Demo 1: Create a New project >> Choose NET Framework 4.0 >> Project name: CTUDemo1

Right click on solution >> Properties >> Target Framework: .NET Framework 4.0 Client Profile. Also note that it has an option .NET Framework 4.0 which is the full framework. 

Code Contracts: 

Code Contracts will be part of the base class library in .NET 4.0 (included in mscorlib), and facilitate a Design by Contract programming approach. You can describe pre-conditions, post-conditions, and object invariants.  Its associated the "Best Practices" as well. 

Namespace required: using System.Diagnostics.Contracts.Class

.NET framework 3.5 also uses contract.

It is not enabled by default. 

We have to go to Solution Explorer >> Right click >> Properties >> Under Code Analysis we can see there is one more tab called "Code Contracts" 

Under "Runtime Checking" section, check the "Perform Runtime Contract Checking" and under "Static Checking" section, check the "Perform Static Contract Checking"


Parallel Extensions 

This feature is capable to capitalize full use of resources and enhance the applications.
Namespace required: using System.Threading.Tasks

It actually application's performance astoundingly.
NOTE: There is a video on Channel9 on parallel extensions.  

Managed Extensibility Framework (MEF): 

The Managed Extensibility Framework (MEF) is a new library in .NET Framework 4.0 that addresses this problem by simplifying the design of extensible applications and components.
If you are building extensible applications, extensible frameworks and application extensions, then MEF is for you. 

VS 2010 uses MEF. Its used to create plug ins on the fly.  

Dynamic Language Run time (DLR)

DLR (Dynamic language runtime) is set of services which add dynamic programming capability to CLR. DLR makes dynamic languages like LISP, Javascript, PHP,Ruby, IronPython to run on .NET framework.

There are two types of languages statically typed languages and dynamically typed languages. In statically typed languages you need to specify the object during design time / compile time. Dynamically typed languages can identify the object during runtime. .NET . DLR helps you to host code written in dynamic languages on top of your CLR.


Due to DLR runtime, dynamic languages like ruby, python, JavaScript etc can integrate and run seamlessly with CLR. DLR thus helps to build the best experience for your favorite dynamic language. Your code becomes much cleaner and seamless while integrating with the dynamic languages.



Reactive Framework (Rx):

Rx is a library for composing asynchronous and event-based programs using observable collections. Its opposite of IEnumerable.

The new .NET 4.0 interfaces IObservable<T> and IObserver<T>.  These are the mathematical dual of the familiar IEnumerable<T> and IEnumerator<T> interfaces for pull-based, enumerable collections in the .NET framework.

Namespaces: using System.Reactive, using System.Interactive
Reference: Msdn 

New to .NET Framework 4:

There are other new types which .NET FX 4 has added:

i) BigInteger:

New namespace System.Numerics contains class called BigInteger. You can use objects based on this class as usual integers. This class also provides static methods for different mathematical operations on big integers.

ii) Tuples:

Tuples are strongly typed and immutable such as strings. Tuples are commonly used on functional programming. A common example is to use them when a method needs to return more than one value, for example a method that returns a point in a grid can return this point as a set of x,y coordinates in a Tuple.

iii) SortedSet:

SortedSet<T> collection type, which implements red-black sorting algorithm with complexity O(log n) for the entire list. Its of the developers on the Numerical Analysis.

iv) Complex Numbers:

.Net Framework 4.0 Beta 2 introduces new class in System.Numerics namespace: Complex. Complex represents complex numbers and enables different arithmetic operations with complex numbers.

There are some other methods and fields are introduced in .NET 4.0
>> Guid.TryParse()
>> Version.TryParse()
>> Enum.TryParse<T>
>> Enum.HasFlag
>> string.concentrate(IEnumerable <T> x)
>> string.Join(IEnumerable <T> x)
>> string.IsNullOrWhiteSpace


11:30 AM - 12:45 pm - Development om SharePoint using VS2010 (by Randy Williams, SharePoint MVP)

NOTE: Randy also attended .Net framework 4.0 and in SP 2010 session, he highlighted that SP 2010 will not be using .NET framework 4.0 but .NET framework 3.5.

Developer Dashboard:  

The developer dashboard is a new feature in SharePoint 2010 that is design to provide additional performance and tracing information that can be used to debug and troubleshoot issues with page rendering time.  The dashboard is turned off by default, but can be enabled via the object model or stsadm (and PowerShell too, I just haven’t put together the script for it yet).  When the dashboard is turned on you will find information about the controls, queries and execution time that occur as part of the page rendering process; this information appears at the bottom of the page. 

It has an object called as "SPDeveloperDashboard" which has On/Off functionality.  When its enabled, we can get information for all the pages including: 
>> Web Server
>> Execution time
>> Current user
>> All web parts for that page and corresponding execution time for each web part. 
>> Database Queries

It can been seen at the top right corner. 
Its not related to Central Administration. 

Sand boxed Solutions:

A new feature in SharePoint 2010, called sand boxed solutions, addresses many of these concerns, enabling farm administrators to feel comfortable that the SharePoint farm is safe, giving site collection administrators the authority to manage the applications in their site collection, and providing developers with the flexibility to create solutions they know will be deployed in a safe and rapid manner.

SharePoint 2010 provide a framework for safe and rapid deployment of solutions.

NOTE: Sahil Malik has published a great series of blog posts on sandbox solutions in SharePoint 2010.  They can be found on his site.

Demo 1: Create a visual web part 

One of the features of the Visual Studio 2010 when developing on SharePoint 2010 is the ability to more easily create web parts that use the familiar drag-n-drop experience from the toolbox.  That is, instead of having to hand-write all of the code in your CreateChildControls method, you format and layout your controls using the design view.
The way this works is by wrapping the web user control (.ascx page) within a web part.  Actually, this idea isn’t all that new.  It’s something that we could do in VS 2005/2008 and that last version of SharePoint as well.  This is why SmartPart because such a useful utility.  

Randy introduced the new "SharePoint Explorer" with VS 2010.SharePoint Explorer gives a logical view with farm as root, then comes web-application, sites, webs, lists, list items and even fields. 

Question:  Is it similar to SharePoint manager 2007??
Randy: Yes, but SharePoint Explorer is read only where as SharePoint manager, we can delete web, sites, web-applications and even SharePoint Config. 

He created a new SharePoint empty project, created a visual web part, deploy as farm solution, drag/drop two controls date-time text box, task title as text box, button and add an event handler 

SPWeb web = SPContext.Current.Web;
SPList tasks = web.Lists["Tasks"];
SPListItem newTask = tasks.Items.Add();
newTask["Due Date"] = DateTimeControl1.SelectedDate;
newTask["Title"] = TextBox1.Text;
Label1.Text = "Task created";

The best part this version of SP 2010 has F5 functionality. When you are done designing the web part, you can hit the F5 button. SharePoint 2010 will Build, Deploy and Activate the feature automatically.   

This demo can be found here.

Question:  Does this visual web part supports web part connections. 
Randy: Yes, it DOES. 

Demo 2: Using REST (Representational State Transfer) in SharePoint 2010

REST (or Representational State Transfer) is an easy way to easily get or post items to a server-side web service.  It is used in situations where you would use a web service but do not want the overhead and tightly-coupled nature of SOAP. With REST, it’s just a simple, client-server-like request using HTTP to retrieve or send information.  Technically, REST is not a protocol, but an architectural style.

SharePoint 2010, being based on WCF in the .NET 3.5 Framework, has built-in RESTful web services which allow us to take advantage of this simplicity in custom applications we write.  It is one of the many data access mechanisms used in SharePoint 2010 development.  REST is intended for remote applications (i.e. not running physically on the SharePoint server) that need basic read/write capabilities to SharePoint’s list and library data.

>> Created a Windows form, named CTURest. 
>> Added data source >> Choose SharePoint 
>> Add Service Reference dialog, add the Url to a SharePoint 2010 web site.  
>> SharePoint data source, you do not need to specify the _vti_bin/listdata.svc.
>> We can drag/drop data connections. 

This demo can be found here.

Question: What technology REST is using? 
Randy: Neither CAML nor web-services. Its using WCF 

Demo 3: Developing a Silverlight 3.0 Web part for SharePoint 2010

This demo can be found here

Demo 4:  Using SPLinq in SharePoint 2010

This demo can be found here.  

Some other questions which I asked Randy: 

Question:  SharePoint 2010 team is using XSLT and CAML will not be used at all?

Randy: Not really. Basically, CAML will be still used extensively for features, fields, queries etc. XSLT is for the Views. 

Question: What about STSADM and PowerShell? 
Randy: Yes,  developers should use to PowerShell instead of STSADM. in SP 2010. There are some additional commands are added in PowerShell as well as in STSADM. We can use STSADM but PowerShell is much more powerful.

Question: As we know that Microsoft recommends to use 100 GB for content database in SP 2007. What has changed in SP 2010 with respect to database schema? I have read lot of articles that they have drastically changed the database schema and we can have 5000 list items in a list. Can you please shed some light on this aspect.

Randy: Yes, there are changes to database schema but not drastically. Even we can have content database till 200-350 GB in SP 2007. Problem becomes when we want to take recovery or take a back. In SP 2010, they have extended the limit. But I am not sure the limit and they have not announced it yet.

Question: Microsoft says that developers can install SP 2010 on Windows 7. But i have read some articles where MVPs suggest not to install on Windows 7. What do you think on this? 
Randy:  There is not an issue here. In fact, I always install on Windows 7 on top of SP 2010. There are few minor issues but it works okay.

1:45 - 3:00 pm - Enhancing SharePoint 2010, Social Experience (by Loke Kit Kai, SharePoint MVP)

Kit Kai showed how to enhance the discussion board with new features

>> Challenge the answer ( or reply as answer) 
When a question is asked by a user A, then other users in the site can answer his doubt or clarification etc. They can they click on the like "Challenge the answer". The exception is here that user A can not "Challenge the answer". 

The demo was very fast I could not take notes.

Kit Kai also told to the audience that rating documents and pictures, enhanced wiki and blogs, forums have be added to SharePoint 2010 as out-of-the-box features.

3:15 - 4:30 pm - Turn on the your Unified Communications Systems (by Sabarjit Singh Gill, SharePoint MVP)

The talk was very interactive and Sabarjit talked of video/audio capabilities of UCS etc. 


After all the demos and talks followed the closing session and the lucky draw. 
I got a SilverLight 2 book! :) 

The CTU session was amazingly useful. Got inside information of the new Microsoft's upcoming products range. I was also established few contacts with SharePoint MVPs. 



    How to: Use cascading drop-down lists in PowerApps

    Hi all, Using cascading dropdown, users can easily fill the forms by selecting drop-down values dependent on values from another dro...