SharePoint 2010 Performance Dashboard – Server Performance Reporting(Post 2/2)

  Continuing from the Post 1, Request Workload / Agent Query : SELECT AgentName, SUM(RequestCount) AS RequestsCount FROM RequestWorkload WHERE (LogTime BETWEEN GETDATE() – 10 AND GETDATE()) AND (AgentName IN (‘Browser’, ‘Collab’, ‘ExcelViewer’, ‘DAV’, ‘Groove14’, ‘Excel14’, ‘Word14’)) GROUP BY AgentName ORDER BY RequestsCount DESC   Request Duration / Agent Query : SELECT TOP (10) AgentName,…


SharePoint 2010 Performance Dashboard – Server Performance Reporting(Post 1/2)

  In this post, I will talk about my SharePoint Performance Dashboard Project. It has mainly two major types of reporting features, Part 1.  CPU Monitor, Memory Monitor, Top Users of the farm, Top Site Collections in the farm and many more and Part 2. List of content database with the size – for each…


Resolution: Exception while accessing “SPWebService.ContentService” object

Recently I came across a situation in which a customer was trying to access the web applications in the farm but he was getting an exception, “System.NullReferenceException was unhandled  Message=Object reference not set an instance of an object.” while executing “SPWebService.ContentService” from a console application as below. Initially we started looking into what is wrong…


How to remove “Open with (Windows) Explorer” button from Document Library’s Ribbon Menu

Recently I had come across a situation in which customer wanted to remove the “Open with (Windows) Explorer” button from the Document Library’s Ribbon Menu. Following are the steps to remove this button from Ribbon Create an empty SharePoint 2010 Solution, you may give your favorite name to it Add a feature by right clicking…


Developing Applications for SharePoint 2010 – The release of patterns & practices

Overview Developing Applications for SharePoint 2010 contains guidance documentation, detailed examples, and a reusable class library. These resources are designed to help solution developers and architects make the right decisions and follow proven practices when designing and developing applications for SharePoint 2010. The guidance focuses primarily on the building blocks that every developer needs to…


Silverlight Object Model code to access the current user of a SP2010 site

More details on the Silverlight Object Model, you can find here. using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Input; using Microsoft.SharePoint.Client; using Microsoft.SharePoint; namespace SilverlightApplication1 { public partial class MainPage : UserControl { Web oWebsite; ListCollection collList; IEnumerable<List> listInfo; User user; public MainPage() { InitializeComponent(); SilverlightOM(); }…


SharePoint 2010 Resources

SharePoint 2010 Developer Training Course SharePoint 2010 provides the business collaboration platform for developers to rapidly build solutions using familiar tools while leveraging a rich set of out of the box features. Visual Studio 2010 and SharePoint Designer 2010 make developers more productive and Visual Studio Team Foundation Server delivers support for application lifecycle management….


Code snippet to copy documents from one document library to another

1: using (SPSite site = new SPSite("http://ms10:200/sites/200")) 2: { 3: using (SPWeb web = site.OpenWeb()) 4: { 5: SPList lib1 = (SPDocumentLibrary)web.Lists["Documents"]; 6: SPList lib2 = (SPDocumentLibrary)web.Lists["Site Collection Documents"]; 7: byte[] fileBytes = null; 8: string destUrl = null; 9: SPFile destFile = null; 10: foreach (SPListItem item1 in lib1.Items) 11: { 12: fileBytes =…


Code snippet to add / modify columns in a list

It iterates through a whole site collection and wherever the list with name “test” it finds, It will do the changes. 1: using System; 2: using System.Collections.Generic; 3: using System.Text; 4: using Microsoft.SharePoint; 5:   6: namespace ConsoleApplication1 7: { 8: class Program 9: { 10: static void Main(string[] args) 11: { 12: using (SPSite…