I guess the real question is can I get rid of these lines in Response Header:
X-Download-Options: noopen
and
Content-Disposition: attachment; filename=...
so I can actually see an HTML page run inside iFrame? As you will see in my code I got anonymous access and browserFileHandling, but still, the browser only offers the file for download...
public void setPermissions(String listName, SPWeb web)
{
try
{
web.AllowUnsafeUpdates = true;
web.Update();
SPList list = web.Lists[listName];
list.BreakRoleInheritance(false, false);
list.Update();
list.AnonymousPermMask64 =
(SPBasePermissions.Open |
SPBasePermissions.UseClientIntegration |
SPBasePermissions.OpenItems |
SPBasePermissions.EditListItems |
SPBasePermissions.ViewFormPages |
SPBasePermissions.ViewPages |
SPBasePermissions.ViewListItems |
SPBasePermissions.BrowseDirectories |
SPBasePermissions.BrowseUserInfo |
SPBasePermissions.UseRemoteAPIs );
list.BrowserFileHandling = SPBrowserFileHandling.Permissive;
list.DefaultItemOpen = DefaultItemOpen.Browser;
list.Update();
web.AllowUnsafeUpdates = false;
web.Update();
}
catch (Exception ex)
{
//...
}
}
When I use Fiddler and filter the Response Header it works great... Help!