Thursday, February 23, 2012

Adding PDF Search Capability on Sharepoint 2010

PreRequisites

  • Install Windows Server 2008 following the SharePoint prerequisites (Pre-upgrade utility).
  • Install SharePoint 2010 with the complete option and run the PSconfig wizard. 
  • Configure required Server Farm Topology. In this example we use a Single Server Farm. 
  • Create a new Search Service application. 


Configure Adobe iFilter based on steps mentioned below:

  1. Install PDF iFilter 9.0 (64 bit) from http://www.adobe.com/support/downloads/detail.jsp?ftpID=4025
  2. Download PDF icon picture from Adobe web site http://www.adobe.com/misc/linking.html and copy to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES\ 
  3. Add the following entry in docIcon.xml file, which can be found at: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\XML
  4. Add pdf file type on the File Type page under Search Service Application
  5. Open regedit
  6. Navigate to the following location:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\14.0\Search\Setup\ContentIndexCommon\Filters\Extension
  7. Right-click > Click New > Key to create a new key for .pdf
  8. Add the following GUID in the default value
    {E8978DA6-047F-4E3D-9C78-CDBE46041603}
  • Restart the SharePoint Server Search 14
  • Reboot the SharePoint servers in Farm
  • Create a Test site (with any out-of-box site template) and create a document library upload any sample PDF document(s).
  • Perform FULL Crawl to get search result.
Once the crawl is completed we will get search results.

NOTE: If this is a SharePoint Foundation 2010 environment additional steps will be required instead of step 4 above

Adding Searchable File Types to SharePoint Foundation 2010
http://support.microsoft.com/kb/2518465

Configuring My Sites

SharePoint My Sites are commonly referred to as “Facebook for the enterprise” and are personal site collections providing each user with the ability to store private and public information such as documents, pictures, status updates, etc easily and efficiently.  My Sites in SharePoint 2010 takes social enterprise computing to the next level and builds upon what we have come to love in previous versions.  Microsoft saw the need to continue to invest and enhance SharePoint’s social networking capabilities, and as web 2.0 technologies continue to sprawl all over the world wide web, Microsoft have again successfully set the bench mark in the enterprise by introducing an array of social computing features to enhance end user collaboration in SharePoint 2010.
In my last article I introduced and configured our first service application for our SharePoint 2010 deployment, User Profiles, which provided us with a central location for storing user details that will later be imported from a content source such as Active Directory.  Today we will continue our journey to plan and configure User’s My Sites in SharePoint 2010.
Prerequisites
This article is the 5th in my series on deploying SharePoint 2010 for the enterprise, so if you have missed the first 4, you can easily catch-up via the links below;
  1. Installing SharePoint 2010 using Least Privilege Service Accounts
  2. Configuring incoming email in SharePoint 2010 with Exchange 2010
  3. Configuring outgoing email in SharePoint 2010 with Exchange 2010
  4. Configuring the User Profile Service in SharePoint 2010
Create the My Site Web Application
We begin by first creating a Web Application that will eventually house our My Site Host and subsequent site collections.
Navigate to Central Administration / Application Management / Web Applications
Click New
image thumb Configuring My Site in SharePoint 2010
Authentication: Select either Claims or Classic depending on your requirements.  I will select “Classic”
IIS Web Site: Create a new IIS web site (enter your details as per your requirements)
image thumb1 Configuring My Site in SharePoint 2010
Authentication Provider: Select your preferred provider based on your requirements.
Public URL: Specify the URL that users will type to access their My Sites.
image thumb2 Configuring My Site in SharePoint 2010
Application Pool: Create a new application pool and give it a descriptive name
As we have been utilizing the least privilege model whilst configuring our SharePoint farm in this series, we will click on Register a new managed account and enter the details for our My Site Application Pool Identity.  Note: This account will be required to be provisioned in Active Directory before you can proceed. e.g. In my example I have created an account called DOMAIN\sp_mysite.
image thumb3 Configuring My Site in SharePoint 2010
Click OK
image thumb4 Configuring My Site in SharePoint 2010
Database Name and Authentication: Specify your Database server and Database name.
Failover Server: Specify your failover server if you are utilising SQL Server database mirroring.
image thumb5 Configuring My Site in SharePoint 2010
Click OK
You should receive the below confirmation that the Web Application has been successfully created.
image thumb6 Configuring My Site in SharePoint 2010
Click on our newly created “SharePoint – My Site” Web Application and click on General Settings.  Proceed to fill out your Web Application specific settings such as the Default Time Zone etc.
image thumb7 Configuring My Site in SharePoint 2010
Create the My Site Host Site Collection
Now that we have successfully created our My Site Web Application, we can now proceed to create our My Site Host Site Collection.  This will be the top level site that will house our individual user’s site collections.
Navigate to Central Administration / Application Management / Create site collections.
Ensure that the recently created My Site Web Application is selected, enter in a Title and click select the My Site Host Template located under the Enterprise Tab.  Lastly, specify your site collection administrators and click OK.
image thumb8 Configuring My Site in SharePoint 2010
You should then receive confirmation that the top level My Site Host has been successfully created.
image thumb9 Configuring My Site in SharePoint 2010
Setup My Sites
Now that we have successfully provisioned our My Site Web Application and Top Level Site Collection that will host our My Sites, we can continue to configure our My Site Settings.
Navigate to Central Administration / Application Management / Manage service applications.
Click on User Profiles.
Click on Setup My Sites located under My Site Settings.
image thumb10 Configuring My Site in SharePoint 2010
Enter the details of your Preferred Search Center if you have one setup already.
Enter the URL of your My Site Host that we have just created in the previous step and the personal site location.
image thumb11 Configuring My Site in SharePoint 2010
Finally, select your Site Naming format, configure your Language Options, Permissions and My Site Email Notifications.
image thumb12 Configuring My Site in SharePoint 2010
Click OK.
Add our Managed Path
Because we have specified “personal” as our Personal Site Location, we will need to define our managed path against our My Site Web Application.
Navigate to Central Administration / Application Management / Manage Web Applications.
Click on your My Site Web Application and click on Managed Paths from the Ribbon.
image thumb13 Configuring My Site in SharePoint 2010
Add “personal” as a Wildcard inclusion, click Add Path and click OK
image thumb14 Configuring My Site in SharePoint 2010
Enable Self-Service Creation
Our last configuration step provides our users with the privilege to provision their own My Site’s by enabling the Self-Service Creation.
Navigate back to Central Administration / Application Management / Manage Web Applications.
Click on your My Site Web Application and click on Self-Service Site Creation.
image thumb15 Configuring My Site in SharePoint 2010
Select On and click OK.
image thumb16 Configuring My Site in SharePoint 2010
If I now browse to my My Site URL I will be presented with the following “What’s New” Page.
image thumb17 Configuring My Site in SharePoint 2010
It is only until I click on “My Content”, that SharePoint will proceed to create my personal site as per SharePoint 2007.
image thumb18 Configuring My Site in SharePoint 2010
My Content
image thumb19 Configuring My Site in SharePoint 2010
As you can see, we have now successfully completed our setup of a My Site Host which will house our user’s My Sites.
There is a whole bunch of new exciting features within SharePoint 2010 and its latest iteration of My Site in which I will deep dive in future articles.

