SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We've been looking at enabling the Permissive File Handling in Central Admin of our SharePoint 2010 on an intranet site collection. However, we're wondering if we can allow specific file types to be rendered: In our case, we need users to be able to upload and display *.HTML files in the iframe web part. Is this possible or is it all-or-nothing?

Unless we set it to Permissive, SharePoint offers to let us download the HTML file rather than rendering it in the iframe.


share|improve this question
up vote 3 down vote accepted

Wrote a blog on this some time back:

So basically there are two modes for file handling in SharePoint 2010. "Strict" and "Permissive". Strict mode entails that only the trusted filetypes in the web application are opened in the browser. For all the rest of the filetypes the response will include a "X-Download-Options: noopen" header. This header will basically instruct the browser not to open the file inline. When the mode is Permissive, no such restriction will be placed on the files. If a file lives inside SharePoint, then it will be displayed inline by the browser.

You can create a hybrid approach by keeping the Browser file handling mode as "Strict" and using the SPWebApplication.AllowedInlineDownloadedMimeTypes property of the web application to specify which file types are trusted in your web application.

share|improve this answer
Please try to provide a little summary, backed with link to your blog. – Falak Mahmood Jul 8 '12 at 22:21
It's an interesting trick to use the *.aspx on the *.html file; it fools SharePoint into rendering the page without using Permissive file handling. – Alex C Jul 9 '12 at 5:47
@ AlexC Glad I could help @FalakMahmood No problem. Updated the comment. – Vardhaman Deshpande Jul 9 '12 at 6:00
Great @VardhamanDeshpande – Falak Mahmood Jul 9 '12 at 6:47

Use AllowedInlineDownloadedMimeTypes

Here is code for a single web app in PowerShell

$webApp = Get-SPWebApplication

Or for all in C#

SPFarm farm = SPFarm.Local;
SPWebService service = farm.Services.GetValue<SPWebService>("");

foreach (SPWebApplication webApp in service.WebApplications)
share|improve this answer
Thanks, Per Jakobsen. Is it possible to do this in server-side code rather than PowerShell? – Alex C Jul 9 '12 at 6:48
Yes. I've added code for enabling it on all WebApps using c# in answer. But often you'll put it in a feature receiver of a WebApp scoped feature in that case you get the webApp from the Parent property – Per Jakobsen Jul 9 '12 at 7:05
Very nice. Thanks, Per Jakobsen :) – Alex C Jul 10 '12 at 12:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.