Wednesday, January 4, 2012

SharePoint Issues with HTML files

Scenario:
I have migrated few HTML files from MOSS Document Libraries to SP2010 Document Libraries. On click of these HTML files , I am getting a download file prompt.

In MOSS , there is no such issue. Click HTML file renders the file.

Reason:
SP2010 has restrictions on displaying or opening some files. This was not the case in MOSS 2007.

Solutions:
Revisit HTML files and try converting them to ASPX pages. This is highly recommended.

OR

From Central administration > Web Application General Settings > Check the "Browser File Handling" to "Permissive" for that web application. This does open some holes. Recommended only in intranet type scenario's.

Article:
Understand permissive option

1 comments:

Thomas Møller Jørgensen January 12, 2012 at 5:19 PM  

The same problem exists for PDF files. For PDF files a solution (or workaround) that does not require you to open security holes can be found here. I have not tried it with HTML files, but it could probably be made to work. This method also has some limitations, such as the need to place some javascript on the pages from which the PDF (HTML) files will be opened. But nothing comes free...