Blog of Sundar Narasiman

Windows 8 free e-Book

clip_image002

Get a headstart evaluating Window 8—guided by a Windows expert who’s worked extensively with the software since the preview releases. Based on final, release-to-manufacturing (RTM) software, this book introduces new features and capabilities, with scenario-based insights demonstrating how to plan for, implement, and maintain Windows 8 in an enterprise environment. Get the high-level information you need to begin preparing your deployment now.

Topics include:

• Performance, reliability, and security features

• Deployment options

• Windows Assessment and Deployment Kit

• Windows PowerShell™ 3.0 and Group Policy

• Managing and sideloading apps

• Internet Explorer® 10

• Virtualization, Client Hyper-V, and Microsoft Desktop Optimization Pack

• Recovery features

Get this ebook now

How to add GeoLocation fields to SharePoint 2013 Site

SharePoint 2013 has one of the new capability that supports GeoLocation fields. The GeoLocation field helps us to build location- aware SharePoint 2013 applications. To keep it simple, SharePoint 2013 lists support a new column of type ‘Location’. where we can set or retrieve the latitude and longitude co-ordinates of a place in decimal. By default this Location column is not available to us.

The pre-requisite to enable this Location column is to install an msi package called SQLSysClrTypes.msi on every front-end server of SharePoint 2013 Farm. The SQLSysClrTypes.msi installer is available in the Microsoft SQL 2008 R2 SP1 Feature Pack

http://www.microsoft.com/en-us/download/details.aspx?id=26728

This installer is responsible for implementing geometry, geography and hierarchy ID types in SQL Server 2008. I’m going to use my Office 365 dev tenant for this demonstration, where this installer is already installed (by default available in SP Online).There are multiple ways of adding the Location columns. Here i would be leveraging the SharePoint 2013 Client Object Model to create location columns.

Uri oUri = new Uri("https://yourtenant.sharepoint.com");

MsOnlineClaimsHelper claimsHelper = new MsOnlineClaimsHelper(oUri, "yourid@yourtenant.onmicrosoft.com", "yourpassword");


using (ClientContext context = new ClientContext(oUri))
   {
     context.ExecutingWebRequest += claimsHelper.clientContext_ExecutingWebRequest;

     List oList = context.Web.Lists.GetByTitle("TestList");
     oList.Fields.AddFieldAsXml("<Field Type='Geolocation' DisplayName='VistingLocation'/>", true,
                                    AddFieldOptions.AddToAllContentTypes);
     oList.Update();
     context.ExecuteQuery();
                    

    }
when the above code is executed it creates the location column in the custom list.
pic2

I tried to create more than 2 location columns in the list, it threw an error like “There are too many columns of the specified data type. Please delete some other columns first. Note that some column types like numbers and currency use the same data type.”. I’ve learned that at this point of time, the a SP 2013 lists does not support more than 2 Location columns.

The next step is to add the desired locations to the list items. For the sake of demo, i will add the locations manually.

lat lon

 

Basically you need to know the latitude and longitude of a place to be added to the GeoLocation field.

It does not give a good user experience to view the locations in the latitude and longitude format. SharePoint 2013 provides map- view functionality of Lists which has GeoLocation fields associated with it. To enable MapView, the Microsoft Bing Map keys need to be registered with the respective SharePoint 2013 tenant. Here is the code snippet for registering Bing Map key with SharePoint 2013 instance.

Uri oUri = new Uri("yoursharepointurl");

 MsOnlineClaimsHelper claimsHelper = new MsOnlineClaimsHelper(oUri, "yourid", "yourpassword");

   using (ClientContext context = new ClientContext(oUri))
            {
                context.ExecutingWebRequest += claimsHelper.clientContext_ExecutingWebRequest;
                 Web web = context.Web;
                 web.AllProperties["BING_MAPS_KEY"] = "ArJrGcrUw_rcR65nsyG7Ahm1VkhOOt6h0eIdd7ai_g0ykyJsIPSfkfwmW_MwcPdr";
                web.Update();
                context.ExecuteQuery();
                              
            }
Create View –> Map View
Create View[4]
CreateView1
 

MapView1

Now you can see the location field data rendered in the Map View format.

 Subscribe to my blog

Manipulate Taxonomy objects using SharePoint 2013 Client Object Model

SharePoint 2013 Client Object model has the capability to manipulate (Create/Read/Update/Delete) Taxonomy objects like TermGroup, TermSets and Terms etc.This is one of major improvement in SharePoint 2013. The objective of this post is to setup a sample Taxonomy and manipulate it using SharePoint 2013 Client Object Model.

For the purpose of the demonstration, i’m using my development tenant in Office 365 preview site

My dev tenant url is https://smartguru.sharepoint.com. You can sign-up for you own Office 365 preview site here

Pic1[4]

I’ve already created a Taxonomy group called ‘Pharma Taxonomies’ with the termsets like Cardiology, Opthalmalogy and Paediatrics.  I’ll be leveraging the Client Object Model of SharePoint 2013 to add terms under under these Term Sets.

I’ve created a C# windows application having set of textboxes to acquire the values for TermSets and Terms.

pic2

Performing active authentication to Office 365 and SharePoint Online

When the code-behind of the above form tries to access Office 365 developer preview site, it will not get the ClientContext by default. We need to perform active authentication to SharePoint online in Office 365. My fellow MVP Wictor Wilen wrote an excellent blog post on How to do active authentication to Office 365 and SharePoint Online. I’d be leveraging the logic provided  in this post and also the Code Snippet to complete the active authentication and get the ClientContext of my Office 365 developer preview site.

 

I’d be posting the code-behind of the above windows form in a short while. The logic inside this form is simple, i delete the TermSets (if it exists already), create the TermSets programmatically and create appropriate Terms under the TermSets.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Microsoft.SharePoint.Client;
using Microsoft.SharePoint.Client.Taxonomy;
using Microsoft.SharePoint.Client.Publishing.Navigation;
using System.Net;
using System.Security;
using System.Globalization;


