Showing posts with label Configuration. Show all posts
Showing posts with label Configuration. Show all posts

Tuesday, September 9, 2008

PDF iFilter Updates

It’s been a while since I’ve last configure the PDF iFilter for SharePoint. The last one I’ve done was for SPS 2003. For MOSS 2007, the process is pretty much the same, except for file path difference and configuration page changes. Here’s the steps taken from MS KB http://support.microsoft.com/kb/832809/en-us.

1.

Download Adobe PDF IFilter 5.0 from the following Adobe Web site: http://www.adobe.com/support/downloads/detail.jsp?ftpID=2611 (or search Google for latest installer from Adobe).(http://www.adobe.com/support/downloads/detail.jsp?ftpID=1276)

2.

Stop the IIS Admin service. To do this, follow these steps:

a.

Click Start, point to Administrative Tools, and then click Services.

b.

Right-click IIS Admin Service, and then click Stop.

3.

Run the Adobe PDF IFilter 5.0 Setup program to install the filter on the server.

•

For WSS 2.0, install the PDF iFilter on the SQL and WSS servers.

•

For SPS 2003, install the PDF iFilter on the SQL and Index servers.

•

For WSS 3.0, install the PDF iFilter on servers running the WSS [spsearch] search service.

•

For MOSS 2007, install the PDF iFilter on the Index servers.

After installing the iFilter, perform Steps 5, 6, and 7 on all the Web Front End servers in the farm.

4.

Register the Adobe PDF IFilter. To do this, follow these steps:

a.

Click Start, and then click Run.

b.

In the Open box, type cmd, and then click OK.

c.

Switch to the folder that contains the Adobe PDF Filter 5.0 files. For example, switch to the following folder:

Drive:\Program Files\Adobe\PDF IFilter 5.0

d.

Type regsvr32.exe pdffilt.dll, and then press ENTER.

e.

If you receive a message that states that the operation was successful, click OK .

f.

Type exit, and then press ENTER to exit the command prompt.

5.

Copy the .gif file that you want to use for the icon to the following folder on the server, as appropriate for your situation:

SharePoint Portal Server 2003 - Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\Template\Images

SharePoint Server 2007- Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\Images

6.

Edit the Docicon.xml file to include the .pdf extension. To do this, follow these steps:

a.

Start Notepad, and then open the Docicon.xml file. The Docicon.xml file is located in one of the following folders on the server:

SharePoint Portal Server 2003 - Drive:\Program Files\Common Files\Microsoft Shared\Web server extensions\60\Template\Xml

SharePoint Server 2007- Drive:\Program Files\Common Files\Microsoft Shared\Web server extensions\12\Template\Xml

b.

Add an entry for the .pdf extension. For example, add a line that is similar to the following to the Docicon.xml file, where NameofIconFile is the name of the .gif file:

<Mapping Key="pdf" Value="NameofIconFile.gif"/>

c.

On the File menu, click Save, and then quit Notepad.

7.

Restart the server.

8.

Add the .pdf file type to the content index. To do this, follow these steps: (these steps are for SPS2003. MOSS2007’s steps are to go to SSP configuration)

a.

Connect to the portal site, and then click Site Settings.

b.

On the Site Settings page, click Configure search and indexing under Search Settings and Indexed Content.

c.

On the Configure Search and Indexing page, click Include file types under General Content Settings and Indexing Status.

d.

On the Specify File Types to Include page, click New File Type.

e.

On the Add File Type page, type pdf in the File extension box, and then click OK.

9.

Update the context indexes for portal content and for non-portal content. To do this, follow these steps: (these steps are for SPS2003. MOSS2007’s steps are to go to SSP configuration)

a.

On the Site Settings page of the portal site, click Configure search and indexing under Search Settings and Indexed Content.

b.

On the Configure search and indexing page, click Manage content indexes under Content Indexes.

c.

On the Manage Content Indexes page, click the down arrow next to the name of the index that you want to update, and then click Start Full Update.

For the image icon. Search for a pdf16.gif file using Google Image search, or download from Adobe at here.

References:

http://weblogs.asp.net/jan/archive/2004/05/19/135273.aspx

http://support.microsoft.com/kb/832809/en-us

http://www.ifiltershop.com/

http://www.foxitsoftware.com/pdf/ifilter/

Default MOSS IFilters: http://technet.microsoft.com/en-us/library/cc261754.aspx

Wednesday, June 4, 2008

SharePoint security cache AD Group?

There seem to be a funny problem where AD group names are cached by SharePoint. So far I've observed two scenarios

Scenario 1: Unable to set AD group into MOSS security

I’ve created my own AD group and added the some users into the AD group. Then I add the AD group directly into some SharePoint subsite and granting them some permissions. This works out fine. Then I remove the AD group from SharePoint , delete the group from AD, and repeat the process again. I use back the exact same AD group name. This time, the user will not have access, as though the AD group is not added into SharePoint at all.

This problem can be fixed by performing an iisreset before re-adding the newly created AD group (with identical name as the previously deleted one) back into SharePoint. I’ll be performing “iisreset”s in the future when I’m setting up user permissions.

Scenario 2: People picker does not have the AD group

The scenario is like this: from a web part properties page, under Advnaced section, click on the browse button to bring up the people picker. Switch to find under Distribution/Security groups and perform a search. The AD groups that suppose to be around are not.

To fix this problem, just perform a full user profile import from the Shared Service Provider administration. But, there's a catch: you MUST delete all existing user profile, by viewing all existing user profile, and select all to perform the delete. Yes, painful process as there's no option to delete all existing user profile data, and it didn't work if you just perform a full user profile import directly.

Update: I've written a small console application to quickly delete all user profiles:

/*Include the following namespaces*/ using Microsoft.SharePoint; using Microsoft.SharePoint.Administration; using Microsoft.Office.Server.UserProfiles; using Microsoft.Office.Server; /*Here's the quick and dirty method*/ public void PurgeUserProfile(string url_) { using (SPSite site = new SPSite(url_)) { ServerContext context = ServerContext.GetContext(site); UserProfileManager profileManager = new UserProfileManager(context); foreach (UserProfile profile in profileManager) { System.Console.WriteLine("Deleting " + (String)profile[PropertyConstants.AccountName].Value); profileManager.RemoveUserProfile(profile.ID); } } }