Skip to content

Author: John White

Opening PDF Files in SharePoint 2010

If you’ve installed SharePoint 2010, you may have noticed a change in behaviour of any PDF files that you may have stored. Previously, they would open directly in the browser, but now the user is prompted to save the file to the disk. This is due to a new security feature in IE8 that SharePoint 2010 respects. In order to allow the old behaviour, you must set the browser file handling options to “permissive” as opposed to “strict”.

This change is done at the application level. First, navigate to Manage Web Application within Central Admin, select the application in question, and choose General Settings on the ribbon.

image

Once in the settings screen, scroll down and find the section for Browser File Handling, and change it to permissive.

image

It goes without saying that this is less secure, but if you trust your PDF files, you should be good to go. Of course,as always,no warranties, express or implied…

Thanks to Mike Hacker’s Blog where I originally came across this.

UPDATE – SEPT 7 2010

I just ran across a case where this does not fix the problem. PDFs and all file types including HTML were prompting the user for download. This was not consistent, as it was happening in some libraries and not others. As it turns out, it’s a bit of a bug, and document libraries will not always inherit the browser handling attribute.

You can test this by running the following Powershell:

$site = Get-SPSite(“https://mysitecollection")
$web = $site.OpenWeb("/MyWeb")
$list = $web.GetList("https://myweburl/LibraryName")
$list.browserfilehandling
If it returns “Strict”, then you have a problem. The good news is, you can set it:
 
$list.browserfilehandling = “Permissive” ;
$list.update();
You should probably loop through your entire site collection and set this value to be safe. The powershell to do this can be found  on Nerdtastics Tips, which is where I found the fix in the first place.

 

UPDATE – SEPT 10 2010

As opposed to hunting through your sites to find the problems, I wrote the below PowerShell script that take the URL for the site collection as an argument, and sets the permissive flag on any lists set to strict.

Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue
$siteURL = $args[0]
$webname = $args[1]
$site = Get-SPSite($siteURL)

foreach ($web in $site.AllWebs) {
    Write-Host "Inspecting " $web.Title
    foreach ($list in $web.Lists) {
        if($list.browserfilehandling -eq "Strict") {
            Write-Host "Changing " $list.Title
            $list.browserfilehandling = "Permissive";
            $list.update();
            $site.url,
            $list.title,
            $list.browserfilehandling
        }
    }
}

UPDATE – OCT 5 2010

I’ve run into more situations where this doesn’t solve the problem. I created a new post describing them here.

18 Comments

Format an HTML Safe String using .NET

I’m posting this as much as a reminder to myself as anything. I infrequently find myself needing to make sure that a string is safe to use on the web in any number of scenarios. The .Net framework contains a function to do just that, but they’ve cleverly hidden it away in the security assembly. That’s why I needed to write this – I use it infrequently enough that I can never remember where it is.

To use it, just make a call to:

System.Security.SecurityElement.Escape("text to encode")

And that will do the trick "&" becomes “&amp;”, “<” becomes “&lt”;, etc.

Leave a Comment

Installation Considerations for Reporting Services in SharePoint Integrated Mode

Ever Since SQL Server 2005 R2, it has been possible (with varying degrees of difficulty) to tightly integrate Reporting Services with SharePoint. What this means is effectively discarding the management and user interfaces that come with a Reporting Services native mode installation, and managing and use all reporting through the SharePoint interface.

This has really nice benefits for those managing the Reporting Services environment, mainly because you can simply leverage your SharePoint storage and security infrastructure instead of having to create and maintain another one simply for reports. Users benefit from a consistent user experience, and are easily able to create filtered reports through the Report Viewer web part.

Integrated mode is however not without its complications, and with the release this week of SQL Server 2008 R2 (which includes some very nice Reporting enhancements), I thought that I’d go over them. Here are some of the more important moving parts:

  • Reporting Services Add-In must be installed on EACH front end web server in the farm
  • Reporting Services database must be created in SharePoint integrated mode
  • Anonymous access must be disabled for the target application
  • The machine hosting Reporting services must be a member of the SharePoint farm

If everything that you’re running is on a single server, you really don’t need to read any further. In that scenario, everything is straightforward. But if you’re not on a demo system, or you have more than 3 users, chances are that your farm is distributed, and least broken out into one Web Front End (WFE) and one SQL Server.

As I’ve mentioned previously,The Reporting Services add in now installs as a prerequisite with SharePoint 2010,which makes the first point a no brainer. However, if you have SharePoint 2007 and multiple web front ends (your query servers count), you need to install the add in. Also if you add a new Front End server down the road, don’t forget the add in.

If you’re currently have a Reporting Services server running in native mode, and you’re looking to upgrade to SharePoint Integrated mode, don’t expect an enjoyable experience. You can’t upgrade your existing native mode database to integrated mode, you’ll need to export everything, create a new database in integrated mode, and move everything into it. You can however switch back and forth on the server side if you need to, but as you do, it’s all or nothing.

One thing that I wanted to do was to take an election results analysis demo that I’ve recently done with SQL Server 2008 R2 mapping and expose it to the world. Unfortunately, that’s not going to be an option because you can’t run the application in anonymous mode with the plug in. If you have this requirement, then Integrated Mode is not for you.

Finally, the big requirement is that the machine running Reporting Services must be a member of the SharePoint farm. Typically you only install the SharePoint bits on the WFEs and the Index servers, and the SQL Server itself is left alone. Basic guidance from Microsoft indicates that now you need to install the SharePoint bits on the SQL server and then join the farm. This may be daunting to those that have yet to “enjoy” the challenges of running a multiple WFE farm. It also might be a particular challenge if you don’t “own” the SQL server itself.

My preference (typically, not always) is to take the other approach, and install Reporting Sevices itself (none of the other services, database engine, etc) on one of the SharePoint front end servers. In our case, we have a 3 server farm (one front end, one indexer/query/central admin, and one SQL, and Reporting Services is on the Indexer/query/central admin box (I need a better name for it).

In this scenario, the Reporting Services databases themselves still live on the main SQL server, but the services and rendering all happen from the WFE machine. This makes for a very low touch solution in terms of your SQL server, and is much easier to maintain. This model also also allows you to get going with the new features available in SSRS R2 without having to first upgrade your central SQL server.

One caveat – with 2007, I always found that it was a requirement to also run the Central Administration application on the machine with Reporting Services. I don’t know if that was a true limitation, or something that I was missing. I haven’t yet tried it using R2 and 2010, but when I do, I’ll come back here and update this. Also – if you know something I don’t, please feel free to enlighten me!

5 Comments

How to Completely Remove All Traces of Office 2010 From Your System

I’ve just made it through a pretty nasty problem with Office. I had been running the beta version, and had updated it to the RTM version available on MSDN. Yesterday I got a message saying that it was going to expire in 2 days. I tried changing my product key, but it wouldn’t accept my (legitimate) key. I did notice one odd thing that the version numbers were mismatched at various areas of the system – both 14.0.0460 and 14.0.0463 were showing. As it turns out, that had nothing to do with it, as this is expected behaviour, but I decided to do a full uninstall and reinstall.

After reinstalling, every one of my Office applications wanted to run through configuration every time they started. This problem, as it turns out is not new, and there are unfortunately many possible causes, and as many solutions. I tried many of them. I did have the registry permissions problem with HKEY_CLASSES, and walked through the solution outlined here. It helped me with OneNote and Outlook, but Word and Excel were still problems. Uninstalling and reinstalling (multiple times) didn’t help at all.

Luckily,(for me) a colleague had some really nasty problems last year that required him completely removing Office 2007 from his computer. After speaking with Microsoft support,he received a utility that was to do the job, and it worked well.  I thought I’d give it a whirl. Unfortunately, it only wiped 2007 not 2010, but luckily, it’s a vbs file and therefore editable.

After removing all 2007 and 2010 applications from control panel, I ran the 2007 utility, which found and removed lots of stuff. I copied the file and then edited it to be relevant for Office 2010. I then ran it, and it did its magic, with a few errors related to the removal of unrelated temp files. A reboot, a reinstall, and I’m up and running again. Nice – I wasn’t looking forward to the idea of repaving my system.

I”ve included both of these removal utilities here.  No warranties are expressed or implied, they may help or hurt,  they may make your system catch on fire, and if they do, don’t blame me. All I can say is that they worked really well for me.

136 Comments

Truly Great Software – JRiver Media Center

Anyone that knows me knows that I like my media. Books, music, movies, you name it, and the more that I can get digitally, the better. Years ago, when I was amassing MP3 files at a pretty good clip, it became pretty obvious that I was going to need a good tool to keep them organized. I used a few tools, and then happened upon a product from JRiver called Media Jukebox that completely fit the bill, and I pounced on it. At the time, it was Version 8.

Over the years, my requirements changed,and the product changed along with me,becoming renamed Media Center for its version 11 release. I started using lossless files, and lossless support was added. Digital photos became a big deal, and they offered incredible support for digital pictures. I acquired a portable music player, and of course sync support for that was baked right in, along with excellent support for podcasts, both audio and video.

I originally gravitated to Media Center as a tagging tool. It makes tagging music, images, movies, whatever a breeze, adhering to all published standards while allowing you to extend its schema as you see fit. However, it’s also a full featured player. While some of the other market players are just figuring out a client/server model, I’ve been able to stream content from my collection at home to my JRiver client since 2003, simply by turning on its Media Server feature.

In the current version, it can do not only that, but you can control your player using and browser enabled device, or ever stream music straight to a handheld device using only that devices built in tools to play the stream. It’s also a fully fledged DLNA (the successor to UPnP) device, both as a client and a server.

I recently began a project of getting my photos tagged and organized, and shared out to the web. I of course turned to Media Center, which has not let me down. Not only can I leverage its powerful tagging features, but it also allows sharing out to social networking sites like Facebook and Flickr, or online storage systems like Gallery, and they even host a photo sharing server should you wish to use that. All of the photos posted to my Flickr account get their through Media Center, with all keywords intact.

To underscore all of this, I bought my son an iPod Touch for Christmas. I was a little shocked to learn that I was FORCED to install and use iTunes in order to even turn this thing on. Once done, I was struck with how limited and limiting it was. Surely Apple, the “king” of UI could come up with a decent experience. The device itself is fine, but about half of my collection is rendered useless. Why? Because about half of my collection uses the standard FLAC file format which iTunes doesn’t support.

I have an iPod Classic 160 GB that’s never seen iTunes – it’s the way I like it. JRiver’s iPod support is unparalleled (they can’t support the iPod touch or the iPhone because Apple won’t let them). It syncs both my audio and video, no matter what the format with ease, and gives me a complete set of options for auto conversion, including which encoders to use, and how to do the conversion. My synchronization lists are my playlists so I don’t even need to think about it – it just works.

Finally, I can output to more than one sound card simultaneously. In my case, I have a Russound 6.6 distributed sound system. Which distributes audio through the house. Two of the Russound inputs are fed from Media Center, which has a “his” and “her” zone set up. Another zone is set to play in the main living room. Everyone is happy…..

Support is also fantastic. They use a discussion board for this purpose, and you often get answers to questions within the day, either from JRiver staff, or by other users. It’s also an avenue for feature requests. When the library server was in development I wound up in a fair bit of back and forth with their engineer who ultimately implemented everything that I needed to make it work.

It does all of this for a price tag of $50. I honestly don’t know how they make this viable as a software company, but I’m really glad that they do. It’s really my Swiss Army knife of media tools. I strongly urge you to visit their web site and give it a try. They have a fully functional 30 day try and buy program. If you try it, you’ll but it.

Leave a Comment