namespace TaxonomyClientSideOM
{
    public partial class Form1 : System.Windows.Forms.Form
    {
        public Form1()
        {
            InitializeComponent();

            textBox1.Text = "Pharma Term Group";
            
            textBox2.Text = "Opthalamalogy";
            textBox6.Text = "Cardiology";
            textBox10.Text = "Pediatrics";

            textBox3.Text = "ContactLens";
            textBox4.Text = "LasikSurgery";
            textBox5.Text = "Cataract";

            textBox9.Text = "CalciumChannelBlockers";
            textBox8.Text = "BetaBlockers";
            textBox7.Text = "Amlodipine";

            textBox13.Text = "PneumoCoccal";
            textBox12.Text = "Dpt";
            textBox11.Text = "Typhoid";
           
        }
     

        private static void SetPropertiesforTermSets(TermSet termSet1, string Description)
        {
            termSet1.IsAvailableForTagging = true;
            termSet1.Description = Description;
            termSet1.Owner = "lavsunswe@smartguru.onmicrosoft.com";
        }

        private static void DeleteTermSets(ClientContext context, TermStore termStore, string sGuid)
        {
            TermSet existingTermSet;

            // Handles an error that occurs if the return value is null.
            ExceptionHandlingScope exceptionScope = new ExceptionHandlingScope(context);
            using (exceptionScope.StartScope())
            {
                using (exceptionScope.StartTry())
                {
                    existingTermSet = termStore.GetTermSet(new Guid(sGuid));

                }
                using (exceptionScope.StartCatch())
                {
                }
            }
            context.ExecuteQuery();

            if (!existingTermSet.ServerObjectIsNull.Value)
            {
                MessageBox.Show(" Deleting old TermSet");
                existingTermSet.DeleteObject();
                termStore.CommitAll();
                context.ExecuteQuery();

                MessageBox.Show("Deleted Old Term Set");
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Uri oUri = new Uri("https://smartguru.sharepoint.com");

            Office365ClaimsHelper claimsHelper = new Office365ClaimsHelper(oUri, "youruserid", "yourpassword");
                        using (ClientContext context = new ClientContext(oUri))
            {
                context.ExecutingWebRequest += claimsHelper.clientContext_ExecutingWebRequest;

                TaxonomySession taxonomySession = TaxonomySession.GetTaxonomySession(context);
                taxonomySession.UpdateCache();

                context.Load(taxonomySession, ts => ts.TermStores);
                context.ExecuteQuery();

                if (taxonomySession.TermStores.Count == 0)
                    throw new InvalidOperationException("The Taxonomy Service is offline or missing");

                TermStore termStore = taxonomySession.TermStores[0];
                context.Load(termStore,
                ts => ts.Name,
                ts => ts.WorkingLanguage);


                //Delete Opthalamalogy Term Set if already existing
                DeleteTermSets(context, termStore, "DB5FAD84-8868-433A-A18A-79B214F8DA00");

                //Delete Cardiology TermSet if already existing
                DeleteTermSets(context, termStore, "4D5493E6-FF8F-4CDF-931B-965920A7789D");

                //Delete Pediatrics if already existing
                DeleteTermSets(context, termStore, "34CE7966-17E3-404C-ADBF-7B267A319F59");


                //Fetch the Pharma Term Group if already existing
                TermGroup siteCollectionGroup = termStore.GetGroup(new Guid("5c041ce0-f499-47f2-bff1-28f01b743bad"));

                CreateTermSets(termStore, siteCollectionGroup, context);
                                
                 termStore.CommitAll();
                context.ExecuteQuery();

                MessageBox.Show("Success");
                               
            }          


        }

        private void CreateTermSets(TermStore termStore, TermGroup siteCollectionGroup, ClientContext context)
        {
            TermSet termSet1 = siteCollectionGroup.CreateTermSet(textBox2.Text, new Guid("DB5FAD84-8868-433A-A18A-79B214F8DA00"),
         termStore.WorkingLanguage);
            SetPropertiesforTermSets(termSet1, "This is " + textBox2.Text + "termset");
            CreateNewTerms(termStore, termSet1, textBox3.Text, "5BDD72EF-822C-4E79-A1E6-0D838E68ADE7");
            CreateNewTerms(termStore, termSet1, textBox4.Text, "4BDBC3B5-0BA5-4049-BB07-DAFA119799C9");
            CreateNewTerms(termStore, termSet1, textBox5.Text, "D70E624A-DD03-4E5C-B946-B40EFD4EAEEC");

            TermSet termSet2 = siteCollectionGroup.CreateTermSet(textBox6.Text, new Guid("4D5493E6-FF8F-4CDF-931B-965920A7789D"),
        termStore.WorkingLanguage);
            SetPropertiesforTermSets(termSet2, "This is " + textBox6.Text + "termset");

            CreateNavigationTermSet(context, termSet2, "http://en.wikipedia.org/wiki/Beta_blocker", textBox9.Text);
            CreateNavigationTermSet(context, termSet2, "http://en.wikipedia.org/wiki/Calcium_channel_blocker", textBox8.Text);
            CreateNavigationTermSet(context, termSet2, "http://en.wikipedia.org/wiki/Amlodipine", textBox7.Text);

            TermSet termSet3 = siteCollectionGroup.CreateTermSet(textBox10.Text, new Guid("34CE7966-17E3-404C-ADBF-7B267A319F59"),
        termStore.WorkingLanguage);
            SetPropertiesforTermSets(termSet3, "This is " + textBox10.Text + "termset");
            CreateNewTerms(termStore, termSet3, textBox13.Text, "7B65ED31-25D4-4697-9B63-497411F358A5");
            CreateNewTerms(termStore, termSet3, textBox12.Text, "48A33AEE-85D1-4AC7-B413-69E580058F8D");
            CreateNewTerms(termStore, termSet3, textBox11.Text, "715EA04A-B547-46B8-84BE-D0BEB663FB36");
        }

        private void CreateNavigationTermSet(ClientContext context, TermSet termSet2, string navurl, string termname)
        {
            NavigationTermSet navTermSet = NavigationTermSet.GetAsResolvedByWeb(context,
                termSet2, context.Web, "GlobalNavigationTaxonomyProvider");

            navTermSet.IsNavigationTermSet = true;
            navTermSet.TargetUrlForChildTerms.Value = "~site/Pages/Topics.aspx";

            NavigationTerm navterm = navTermSet.CreateTerm(termname, NavigationLinkType.SimpleLink, Guid.NewGuid());
            navterm.SimpleLinkUrl = navurl;



        }

        private static void CreateNewTerms(TermStore termStore, TermSet oTermSet, string termname, string guidstring)
        {
            Term oTerm = oTermSet.CreateTerm(termname, termStore.WorkingLanguage, new Guid(guidstring));
            oTerm.Owner = "abc@smartguru.onmicrosoft.com";
            oTerm.IsAvailableForTagging = true;

        }       

    }
}

To compile the above code, you need reference to the following assemblies.

Microsoft.SharePoint.Client.dll

Microsoft.SharePoint.Client.Runtime.dll

Microsoft.SharePoint.Client.Publishing.dll

Microsoft.SharePoint.Client.Taxonomy.dll

System.ServiceModel.dll

To keep the demonstration simple, i leave the default values for the textboxes in the above form and hit ‘Create Termsets and Terms’ button. It creates the following taxonomy terms in my Office 365 preview taxonomy store.

pic4

The entire source code is available for download in SkyDrive

