In sharepoint 2003 (and 2007 I believe) when I put an HTML file in a shared folder I could visit it's URL and view it as a website.
With Sharepoint 2010 the 'attachment' content-disposition header is sent and I can no longer do this (the HTML file is downloaded rather than viewed).
I really want to make a micro site using data from a Sharepoint 2010 'list' (consumed via AJAX and the XML-RPC Sharepoint 2010 offers) but obviously this makes it difficult. Does anyone know how I could achieve this?
(PS. I need the full screen real estate for this microsite, so using HTML from within shar开发者_Go百科epoint would seem like a bad idea)
To get the HTML file to display instead of download you need to set the Browser File Handling setting in the General settings page for a web application in Central Administration. If this is set to 'Strict', then it will only open files with an OpenControl entry in the docicon.xml file. Try to set it to 'Permissive'.
I discovered that by giving an html file the .aspx
extension, sharepoint will serve the document as html inlin, rather than as an attachment. Hope this helps someone else :)
精彩评论