Ok – let’s say you’re in SharePoint 2010 and you have a document library with a bunch of PDF files in it. Every time you click on one of them, instead of opening it in the browser, you get prompted with a dialog that says “How would you like to open this file?”, followed by radio buttons that give you only Read Only and Edit choices.

Then, you search the internet till your fingers are blue. You find items that tell you to:

  • Set Browser File Handling (Central Admin) to Permissive
  • Set the Library setting ‘Opening Documents in Browser’ to “Open in the browser”
  • Add ‘OpenControl=””‘ to the pdf mapping in the docicon.xml file in Sharepoint Root
  • also you add the url to safe sites in IE

You’re frustrated at this point because nothing works, even after resetting IIS.

Well, try this one last thing – go to PowerShell (SharePoint 2010 Management Shell) and type in these lines, one by one:
$var = Get-SPWebApplication “http://YourWebApplicationName/”

Then, reset IIS one more time – – at least, for me, that did it. Mileage may vary – Hope you have good luck with this.