 Subscribe to my blog

Work break-down structure to manage SP 2010 to SP 2013 Upgrade

For quite sometime, I thought of writing a non-technical post around SharePoint. This is a non-technical post which would focus on the list of tasks that need to be considered while planning or estimating a typical SP 2010 to SP 2013 upgrade using database detach-attach approach.

S No Phase Name Task Name (SP 2010 to SP 2013) Environment Role
1 Initiation Project Initiation    
    Statement of Work (SOW) Preparation N/A Dev Team
    Review & Sign off of Statement of Work (SOW) N/A Customer
    Identifying Project Stake Holders & Scheduling Project Meetings N/A Dev Team
    Procure Environment Access to Team Members N/A Dev Team
    Software Project Plan Preparation & Allied Documents N/A Dev Team
    Microsoft Project Plan N/A Dev Team
    Project Kick off N/A All Stake holders
         
2 Requirements Requirements Gathering & Analysis    
    Tool Based Requirements Gathering (Run MS Pre-Upgrade check tool) SP 2010 Dev Team
    Manual Requirements Gathering SP 2010 SharePoint Admin
    Requirements Analysis (Identify Functional Gaps & Deltas) SP 2010 Dev Team
    Analyze and remove any un-used feature/Site in existing environment  (Orphaned Objects) SP 2010 SharePoint Admin
    Site Grouping by Complexity/Functionality/Templates    
    Create list of customizations, Settings which needs manual move  SP 2010 SharePoint Admin
    Preparation of Functional Requirement Specification (FRS) SP 2010 Dev Team
    Review & Sign off of Functional Requirement Specification (FRS) SP 2010 Customer
    Review Software Availability SP 2010 SharePoint Admin
    Review Available Hardware SP 2010 SharePoint Admin
    Obtain and verify Service accounts, DNS Entries, URLs  SP 2010 SharePoint Admin
    Preparation of Test Strategy/Plan SP 2010 Test Team
    Review of Test Strategy/Plan SP 2010 Customer/Business
         
3 Design Design    
    Strategy for Migrating SP 2010 User Profiles to SP 2013 SP 2013 Dev Dev Team
    Strategy for Migrating SP 2010 My Sites to SP 2013 SP 2013 Dev Dev Team
    Strategy for Migrating SP 2010 Search to SP 2013 SP 2013 Dev Dev Team
    Strategy for Migrating SP 2010 InfoPath Form Services to SP 2013 SP 2013 Dev Dev Team
    Strategy for Migrating SP 2010 Excel Services to SP 2013 SP 2013 Dev Dev Team
    Strategy for Migrating SP 2010 Business Data Catalog to SP 2013 SP 2013 Dev Dev Team
    Strategy for retaining  Single Sign on in SP 2013 SP 2013 Dev Dev Team
    Strategy for Migrating SP 2010 Parent – Child Forms  to SP 2013 SP 2013 Dev Dev Team
    Strategy for Migrating 3rd Party Components of SP 2010 SP 2013 Dev Dev Team
    Strategy for Retaining external integration after migrations in SP 2013 SP 2013 Dev Dev Team
    Architecture & Solution Approach Design (HLD) SP 2013 Dev SharePoint Admin
    Identify and Prepare Architectural, Topology Diagrams  SP 2013 Dev SharePoint Admin
    Design Documentation (Low level design) SP 2013 Dev SharePoint Admin
    Finalize Code Promotion Strategy SP 2013 Dev Dev Team
    Finalize Change Management Strategy SP 2013 Dev Dev Team
    Validate existing IA& Governance SP 2013 Dev SharePoint Admin
    Review & Sign off of HLD & LLD SP 2013 Dev Customer
    Prepartion Test Scripts for QA SP 2013 Dev Test Team
    Review & Sign off of Test Scripts for QA SP 2013 Dev Customer
    Proof Of Concept for Migration SP 2013 Dev Dev Team
    Update MicrosoftProject Plan SP 2013 Dev Dev Team
         
4 Pre-Migrate SP 2013 Development Environment Setup    
    Resolve and Clean the Pre-upgrade checker reported issues  SP 2010 SharePoint Admin
    Install necessary server roles SP 2013 Dev SharePoint Admin
    Configure IIS, .NET Framework 4.5 SP 2013 Dev SharePoint Admin
    Install and configure IIS compression  SP 2013 Dev SharePoint Admin
    Configure Log file location & Tweak the IIS Settings for SharePoint  SP 2013 Dev SharePoint Admin
    Assign roles to the Machines SharePoint Admin & Infrastructure Team  SP 2013 Dev SharePoint Admin
    Install SQL Server  2012 and Establish Clustering & Mirroring  SP 2013 Dev SharePoint Admin
    Install SharePoint Binaries on the target machines  SP 2013 Dev SharePoint Admin 
    Install Language packs SP 2013 Dev SharePoint Admin
         
5 Pre-Migrate SP 2013 Development Environment Basic Configuration     
    Run SP 2013Configuration Wizard  SP 2013 Dev SharePoint Admin
    Create Web Application for Portal, Search etc. SP 2013 Dev SharePoint Admin
    Setup SharePoint Configuration Settings (Farm, Web App Settings, Etc)  SP 2013 Dev SharePoint Admin
    Configure Recycle Bin retention and Site Delete Confirmation  SP 2013 Dev  SharePoint Admin 
    Site Templates, Quotas, General Settings, Incoming-Outgoing Mail setups  SP 2013 Dev SharePoint Admin
    Configure Usage Analysis  SP 2013 Dev SharePoint Admin 
         
6 Pre-Migrate  SP 2013 Development Environment Service Applications Configuration    
    Configure 2010 Access Database Service in SP 2013  SP 2013 Dev SharePoint Admin
    Configure SP 2013 Access Services    SP 2013 Dev SharePoint Admin
    Configure SP 2013 App Management Service    SP 2013 Dev SharePoint Admin 
    Configure SP 2013 Business Data Connectivity Service    SP 2013 Dev SharePoint Admin 
    Configure SP 2013 Claims to Windows Token Service    SP 2013 Dev SharePoint Admin
    Configure SP 2013 Distributed Cache    SP 2013 Dev SharePoint Admin
    Configure SP 2013 Excel Calculation Services    SP 2013 Dev SharePoint Admin
    Configure SP 2013 Machine Translation Service    SP 2013 Dev SharePoint Admin
    Configure SP 2013 Managed Metadata Web Service    SP 2013 Dev SharePoint Admin
    Configure SP 2013 SP Foundation Sandboxed Code Service    SP 2013 Dev SharePoint Admin
    Configure SP 2013 PerformancePoint Service    SP 2013 Dev SharePoint Admin
    Configure SP 2013 PowerPoint Conversion Service    SP 2013 Dev SharePoint Admin
    Configure SP 2013 Secure Store Service    SP 2013 Dev SharePoint Admin
    Configure SP 2013 SharePoint Server Search    SP 2013 Dev SharePoint Admin
    Configure SP 2013 User Profile Service    SP 2013 Dev SharePoint Admin
    Configure SP 2013 User Profile Synchronization Service    SP 2013 Dev SharePoint Admin
    Configure SP 2013 Visio Graphics Service    SP 2013 Dev SharePoint Admin
    Configure SP 2013 Word Automation Services    SP 2013 Dev SharePoint Admin 
    Configure SP 2013 Work Management Service    SP 2013 Dev SharePoint Admin 
    Configure SP 2013 Visio Graphics Services   SP 2013 Dev SharePoint Admin 
    Configure SP 2013 Word Automation Services  SP 2013 Dev SharePoint Admin 
    Install and configure Office Web Apps  SP 2013 Dev SharePoint Admin 
    Install Third-Party applications (if needed … ) SP 2013 Dev SharePoint Admin
    Load Balancing  the SharePoint Sites  SP 2013 Dev Infrastructure Team & SharePoint
    Publishing (ISA/F5) the SharePoint Sites  SP 2013 Dev Infrastructure Team & SharePoint
         
7 Migrate SP 2013 Development Environment My Site & User Profiles Configuration     
    Create My Site web application SharePoint Admin & Infrastructure Team  SP 2013 Dev SharePoint Admin 
    Configure User Profiles  SP 2013 Dev SharePoint Admin 
    Configure Import fields from AD & Profile Import schedules  SP 2013 Dev SharePoint Admin & Infrastructure Team 
    Configure Audiences  SP 2013 Dev SharePoint Admin 
    Configure Kerberos Authentication (if needed …) SP 2013 Dev SharePoint Admin & Infrastructure Team 
    Configure SSL SharePoint Admin (if needed) SP 2013 Dev SharePoint Admin 
    Install Infrastructure Updates SP 2013 Dev SharePoint Admin 
         
8 Migrate SP 2013 Development Environment Search Configuration    
    Configure Content Sources  SP 2013 Dev Dev Team
    Create the Crawl Schedules SP 2013 Dev SharePoint Admin 
    Configure Best Bets and Keywords for Search  SP 2013 Dev Dev Team
    Configure Search Scopes  SP 2013 Dev Dev Team
    Establish and implement search monitoring and tuning plan   SP 2013 Dev SharePoint Admin 
    Monitor Search Performance  SP 2013 Dev SharePoint Admin 
         
9 Migrate Re-build Solutions from Existing SP 2010 Environment      
    Re-compile / Re-build components / Re-package the custom code written in SP 2010 SP 2013 Dev Dev Team
    Re-factor Branding components like Master Pages, Page Layouts and Delegate Controls to work with SP 2013 Ribbon SP 2013 Dev Dev Team
    Fix for deprecated APIs / deprecated code SP 2013 Dev Dev Team
         
10 Migrate Content Migration (Backup, Restore & Attach)     
    Backup Content DBs from SP 2010 SP 2010 SharePoint Admin
    Attach  SP 2010 Databases to SP 2013 Dev Environments  SP 2013 Dev SharePoint Admin 
    Deploy content database from Dev to Test (QA/UAT)  SP 2013 QA/UAT SharePoint Admin 
    Attach  SP 2010 Databases to SP 2013 Prod Environments SP 2013 Prod SharePoint Admin 
    Migrate Custom solutions SP 2013 Dev SharePoint Admin & Development Team 
    Unit Testing (Custom Solutions & Content) SP 2013 Dev SharePoint Admin
    Prepare Deployment Manual/Guides  SP 2013 Dev SharePoint Admin 
         
11 Post-Migrate QA Testing     
    Test Portal based on usage patterns and business scenarios    SP 2013 QA/UAT Testing Team
    Test My Sites, and User Profile Sync  SP 2013 QA/UAT Testing Team
    Test Search and Indexing  SP 2013 QA/UAT Testing Team
    Test Custom solutions  SP 2013 QA/UAT Testing Team
    Test Service Application integrations  SP 2013 QA/UAT Testing Team
    Test 3rd part application functionality  SP 2013 QA/UAT Testing Team
    Test Incoming and Outgoing E-Mail Settings  SP 2013 QA/UAT Testing Team
    Test Content Search  SP 2013 QA/UAT Testing Team
    Test People Search  SP 2013 QA/UAT Testing Team
    Fixes for QA Issues SP 2013 QA/UAT Dev Team
         
12 Post-Migrate UAT Testing & Support    
    Install Deployment Scripts on UAT server SP 2013 QA/UAT SharePoint Admin
    Restore Content DBs –  From SP 2013 Dev to SP 2013 QA/UAT SP 2013 QA/UAT SharePoint Admin
    Deploy Migrated code base SP 2013 QA/UAT SharePoint Admin
    Verify existing configuration of the UAT farm for all service applications SP 2013 QA/UAT SharePoint Admin
    Fixes for UAT Issues SP 2013 QA/UAT Dev Team
         
13 Post-Migrate Go Live – Iteration [SP 2013 PROD Farm]    
    Configuration of the PROD farm for all service applications SP 2013 Prod SharePoint Admin
    Restore Content DBs –  From MOSS 2010 Prod to SP 2013 Prod SP 2013 Prod SharePoint Admin
    Splitting & PerformancePoint/SSRS integration SP 2013 Prod SharePoint Admin
    Deploying UAT migrated code base SP 2013 Prod SharePoint Admin
    Go Live Support SP 2013 Prod Dev Team
         
14 Post-Migrate Post-Implementation Operations     
    Run SharePoint Health analyzer and fix the issues  SP 2013 Prod SharePoint Admin
    Review and Clear the Errors in Event Log, SharePoint Logs  SP 2013 Prod SharePoint Admin
    Configure SCOM Monitoring for SharePoint servers  SP 2013 Prod SharePoint Admin
    Planning for Backup and Restore/Disaster Recovery /Business Continuance  SP 2013 Prod SharePoint Admin
    Reporting and Monitor Growth, Usage and Performance   SP 2013 Prod SharePoint Admin
    Plan for Scheduled Performance tuning, Clean-up in SQL & SharePoint  SP 2013 Prod SharePoint Admin
         
15 Post-Migrate Training     
    Setup Self service Portal (User Request creation, FAQs, Lesson, Best Practices, Policies, Etc)   SharePoint Admin 
    Train Business Stakeholders   Customer / BA
    Train for IT Support Staff   Dev Team