Wednesday, February 8, 2012

Talking about SPSchedule


The SPSchedule class allows one to specify repeating schedules for timer jobs using derived classes such as SPMinuteSchedule, SPHourlySchedule, etc. Those are pretty easy to figure out from the SDK (http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.spschedule.aspx). 

SPSchedule also provides a FromString(recurrenceValue) method that allows you to specify the same kinds of schedules from a text string, but allowable formats for the recurrenceValue string are not well documented.  Here are legal formats I’ve discovered through testing.

Formats Used Below

Format
Description
Allowable values
m
minutes
0-59
s
seconds
0-59
ddd
abbreviated name of day of week
mon, tue, wed, thu, fri, sat, sun
d
numeric day of month
1-31
mmm
abbreviated name of month
jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec
HH:MM:SS
Time of day as hours, minutes, seconds using 24 hour-clock.
00:00:00 - 23:59:59

Minute Schedule

Syntax
Description
every Interval minutes
Repeat every Interval minutes (starting at 0 seconds)
every Interval minutes at Begin
Repeat every Interval minutes starting at Begin seconds
every Interval minutes between Beginand End
Repeat every Interval minutes starting between Begin and Endseconds

Parameter
Format
Sample
Interval
m
every 15 minutes
Begin
s
every 15 minutes at 0
End
s
every 15 minutes between 0 and 15

Hourly schedule

Syntax
Description
hourly at Begin
Repeat every hour starting at Begin minutes
hourly between Begin and End
Repeat every hour starting between Begin and End minutes

Parameter
Format
Sample
Begin
m
hourly at 1
End
m
hourly between 1 and 10

Daily schedule

Syntax
Description
daily at Begin
Repeat every day starting at Begin time
daily between Begin and End
Repeat every day starting between Begin and End times

Parameter
Format
Sample
Begin
HH:MM:SS
daily at 09:00:00
End
HH:MM:SS
daily between 09:00:00 and 17:30:00

Weekly schedule

Syntax
Description
weekly at Begin
Repeat every week starting at Begin day and time
weekly between Begin and End
Repeat every week starting between Begin and End day and times

Parameter
Format
Sample
Begin
ddd HH:MM:SS
weekly at mon 09:00:00
End
ddd HH:MM:SS
weekly between mon 09:00:00 and fri 17:30:00

Monthly schedule

Syntax
Description
monthly at Begin
Repeat every month starting at Begin day of month and time
monthly between Begin and End
Repeat every month starting between Begin and End day of month and times

Parameter
Format
Sample
Begin
d HH:MM:SS
monthly at 1 09:00:00
End
d HH:MM:SS
monthly between 1 09:00:00 and 15 17:30:00

Yearly schedule

Syntax
Description
yearly at Begin
Repeat every year starting at Begin month, day of month and time
yearly between Begin and End
Repeat every year starting between Begin and End month, day of month and times

Parameter
Format
Sample
Begin
mmm d HH:MM:SS
yearly at jan 1 09:00:00
End
mmm d HH:MM:SS
yearly between feb 1 09:00:00 and apr 15 17:30:00