Crawling PDF files in MOSS Search

MOSS Search is great because it not only crawls documents for search results, but it crawls the content inside the documents as well.  However, MOSS “out-of-the-box” will not crawl the content of PDF files.  Have no fear!  I wouldn’t be writing this blog if I didn’t know the steps to the solution.  Check out the following process:

The first step is to download and install the Adobe iFilter http://www.adobe.com/support/downloads/detail.jsp?ftpID=2611

Before you run the installer on the server where your MOSS is located, stop the IIS Admin service by running IISReset /stop from your Command Prompt.  After the iFilter is finished installing, start the IIS Admin service by running IISReset /start.

Next go to your Shared Services site under SharePoint 3.0 Central Administration
 
Then click Search Settings under Search.
 
On the next screen, choose File Types.
 
Add the .pdf file type to the index list. In the box, simply type pdf.
 
You may also want the PDF icon to display within the search results itself.  Currently this icon is not available within SharePoint.  It is very easy to grab though.

Download the PDF icon (select ’small 17 x 17′) from http://www.adobe.com/misc/linking.html

Name the icon “pdficon.gif”.

Save the icon in the following location: c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\Template\IMAGES

Next you will need to edit the .xml file that SharePoint uses to map file types to icons. This file is the DOCICON.XML file.  It is located here:  c:\Program Files\Common Files\Microsoft Shared\Web server extensions\12\Template\Xml\DOCICON.XML

Open the XML file in Notepad or SharePoint Designer.   Add the following code in the <ByExtension> section:  <Mapping Key=”pdf” Value=”pdficon.gif”/>.  Save the file.

Run iisreset from your command prompt.  When that is finished, run your Search crawls.  Now you should be able to search the contents of PDF files and have a PDF icon as display as the document image.

 

IE 7 Login Prompt after Installing MOSS

After you have freshly installed MOSS, you want to go check out the site collection you created.  When you type in the site of your SharePoint site, you get a login prompt all of sudden.
 
This can be really annoying to have to log on again every time you want to go to SharePoint.  There is a simple fix for this.  Open up a fresh Internet Explorer and click on Tools >> Internet Options.
 
While in Internet Options, click the Security tab.  Highlight the Local Intranet icon.  Then Click Sites.
 
For the next pop up after you click sites, choose Advanced.
 

Then enter the name of your SharePoint site.  Make sure the box for “Require server verification (https:) for all sites in this zone” is unchecked.  Click Add.

 

Internet Explorer 7.0 by default changed their security settings from previous IE versions.  Now that you have added your SharePoint site to the Local Intranet you will be automatically logged in with your current user name and password every time you access your SharePoint sites.  These instructions are good for any of your users that will access MOSS within your company.

Changing the Max Upload Size

By default SharePoint allows a maximum file size of 50MB that can be uploaded into any document library.  Depending on your situation, this might be too much or too little for your needs when uploading. To change the maximum file size, do the following:

 Go to SharePoint Central Administration >> Application Management tab.

Under the Office SharePoint Server Shared Services section, select Create or configure this farm’s shared services.
 

Select your web application that you would like to change.
 

On the next page, go to the Maximum Upload Size section and enter your desired max upload size

 

The maximum upload size that MOSS will allow is 2047 MB. 

If you increase the file size limit, your site might occasionally time out for users while they are uploading files. To accommodate this increase the default time out property for IIS.   Now you have successfully restricted or increased the size of uploads for your MOSS site.  You can repeat this process if you have multiple web applications for your site collections.

Error 1330: corrupt cab file during Visual Studio 2008 installation

What happened to me recently was while installing Visual Studio 2008 Team Edition in a demo virtual machine I got an error saying “Error 1330:  A file that is required cannot be installed because the cabinet file DRIVELETTER:\SOMEPATH\cabNUMBER.cab has an invalid digital signature.  This may indicate that the cabinet file is corrupt.”.

I was trying to install Visual Studio 2008 in an existing Virtual Machine on Virtual Server 2005 R2.
At first I thought it was happening because I mounted the .iso image over the network, however when this happened a second time with the ISO image on my harddisk I figured that that couldn’t be the issue.
For the installation the third time I chose ‘custom’ instead of the ‘default’ option.

I went through the list of options that were there and unchecked the option C++ and SQL Express and the installation was successful after that. You can always install SQL Express afterwards if you want to, even download it from Microsoft’s website. I really didn’t need SQL Express or C++ – so in my case I was actually happy that I was forced to look over the options.

From the various posts I have been reading it has something to do with the way an .iso is mounted and the software you use. Different people have had success with using other software to mount the iso image.
Since I was just using the built in Virtual CD/DVD drive it could be that there is some kind of an issue with that.

If you found some other solution for the problem or the solution mentioned above worked, leave a comment and tell others about it!

 

Missing Web Parts for My Site

For MOSS, there are a number of web parts available that you do not have in WSS 3.0.  These web parts can be used with any site including the My Site function for each individual.  A friend of mine wanted to use a very common one known as the Page Viewer web part for his personal SharePoint site.

So he simply ran through the steps.  He went to Site Actions >> Edit Page.  He selected the zone where he wanted to place his web part and went to the Add Web Part list.  The Page Viewer web part is located in the Miscellaneous section.  When my user went to this section, it wasn’t there!

 

There was only one web part under Miscellaneous known as Contact Details.   This can be a common issue for any site.  But there is a simple solution.  You need to activate certain functions for sites.  For the purpose of My Sites, here is what you can do.