 Subscribe to my blog

SP 2013 articles published during October-November 2012

The following is the list of articles that are published in microsoft.com during October-November 2012 period.

1. Show Off Your Style with SharePoint Theming

Theming in SharePoint 2013 makes it easier to drastically change the look of your site and make it your own. That said, the new look of SharePoint sites is great, so why would you want to change it?

http://sharepoint.microsoft.com/blog/Pages/BlogPost.aspx?pID=1043

2. Certain Microsoft SharePoint Server 2013 installation scenarios are not supported

This article describes Microsoft SharePoint Server 2013 installation scenarios that are not supported.

http://support.microsoft.com/kb/2764086

3. Global Solutions for SharePoint 2013

This model provides architectural guidance for geographically distributed deployments of SharePoint 2013.

http://www.microsoft.com/en-us/download/details.aspx?id=34975

4. Backup and restore: SharePoint Server 2013

This model illustrates various ways that you can back up and restore a SharePoint environment.

http://www.microsoft.com/en-us/download/details.aspx?id=30365

5. Databases that support SharePoint 2013 Preview

This model illustrates the databases that that support SharePoint 2013 Preview.

http://www.microsoft.com/en-us/download/details.aspx?id=30363

6. Design Sample: Corporate Portal with Host-named Sites for SharePoint Server 2013

This design sample illustrates the use of host-named site collections with all sites deployed in a single web application on the farm. This method is highly scalable and is flexible in managing URLs.

http://www.microsoft.com/en-us/download/details.aspx?id=30362

7. Design Sample: Corporate Portal with Path-based Sites for SharePoint Server 2013

This design sample illustrates the use of path-based site collections with sites organized into dedicated web applications and a single top-level site collection per web application.

http://www.microsoft.com/en-us/download/details.aspx?id=30378

8. Design Sample: Extranet with Dedicated Zones for Authentication for SharePoint 2013

This design sample illustrates many top-level project sites with vanity URLs by using host-named sites for each project site (instead of organizing project sites underneath a top-level site collection).

http://www.microsoft.com/en-us/download/details.aspx?id=30368

9. Downloadable eBook: Deployment guide for SharePoint 2013

Download this free ebook to learn how to install and configure SharePoint Server and SharePoint Foundation.

http://www.microsoft.com/en-us/download/details.aspx?id=30384

10. Downloadable eBook: Explore SharePoint 2013

Download this free eBook to learn more about what’s new in SharePoint 2013.

http://www.microsoft.com/en-us/download/details.aspx?id=30368

11. Enterprise search architectures for SharePoint Server 2013

This design sample shows the search architecture for a variety of sizes of server farms.

http://www.microsoft.com/en-us/download/details.aspx?id=30383

12. Incoming email planning worksheet

This worksheet helps you record information to help you plan for incoming email in a SharePoint deployment.

http://www.microsoft.com/en-us/download/details.aspx?id=34805

13. Microsoft SharePoint Products and Technologies Protocol Documentation

The Microsoft SharePoint Products and Technologies protocol documentation provides technical specifications for Microsoft proprietary protocols that are implemented and used in SharePoint Products and Technologies.

http://www.microsoft.com/en-us/download/details.aspx?id=25255

14. Multi-farm architectures with SharePoint Server 2013

This model provides architectural guidance for multi-farm deployments of SharePoint Server 2013.

http://www.microsoft.com/en-us/download/details.aspx?id=34973

15. Search architectures for SharePoint Server 2013

This design sample shows the search architecture for a medium size server farm.

http://www.microsoft.com/en-us/download/details.aspx?id=30374

16. Services in SharePoint Server 2013

This illustration provides information about services that are available in SharePoint Server 2013.

http://www.microsoft.com/en-us/download/details.aspx?id=30402

17. SharePoint 2013 Upgrade Process

This model explains the process that you use when you upgrade from SharePoint Foundation 2010 or SharePoint Server 2010 to SharePoint Foundation 2013 or SharePoint Server 2013.

http://www.microsoft.com/en-us/download/details.aspx?id=30371

18. SharePoint 2013: App Overview for IT Pro

The app model in SharePoint 2013 enables SharePoint environments to add functionality quickly and securely.

http://www.microsoft.com/en-us/download/details.aspx?id=30373

19. SharePoint 2013: How to Test Upgrade

This model explains how to create a test environment to use when you upgrade from SharePoint Server 2010 or SharePoint Foundation 2010 to SharePoint 2013 Products

http://www.microsoft.com/en-us/download/details.aspx?id=30366

20. Test Lab Guide: Configure SharePoint Server 2010 in a Three-Tier Farm

This paper contains step-by-step instructions for creating a test lab containing a three-tier SharePoint farm.

http://www.microsoft.com/en-us/download/details.aspx?id=29420

21.Topologies for SharePoint 2013

The versatility of SharePoint 2013 provides opportunities to develop a topology that satisfies your business goals.

http://www.microsoft.com/en-us/download/details.aspx?id=30377

22.User profile properties and profile synchronization planning worksheets for SharePoint Server 2013

The following planning worksheets can assist you when planning user profiles or planning and configuring profile synchronization.

http://www.microsoft.com/en-us/download/details.aspx?id=35404

23.White Paper: Office 2013–Access Services Setup for an On-Premises Installation

This white paper provides instructions that will help you configure SQL Server 2012 for Access Services in SharePoint Server 2013. It includes instructions for an on-premises installation and configuration of Access Services on a server that is running SharePoint Server 2013.

http://www.microsoft.com/en-us/download/details.aspx?id=30445

