I stumbled onto this last week. A customer had a newly installed SharePoint 2010 farm and they got a complaint from an end user that they couldn't open non Microsoft documents. They only get the option to save or cancel. The screenshot below shows what happens when you try to open a PDF file from SharePoint 2010 in Internet Explorer 8.
Of course SharePoint's a lot less fun without that tight integration with documents that we've all grown to know and love. It was certainly a step backwards for this customer, as they could open these documents directly from SharePoint 2007. I hadn't seen this yet myself, so I did some investigation. I was able to reproduce the behavior in IE8. However, I noticed I was able to open the same document with Firefox. I discovered the behavior was caused by a new setting in SharePoint 2010, Browser File Handling. This setting is a security that prevents some active documents, like HTML and PDF, from ever being automatically loaded in a client application when clicked in SharePoint. The default setting in SharePoint 2010 for Browser File Handling is "Strict" which causes this behavior. If we change the setting to "Permissive" then we're able to open these documents directly like we expect to. This setting is set per web application in Central Admin in the General Settings shown below.
Since this setting is scoped at the web application level, it needs to be changed for every one of them. That's where PowerShell comes in handy. This setting can also be changed there. Web SPWebapplication object has a BrowserFileHandling property that corresponds to this setting. The following PowerShell will display its value for all the web applications in your farm:
Get-SPWebApplication | Select url, browserfilehandling
We can also use PowerShell to change that value for all of the web applications in the farm. This PowerShell code will do that:
Get-SPWebApplication | ForEach-Object {$_.BrowserFileHandling = "permissive"; $_.update()}
This changes the setting to "Permissive" then updates the web application. Here's how it looks:
It's that easy with PowerShell.
I hope this blog post has saved someone some frustration trying to figure out why they can't open up their documents directly.
tk