Go to Site Actions >> Site Settings.

Go to Site Collection features under the Site Collection Administration column.

 
You will see that some features are active and others are not.  
 

If you want to play it safe, activate all of the features.  This will give you the ability to use all the web parts and features that MOSS has to offer. Otherwise, activate the ones you need.

 

Now when my user went back into editing the page, he found his Page Viewer web part under Miscellaneous and many others. 

 

For a future reference, if web parts are not available on a Site Collection, have the site collection administrator activate features.

 

Turn Off Custom Errors in SharePoint

There will come this time, either in development or maybe even in production when you are presented with that annoying ‘friendly?’ error page that SharePoint displays when there is an issue somewhere in the code.

SharePoint Friendly Error message

Of course this makes debugging a pain, however – there is a solution to turn the ‘friendly’ SharePoint error messages off and get the ASP.NET error message along with the call/stack trace outlining the issue.

By making two quick adjustments to the web.config file for the particular site we can turn the ‘friendly’ SharePoint Error message on / off.

  1. Follow the following instructions to do so:
  2. On the Web server, navigate to the site directory: [Drive Letter]:\Inetpub\wwwroot\wss\VirtualDirectories\[directory for site]
  3. Make a quick backup of the web.config file (simply copy / paste the file in the same directory)
  4. Open the web.config file in Notepad.
  5. Search for “CallStack”. Change the CallStack status to “true”. Example: <safemode maxcontrols=”200″ callstack=”true” directfiledependencies=”10″ totalfiledependencies=”50″ allowpageleveltrace=”false”>
  6. Search for “CustomErrors”. Change the mode to “Off”. Example: <customerrors mode=”Off”>
  7. Save and close the file.

And there you go, now you will see the the ASP.NET error message along with the call stack/stack trace screen outlining the issue.

To turn the SharePoint ‘friendly’ error messages back on, just walk through the steps setting the CallStack to “false” and customErrors mode to “On”.

Removing Specific Lists and Libraries from Search

As a user is working in SharePoint, a number of lists and libraries can be created.  These lists or libraries might not be relevant for everyone.  But due to the nature of MOSS and how its search crawls sites, these irrelevant lists or libraries will show up in search results.  Here is a simple but often overlooked function to optimize search results for your users.

Go to your list or library you want to exclude.  For example, I will be using list of Links that was created.  Once in the Links list, I click on the Settings drop down and choose List Settings.
 
Go to Advanced Settings under the General Settings column on the next page.
 
On the Advanced settings page, go to the Search section and choose the “No” radio button for “Allow items to appear in Search results”. 
 
Now, this list will be excluded from your next search crawl.  This will assist your users in getting the most relevant search results and they won’t have to drudge through miscellaneous lists and links.  Anyone with the appropriate permissions is able to set these criteria in the advanced settings.  Hopefully, this will save a headache for your SharePoint site administrator since I know how much you all love to give these guys tasks to do.

Can't See Documents Due to Automatic Check Out

The other day I came across an issue with a user.  My user was uploading a number of documents by the click and drag method that I have discussed in a previous blog about mapping a shared document location.  He had all the permissions set up correctly for other MOSS user to view his documents.  However, he was the only one that could see the documents he uploaded.  He was using the out-of-the-box Document Center that comes included with the Collaboration Portal site template.

As with any concern with a document library, it is always good to start with the Document Library Settings. 

Go into your Document Library in question.  Click on the Settings drop down and select Document Library Settings.

 

On the next page, select Versioning settings from the General Settings column.

 

On the Versioning settings page, you will see options for setting up content approval as well as version settings.  For this blog, we will pay attention to the last setting known as Require Check Out.  To turn off all the documents being automatically checked out to the user uploading, select No for Require Check Out.

 

Now all the documents my user uploaded are visible to everyone he has set a viewing permission for. 
Required Check Out can be useful to assist in keeping changes limited to one user at a time.  However, for my user it became a pain because he was uploading 20+ documents at a time and then he had to check them in individually.  Experiment with it to see what works best for your SharePoint environment.

Adding Multiple Announcement Web Parts on the Same Page

On a number of the site templates such as Team Site, you will find that you get an Announcement web part to begin with.  After you have used the Announcement web part that the SharePoint template provides for you, you may decide you have another list of Announcements to add. 

So as the site administrator, you go to Site Actions >> Edit Page.  You then figure out which web part zone you want to add your new Announcements web part to and click “Add a Web Part”.   In the “List and Libraries” section, you simply click Announcements and hit OK to add this as a new web part.

 

Seems simple enough, right? …………..  WRONG!  The web part you have added is tied to the same announcements list as the first one.

This will actually duplicate the default Announcement web part that the site template provided for you.  You need to take a couple of different steps to add a different Announcements web part to the same page.  What you need to do is to create a new announcements list first.

Go to Site Actions >> Create


 

Choose Announcements from the Communications section.

 

Give it whatever name suits the purpose of the announcement.  For this demonstration, I will name it Announcements2.  Click Create.

Now go back and go thru the original steps I described earlier. 

Site Actions >> Edit Page >> Add a New Web Part. Now I can see both my existing Announcements and my new Announcements2.  Choose your newly created Announcements2 or whatever you named it and add you content.

 
For a future reference, when you’re adding a web part, the List and Libraries section is directly linked to any lists or libraries you have created within your site.  They will be there if you choose to show them as web parts.  The world of SharePoint makes sense again!