 Subscribe to my blog

How to handle deprecated functionalities/APIs during MOSS 2007 to SP 2010 migration

SharePoint 2013 has been RTM’ed yesterday and it is becoming a main stream SharePoint platform for development. However this article will focus on how to handle deprecated functionalities/APIs during MOSS 2007 to SP 2010 migration. This may sound outdated, it still holds good for people who want to move from SP 2007 to SP 2013, because there is no direct migration path from MOSS 2007 to SP 2013. The portal has to be migrated to SP 2010 from MOSS 2007, then it has be migrated to SP 2013.

1. Deprecated product feature / functionality in SharePoint 2007

During the Analysis phase a list of deprecated MOSS 2007 features / functionalities implemented in the MOSS 2007 environment need to be collated. In the pre-migration phase, the strategy for the deprecated functionalities needs to be formulated. The fix for a deprecated functionality may vary from a simple re-configuration to a complex re-build or a re-implementation of the component.

For example, the Site Template of MOSS 2007 is completely deprecated in SharePoint 2010. The fix for site templates is to create a new site in MOSS 2007, Upgrade to SP 2010, Resolve Issues and Save as Template in 2010.

MOSS 2007 deprecated1

Another example of a deprecated MOSS 2007 feature is the custom tool bar items of the List Forms.

MOSS 2007 deprecated2[8]

The recommended fix of the MOSS 2007 Custom Tool bar of List Form is to re-build the custom tool bar in V4 Ribbon by embracing the Ribbon User Interface. This requires a re-build and re-configuration effort.

MOSS 2007 deprecated3

The another example is STSADM commands used in MOSS 2007 deployment scripts. In this case STSADM is completely deprecated; the recommendation is to implement these scripts by leveraging PowerShell Scripts for SP 2010.

Finally, the fixes for deprecated features / functionalities necessitate us to plan for training effort for the end users. Because most of the times the fixes for deprecated features changes the way the end users perform the day-to-day work using the SharePoint platform.

2) SharePoint 2010 Deprecated APIs

