Skip to main content


Showing posts from December, 2012

The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered.(SharePoint 2010 Powershell error)

Error:- "The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered when trying to run SharePoint 2010 PowerShell"

This message would also show up if you try to run the SharePoint 2010 Managment Shell without the proper permissions, or if the account does not have the proper permissions in SQL


Modify XSLT for discussion board page SharePoint 2010

If you edit Discussion Board page in SharePoint, You can provide link to xsl file to change the look and feel of the page:-

You can refer to default XSL used by this page(thread.xsl)
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\XSL

C# Delegate to perform asynchronous method calls

Paste below code inVS 2010 console application: using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ProjectDelegateAsync
publicdelegatevoidLongTimeTask_Delegate(string s);
publicdelegatevoidLongTimeTask_Delegate1(string s);
staticvoid Main(string[] args)
LongTimeTask_Delegate d = null;
d = newLongTimeTask_Delegate(LongTimeTask);

IAsyncResult R = null;
R = d.BeginInvoke("TestString", null, null); //invoking the method

LongTimeTask_Delegate1 d1 = null; d1 = newLongTimeTask_Delegate1(LongTimeTask1);

IAsyncResult R1 = null; R1 = d1.BeginInvoke("TestString", null, null); //invoking the method

Console.WriteLine("last line of program"); Console.ReadLine(); } publicstaticvoid LongTimeTask(string s) { for (int i = 0; i < 100; i++) { Console.Write(" i:" + i); } } publicstaticvoid LongTimeTask1(string s) { for (int i = 0; i < 100; i++)