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.

image

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
$w.HttpThrottleSettings
$w.Update()

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.

image

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

image

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

image

Monday, February 14, 2011