This is a scenario where an API or set of APIs in the Object Model of SharePoint 2007 is no longer valid, which means the components that uses these APIs may break. The strategy for the deprecated APIs needs to be formulated in the pre-migration phase (Pilot Migration activity). During the pre-migration activity, the custom solutions need to be migrated to Visual Studio 2010, re-compiled and tested for occurrence of deprecated APIs. If  a deprecated API is found, the corresponding replacement API of SharePoint 2010 needs to be implemented in the code.

The following excel contains the exhaustive list of deprecated APIs in SP 2010.

 Subscribe to my blog

SharePoint 2010 Developer Dashboard Faqs

In this article, I’d be discussing about the SharePoint 2010 Developer Dashboard. The developer dashboard is one of the powerful features in SharePoint 2010, which is turned off by default. It comes into rescue while troubleshooting performance issues of the SharePoint Page. It provides performance (instrumentation) and tracing related information to troubleshoot the performance issues.

The SharePoint 2010 developer dashboard can be enabled by using both the STSADM command line tool and the powershell script. We’ll see how we can enable the SharePoint 2010 developer dashboard using powershell. We can enable the SharePoint 2010 developer dashboard in two modes like ‘On-Demand mode’ and ‘On Mode’.

On-DemandMode

In the on-demand mode, the developer dashboard does not get enabled in one-go. It enables a small icon right to the log in control in the  Ribbon. Once we click the icon, it enables the developer dasbhard which is visible in the bottom on the page

$spserver = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings;
$spserver.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::OnDemand;
$spserver.RequiredPermissions = 'EmptyMask';
$spserver.TraceEnabled = $true;
$spserver.Update();

pic1[3]

On Mode

In the on mode

$spserver = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings;
$spserver.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::On;
$spserver.RequiredPermissions = 'EmptyMask';
$spserver.TraceEnabled = $true;
$spserver.Update();
pic 22

pic3

Turning  Off

$spserver = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings;

$spserver.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::Off;

$spserver.Update();

Consuming a WCF service from SharePoint 2010 Sandbox Solutions

This article would focus on how to consume a WCF Service from a SharePoint 2010 Sandbox Solutions. We’ll start with a quick briefing of what are the limitations of  SharePoint 2010 Sandbox Solutions and What is a SharePoint 2010 Full trust proxy, before jumping on to the actual steps for consuming a WCF service from SharePoint 2010. We all know that a SharePoint 2010 Sandbox Solutions get executed inside a controlled environment (runs inside spucworkerprocess.exe) and it also has restrictions in terms of both internal restrictions and external restrictions.

                                                                                                                      The internal restrictions of SharePoint 2010 Sandbox Solutions means only a subsite of functionalities inside Microsoft.SharePoint.dll is available.  The external restrictions of SharePoint 2010 Sandbox Solution means only it can call assemblies which allows partially trusted callers, hence a sub-set (about one third) of .NET framework assemblies  is only available to SharePoint 2010 Sandbox Solutions. On top of this there are many more external restrictions like accessing file-system, web services / wcf services, databases etc. , a complete list of restrictions are available in msdn documentation.

