Master & Cmd-R

How to install & configure PDF iFilter for SharePoint Server 2010

This is something we do as a part of every SharePoint Server 2010 install – we have been unable to find any reliable instructions on how to do this, and this works for us every time.

Follow the steps below to install and configure PDF iFilter on SharePoint Server 2010:

  • Install PDF iFilter 9.0 (64 bit) from here.
  • Download the following PDF icon file:
Right click and “Save As”

And save it to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES\

  • Next you need to edit your docIcon.xml file so that PDF files will use that icon. Navigate to

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\XML\docIcon.xml
and add the following line:

<Mapping Key=”pdf” Value=”pdf16.gif” OpenControl= />

**Adding the OpenControl=”” option at the end of this line fixes a problem with SharePoint prompting you to open a PDF as Read-Only or Edit – thanks to David Kvas for his post on this!

A couple of things to note:

  • Be careful you don’t introduce rogue ascii characters (don’t copy and paste from the web page into the file without making sure the formatting has been removed). A good safe bet is to simply copy a similar line from where you plan to put the new line and make your changes that way.
  • Also, because this is an XML file, don’t just plunk this line at the top or the bottom of the file, it needs to go in the <ByExtension></ByExtension> section. Again, a good idea would be simply to find that section, and work your way down the list (it’s alphabetical) and insert the line in its proper order. That way you can be sure you haven’t put it outside of its XML tags – which can cause all kinds of issues (Application broken because of an extra character in your code that you can’t see no matter how hard you look? *raises hand*)

* Note: If the file is locked and you’re unable to save your changes, perform a quick IISRESET to take care of that – be careful not to interrupt your users.

  • Next, open the registry and navigate to the following location:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\14.0\Search\Setup\ContentIndexCommon\Filters\Extension

  • Right-click Extension, then click NewKey:


  • Name the Key .pdf


  • Now add the following GUID in the default value as shown in the figure below.
     

    {E8978DA6-047F-4E3D-9C78-CDBE46041603}


  • Open SharePoint Central Admin, and click on Manage Service Applications


  • Click on your Search Service Application:


  • Select File Types from the Crawling Menu on the left:


  • Select New File Type:


  • And type pdf into the File extension box, and click OK:


  • Once you click OK, it will take you back to the previous screen where you will now see the PDF file type showing up with the icon that you specified earlier in the first phase of this process:


    * Note: if the icon doesn’t show up immediately, you’ll need to do an IISRESET to reflect the changes you made to the docIcon.xml

  • Then restart the SharePoint Server Search 14 service as shown in the figure below:

    (Start-Run-services.msc, in case you forgot)


Finally, perform a fresh crawl of your site(s) to update the index and start showing PDFs – a full crawl is ideal, but if server resources are a concern, perform an incremental crawl at the very least.

  • To get a crawl running, go back into SharePoint Admin, and click on Content Sources under Crawling:


  • Selecting Start all crawls from this menu will perform a full crawl on all content sources:


    If you want to run an incremental crawl (or a full on specific sites) select that site’s drop down menu and choose Start Full Crawl or Start Incremental Crawl. Note that if you have chosen to run an incremental crawl because of time constraints or server load, you’ll need to select each site in your list and start an incremental crawl from the drop-down menu.


Friends don’t let friends use Claims Based Authentication

How to recognize if your site admin is using (claims based authentication)

Claims Based Authentication

* Thanks to Joris Poelmans’ slideshow: Claim Based Authentication in SharePoint 2010 for Community Day 2011,

This one’s pretty easy – as soon as you enable claims based authentication in SharePoint 2010, it attaches a coded ID to all the usernames that looks like this: i:0#.w|contosousername. This coded ID looks like a weird error to the uninitiated, but not to you – oh no! You know what it all means and are able to decrypt it using the following handy dandy decoder ring:

Take it easy, man… claims are fun!

From what I’ve been able to learn about it, claims based authentication has some interesting possibilities that make it worth exploring, but has a few major gotchas. For instance, once you’ve transitioned to claims based authentication, it’s a one way street – there’s no going back.

* http://msdn.microsoft.com/en-us/library/ff953202.aspx

Basically, as with any technology changes, if it’s set up properly it has a lot of new and shiny things that you can do – if set up incorrectly, it will cause a lot of headaches and will have you either blowing your application away and re-creating it, or restoring from your latest backup.

BGInfo errors in LogMeIn?

We’ve started seeing this error message on quite a few of the servers that we log into remotely – given that the error message talks about permissions and group policy, I started looking in that direction trying to find what had changed. The problem turned out to have nothing to do with group policy or user rights, but a setting in LogMeIn!
When you log into a server through LogMeIn, you get this error message:



I have verified that the problem occurs on a server through LogMeIn, but connecting to that same server with RDP will not throw up an error, and BGInfo fires just fine.
Thankfully, the fix is simple: Once you have the server selected, click on Preferences, then General:


Under the Remote Control option, uncheck the box to Disable wallpaper and user interface effects on host computer.

Hit Apply, and then go back to Remote Control and remind LogMeIn and BGInfo that yes, I am Yo’ Daddy!

 


Removing uninstalled (missing) devices in Device Manager

Thanks to Rob for this great tip – I had no idea this was possible, so hopefully there’s others out there who will find this useful!

When you physically uninstall a device in Windows, the device drivers are often not uninstalled and will remain in your Device Manager, even though it’s no longer visible. Removing the drivers for these ghosted devices can clear up a lot of weird issues caused by driver conflicts, or more importantly, prevent issues from occurring in the first place.

Up to this point, my standard procedure to remove these old drivers was to reboot the machine in Safe Mode, which allows you to see all devices and drivers installed on the machine, even if they’re no longer present. This of course has the downside of taking extra time, as you now need to reboot to get into Safe Mode, and then reboot one more time to get back out again. And with servers being what they are, this can sometimes add as much as half an hour to what is probably a fairly simple hardware upgrade.

Here it is…

Your first step is to open up a command prompt, and type in the following:

2-17-2012-9-34-19-AM-1.png

Starting the Device Manager from this command prompt is essential, as the command to show the missing devices only does it for that instance – if you leave this command prompt to open Device Manager it won’t show them!

Once Device Manager is open, click on View-Show hidden devices. In this case, we’re going to be removing an uninstalled Network adapter, so the only one that’s showing in the screenshot below is the one that is currently installed.

image.png

Voila! Along with some other hidden devices, we find the network adapters that were uninstalled.

image.png

(This is what Show hidden devices looks like if you haven’t run the command, or if you’ve mistakenly opened your Device Manager a different way – not from the command prompt. Note that while we can see the standard hidden adapters, we don’t see the ghosted ones like we do above.)

image.png

Now that we can see our ghosted devices, it’s a simple matter of right clicking on the device and uninstalling it:

image.png

Click OK  to confirm:

image.png

 

And you’re done! No need to worry about running another command to reverse this, because as soon as you close Device Manager it resets to its defaults of not showing ghosted devices.