Sharepoint restrict PeoplePicker filter shows only forms authentication users

If you have a sharepoint site with forms authentication , peoplepicker can able to show both AD user and Forms Authentication Membership user. But sometimes you just want PeoplePicker show only forms authentication users.You can configure sharepoint site for this using stsadm.

syntax:
stsadm -o setproperty -propertyname peoplepicker -nowindowsaccountsfornonwindowsauthenticationmode
-propertyvalue {Yes | No}
[-url] <URL>

The syntax for the getproperty operation is:
stsadm -o getproperty
-propertyname peoplepicker -nowindowsaccountsfornonwindowsauthenticationmode
[-url] <URL>
Note:You can substitute -pn for -propertyname and -pv for -propertyvalue.

Example:

To search from a membership provider only, use the following syntax:

stsadm -o setproperty -url http://<server&gt; -pn “peoplepicker
-nowindowsaccountsfornonwindowsauthenticationmode” -pv yes
Resources:

http://technet.microsoft.com/en-us/library/cc263264(office.12).aspx

Recovery Sharepoint 2010 farm when app server crushed but db is not

First do not panic . If your database is alive ,this position is not bad as seems. We have a small farm in one app server and one db. Last night app server crushed with hardware failure with unrecoverable disk error when we were getting disk image for backup purpose. If we restore last backup  so we lost last 3 days. Then we decided that setting up app server and provide to use alive db.

  1. Backup your DB for safety.
  2. Setup Sharepoint 2010 to server with “farm” and “complete” option.
  3. Do not run Sharepoint 2010 product configuration wizard if you have language packs to apply.Use your language packs first.
  4. Run Sharepoint 2010 product configuration.
  5. Do not create new farm select Connect to an existing farm option.
  6. Select your configuration DB.
  7. Click Advanced button and select  Central Administration application host for this server .
  8. After wizard finished configure your server service applications. Re-Provision if you have missing service application.
  9. You will see in IIS your  sites automatically created.
  10. Configure your web.config again and apply necessery solutions,wsp,webpart, dlls, usercontrols etc .
  11. If everything is ok. You will see your site with your content

Alternatively you can backup your site content db . Create a new farm and configure it . restore last sharepoint backup for get back in past  days and restore your site content db (Sql backup) to database for missing days.

about EditModePanel in Sharepoint 2010

In Sharepoint 2010 the EditModePanel has working differently.

One of my friend asked me about a problem with EditModePanel does not render its content instead of PageDisplayMode property  has  already been set to “Display”.This problems only occurs with visitors.(In real who has not have “EditListItems” priviledges)  When i execute the code that he sent me yeah  he is absolutely right. After a couple of minutes in stunned than i used reflector and compared 2007&2010 Microsoft.Office.Sharepoint.Publishing.dll’s. Gotcha !!

Nice and friendly EditModePanel is not as known as it is.  calculateShouldRender() method has been changed

private void calculateShouldRender()

{

if (!ConsoleUtilities.CheckPermissions(SPBasePermissions.EditListItems))

{

this.shouldRender = false;

}

else

{

SPControlMode contextualFormModeFromPostedForm = ConsoleUtilities.GetContextualFormModeFromPostedForm();

if ((SPControlMode.Display == contextualFormModeFromPostedForm) && (PageDisplayMode.Display == this.PageDisplayMode))

{

this.shouldRender = true;

}

else if ((SPControlMode.Edit == contextualFormModeFromPostedForm) && (PageDisplayMode.Edit == this.PageDisplayMode))

{

this.shouldRender = true;

}

else

{

this.shouldRender = false;

}

}

this.Visible = this.shouldRender;

}

if you dont like this extra security code like me you may make your own EditModePanel.