The Full-Trust Proxy comes into picture when we want to reach the external world from the SharePoint 2010 Sandbox Solutions. The Full-Trust proxy runs inside a separate process called spucworkerprocessproxy.exe, which allows partially trusted callers.

I’ve the following WCF service hosted in IIS, which needs to be accessed from SharePoint 2010 Sandbox Visual Web Part. For the sake of the demonstration I’ve kept the service functionality simple, it takes an integer as a parameter and returns a hardcoded string. The following is the service method implementation.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;

namespace CreditCardService
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "VadlidationService" in code, svc and config file together.
    public class VadlidationService : IVadlidationService
    {
        public string GetCountry(int value)
        {
            return "India";
        }

        
    }
}
The service contract of the service looks like the following 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;

namespace CreditCardService
{
    [ServiceContract]
    public interface IVadlidationService
    {

        [OperationContract]
        string GetCountry(int value);

    

        // TODO: Add your service operations here
    }


    
}

Now let’s move to the development of full-trust proxy. To develop a full-trust proxy assembly, two component needs to be developed one is full-trust proxy  operation class and the other is full-trust proxy arguments class.

The full-trust proxy operation should be inherit from spproxyoperation class and it should be marked with [Serializable] attribute.  Then the required set of properties need to be implemented.

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

namespace SimpleProxy
{
    [Serializable]
    [Microsoft.SharePoint.Security.SharePointPermission(System.Security.Permissions.SecurityAction.LinkDemand, ObjectModel = true)] 

   public class SimpleProxyArgs : SPProxyOperationArgs
    {

      public int CountryId { get; set; }

       public static string ProxyOperationTypeName
       {

           get
           {
               return "SimpleProxy.SimpleProxyOps";
           }
       }


       public static string ProxyAssemblyName

       {

           get
           {
               return "SimpleProxy, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a3daa9085766b846"; 
                       
           
           }
       
       
       
       }

    }
}

The property CountryId would be used by the full-trust proxy operation class to pass the arguments to the WCF service.  The two additional properties like

ProxyOperationType and ProxyAssemblyName is defined here and it would be used by the Sandbox Solution to get the assembly details while making the calls

to full-trust proxy components.

The full-trust proxy operation class should inherit from spproxyoperation class, override the Execute method to implement all the required full-trust logic.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint.UserCode;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Security;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace SimpleProxy

{

    [Microsoft.SharePoint.Security.SharePointPermission(System.Security.Permissions.SecurityAction.LinkDemand, ObjectModel = true)] 

    public class SimpleProxyOps : SPProxyOperation
    {
        
        
             
        public override object Execute(SPProxyOperationArgs args)
        {
            WSHttpBinding oWSHttpBinding = new WSHttpBinding(SecurityMode.Message);


            oWSHttpBinding.Name = "WSHttpBinding_IVadlidationService";

            oWSHttpBinding.CloseTimeout = new TimeSpan(0, 1, 0);
            oWSHttpBinding.OpenTimeout = new TimeSpan(0, 1, 0);
            oWSHttpBinding.ReceiveTimeout = new TimeSpan(0, 10, 0);
            oWSHttpBinding.SendTimeout = new TimeSpan(0, 1, 0);
            oWSHttpBinding.BypassProxyOnLocal = false;
            oWSHttpBinding.TransactionFlow = false;
            oWSHttpBinding.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard;


            oWSHttpBinding.MaxBufferPoolSize = 524288;
            oWSHttpBinding.MaxReceivedMessageSize = 65536;
            oWSHttpBinding.MessageEncoding = WSMessageEncoding.Text;
            oWSHttpBinding.TextEncoding = Encoding.UTF8;
            oWSHttpBinding.UseDefaultWebProxy = true;
            oWSHttpBinding.AllowCookies = false;


            oWSHttpBinding.ReaderQuotas.MaxDepth = 32;
            oWSHttpBinding.ReaderQuotas.MaxStringContentLength = 8192;
            oWSHttpBinding.ReaderQuotas.MaxArrayLength = 16384;
            oWSHttpBinding.ReaderQuotas.MaxBytesPerRead = 4096;
            oWSHttpBinding.ReaderQuotas.MaxNameTableCharCount = 16384;

            oWSHttpBinding.ReliableSession.Ordered = true;
            oWSHttpBinding.ReliableSession.InactivityTimeout = new TimeSpan(0, 10, 0);
            oWSHttpBinding.ReliableSession.Enabled = false;

            oWSHttpBinding.Security.Mode = SecurityMode.Message;

            oWSHttpBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Windows;
            oWSHttpBinding.Security.Transport.ProxyCredentialType = HttpProxyCredentialType.None;
            oWSHttpBinding.Security.Transport.Realm = "";

            oWSHttpBinding.Security.Message.ClientCredentialType = MessageCredentialType.Windows;
            oWSHttpBinding.Security.Message.NegotiateServiceCredential = true;


            EndpointAddress oEndPointAddress = new EndpointAddress(new Uri("http://lt012464.abc.com:1414/CreditCardService/ValidationService.svc"));

            
            
            var proxyArgs = args as SimpleProxyArgs;

            int CountryId = proxyArgs.CountryId;


            SimpleProxy.VadlidationServiceClient ovsc = new SimpleProxy.VadlidationServiceClient(oWSHttpBinding, oEndPointAddress);
                
            string result = ovsc.GetCountry(0);
            

            return result;

        }

    }
}

I’ve overridden the execute method and now I need to access the WCF service inside execute method. There are several ways of accessing a WCF service from a .NET assembly. If you create the client proxy for the WCF service using ‘Add Service Reference’ option in Visual Studio 2010, it would be difficult to configure and set the endpoint inside full-trust proxy class. Because full-trust proxy runs inside spucworkerprocesproxy.exe, which cannot access the WCF client endpoint configuration defined in the web.config. The only viable option to set the endpoint inside full-trust proxy component is to create the endpoint through code (programmatically).

