Thursday, February 24, 2011

How to get SharePoint User by User Id in C#

This is simple.

SPSite site = new SPSite(http://server);
SPWeb myweb = site.OpenWeb();
SPUser found = myweb.AllUsers.GetByID(1);

Monday, February 21, 2011

Updates are currently disallowed on GET requests.


This error came when i tried to access General Settings and other settings in the central administration. I used following code in the Power shell and get it worked.

$w = get-spwebapplication http://webapplication

Tuesday, February 15, 2011

Access denied by business data connectivity SharePoint 2010

(How to give permission to the BDC (Business Data Connectivity) Services)

This message occurs when the user doesn't have the sufficient permission for the   BDC services.

  • First Check the BDC services are running.


  • Then go to Manage in the ribbon. and select the relevant data source and click the “Set Permission” 


  • Add the user and give the relevant permission you want.


Monday, February 14, 2011