Then, add this attribute [assembly: AllowPartiallyTrustedCallers] to the assemblyinfo.cs file  to allow the partially trusted callers (Sandbox Solutions) to invoke it.

The next logical step is to register the full-trust proxy assemblies to the User Code service of Sandbox infrastructure. Preferably, this action should be performed inside the feature activation of the full-trust proxy solution.

public override void FeatureActivated(SPFeatureReceiverProperties properties)
        {

            SPUserCodeService userCodeService = SPUserCodeService.Local;
            var simpleOperation = new SPProxyOperationType(SimpleProxyArgs.ProxyAssemblyName,SimpleProxyArgs.ProxyOperationTypeName);
            userCodeService.ProxyOperationTypes.Add(simpleOperation);
            userCodeService.Update();
            
        }

Now we are all set to invoke this full-trust proxy from a SharePoint 2010 Sandboxed Visual Web Part. Invoke the SPUtility.ExecuteRegisteredProxyOperation method from the sandboxed visual webpart to make this happen.

namespace SharePointSaturdayWebPart.SharePointSaturdayWebPart
{
    [ToolboxItem(false)]
    public partial class SharePointSaturdayWebPart : System.Web.UI.WebControls.WebParts.WebPart
    {
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            InitializeControl();
        }

        protected void Page_Load(object sender, EventArgs e)
        {

            var proxyArgs = new SimpleProxyArgs();
            proxyArgs.CountryId = 1;



                var result = SPUtility.ExecuteRegisteredProxyOperation(SimpleProxyArgs.ProxyAssemblyName, 
                                                                        SimpleProxyArgs.ProxyOperationTypeName, proxyArgs);





                Label1.Text = (string)result;




        }
    }
}

 

 Subscribe to my blog

SharePoint 2013 various object model overview

SharePoint 2013 provides an exhaustive list of options in terms of API set,  when it comes to application development. The SharePoint 2013 platform provides the following options for developing applications around SharePoint.

  • Developing an app for SharePoint
  • Developing a Custom Web Part for a SharePoint Page
  • ASP.NET application rendered through IFrame on a SharePoint Page
  • Javascript/EcmaScript running in a Site Page
  • Silverlight application(hosted in a website or running in a mobile device) accessing SharePoint data
  • .NET Client application accessing SharePoint data
  • Windows Powershell
  • Timer job running on a SharePoint Server

The developers need not acquire any new skills for developing applications on SharePoint 2013. The developers can continue to leverage their existing skills on JavaScript, ASP.NET, Windows Powershell, Silverlight, Windows Phone, .NET Framework and REST/OData. The following table provides an overview of various development scenarios around SharePoint 2013 and the relevant object model to be used for each scenarios for development.

 

No Development Scenario Object Model
1 Development of custom web parts Server Object Model
2 Develop of custom application page Server Object Model
3 Development of User Control Server Object Model
4 Development of Custom Workflow Server Object Model
5 Development of Custom Timer Job Server Object Model
6 Development of Custom Event Handlers Server Object Model
7 Development of Windows Phone App to perform CRUD operations on SharePoint data Mobile Client Object Model
8 Development of Windows Phone App to implement Microsoft Push Notification Service that alerts  mobile device (for events in SharePoint) Mobile Client Object Model
9 Development o f LAMP (Linux-Apache-MySql-Php) application that performs CRUD operations on SharePoint data REST / oData end points
10 Development of iOS or Android application that performs CRUD operation on SharePoint data REST / oData end points
11 Development of ASP.NET application that performs CRUD operations on SharePoint data outside of firewall JavaScript client object model
12 Development of an HTML / JavaScript applications that performs CRUD operations on SharePoint data JavaScript client object model
13 Development of ASP.NET application that performs CRUD operations on SharePoint data inside firewall .NET Framework client object model or Silverlight Client Object Model or REST / oData endpoints
14 Development of a .NET client application that performs CRUD operations on SharePoint data .NET Framework client object model

 

I’d explore more on SharePoint 2013 and keep sharing my leanings in the forthcoming posts.

 Subscribe to my blog

Create custom verbs for SharePoint 2010 web parts

The web part verbs are the menus items (like Minimize, Close etc) appears when we click the Edit option in web parts. The SharePoint web part framework exposes one of the propery called WebPartVerbCollection. This is very flexible which allows us to add our own items (custom web part verbs) to the web part collection.

The whole idea is to override the getter of WebPartVerbCollection property, add custom verb items and return it back to web part framework. The following code snippet covers the same.

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;

namespace WP_Verb_Sample.VisualWebPart1
{
    [ToolboxItemAttribute(false)]
    public class VisualWebPart1 : WebPart
    {
        // Visual Studio might automatically update this path when you change the Visual Web Part project item.
        private const string _ascxPath = @"~/_CONTROLTEMPLATES/WP_Verb_Sample/VisualWebPart1/WPVerbSample.ascx";

        protected override void CreateChildControls()
        {
            Control control = Page.LoadControl(_ascxPath);
            Controls.Add(control);
        }

        public override WebPartVerbCollection Verbs
        {
            get
            {
                //return base.Verbs;

                WebPartVerb Verb1 = new WebPartVerb("Verb Inovking Server Handler", 
                                              new WebPartEventHandler(CustomVerbEventHandler));
                Verb1.Text = "Verb Inovking Server";
                Verb1.Description = "This verb is used to demonstrate the server-side WP verb operation";


                WebPartVerb Verb2 = new WebPartVerb("Verb Inovking Client Script", 
                                              "Javascript:alert("Hi from Client");");
                Verb2.Text = "Verb Inovking client script";
                Verb2.Description = "This verb is used to demonstrate the client-side WP verb operation";


                WebPartVerb[] addedVerbs = new WebPartVerb[] { Verb1, Verb2 };

                return new WebPartVerbCollection(base.Verbs, addedVerbs);


            }
        }




        protected void CustomVerbEventHandler(object sender, WebPartEventArgs args)
        {
            // any arbitrary operation can be performed here
           
            
        }
    }
}

The web part verbs can invoke both a client-side action and a server-side handler as well. The above sample covers both the scenarios. Once you compile and deploy this code, you’d see your custom webpart verb.

clip_image002

 Subscribe to my blog