none
Sharepoint 2010 Templates, Document Libraries not allowing to open .msg files only save RRS feed

  • Question

  • Hello,

    I recently created a template of a common site type that my company will use and while testing we noticed that if we put an outlook message file in the library it does not allow a direct "open" button when we click on the .msg file.  The only options it gives us is "save" and "cancel".  But the on the original site when the same exact file is uploaded and clicked it gives you the options "Open", "Save", and "Cancel".  We checked and this happens with any site we create a template with, not just this specific template.

    The template site we made has a:
    Doc Library, Task List, Calendar, and Notebook (for OneNotes).

    All of these are empty in the template with no files in them.

     

    Any help to get this open button to show would be greatly appreciated.

    Tuesday, March 15, 2011 6:05 PM

Answers

  • I think you'll need to check the setting on the Document library itself. In some versions it seems that you need to change the setting on the individual document library if the main site had strick permissions when the template was first created.

    Here's the answer from another thread, copied and pasted the specific answer below from Craig Lussier..

    http://social.technet.microsoft.com/Forums/en-CA/sharepoint2010setup/thread/95a9f8fa-3da6-4bb7-9983-2102910ff4aa

     

    I have run into this issue myself. In my case I had the following scenario:

    • Initially, my web application had 'Browser File Handling' set to 'Strict' (which is the default when creating a web application)
    • Created a site collection, then a custom document library, and saved it as a template
    • Created a new document library using the template
    • Changed the web application 'Browser File Handling' to 'Permissive'
    • Found that I still was prompted to save PDF files before opening in the document libraries created with my template. Document libraries created with the out-of-the-box templates worked as expected.

    I am sure there are more scenarios where this issue would surface, perhaps saving a web as a template before changing 'Browser File Handling'. Although I should do more testing for a complete list of scenarios, I needed to find out what was the cause. So I investigated.

    Each Document Library in SharePoint 2010 actually has a property titled BrowserFileHandling that is set based on the BrowserFileHandling selection at the Web Application level. In the scenario I described above, I have found that the inheritance of this property does not always behave as you would expect.  Using PowerShell (you could also use the object model) you can take a look at the BrowserFileHandling property at the Document Library level as this is not exposed in the UI.

    Here is some PowerShell to help and please note this is used in the SharePoint 2010 Management Shell

    #Get Web
    $web = Get-SPWeb "http://yourspweburl"
    
    #Get Document Library
    $docLib = $web.lists["Your Document Library Title"]
    
    #View all properties/methods of the Document Library and you'll see that BrowserFileHandling is a property
    $docLib | Get-Member 
    
    #See the current BrowserFileHandling setting for the Document Library
    $docLib.BrowserFileHandling
    
    #If you need to change it from Strict to Permissive
    $docLib.BrowserFileHandling = "Permissive"
    $docLib.Update()
    

    Even if the template scenario that I describe isn't your scenario you can certainly use the above PowerShell code to inspect, and if necessary, change the BrowserFileHandling property in a Document Library that is presenting the problem you describe.

    I hope this helps.

    C.

    • Marked as answer by Wayne Fan Wednesday, March 23, 2011 11:50 AM
    Thursday, March 17, 2011 9:56 AM

All replies

  • Did you by any chance create a new web application along with the new site?

    There's a setting for each web app that controls this setting.

    Go to central admin / Application Management / Manage Web application

    High light your web app and select general settings / general Settings.

    In here you will see an option for "Browser File Handling". You will need to set it to permissive to allow the open option to appear. 

    Tuesday, March 15, 2011 9:23 PM
  • No I did not.  This is on the same web app as every other site we have.  I have also tried this in our testing environment.

    1) I created a page with a document library

    2) Saved it as a template

    3) Created a site off that template

    4) Put a .msg file in the Document library

    5) The only options it gives are "Save" and "Cancel" when I click the .msg file

    6)Uploaded the .msg to the original site (the one the template was created from)

    7) When Original sites .msg file is clicked I get "Open","Save","Cancel"

     

    I know our sites are set to permissive.

    Wednesday, March 16, 2011 7:08 PM
  • I think you'll need to check the setting on the Document library itself. In some versions it seems that you need to change the setting on the individual document library if the main site had strick permissions when the template was first created.

    Here's the answer from another thread, copied and pasted the specific answer below from Craig Lussier..

    http://social.technet.microsoft.com/Forums/en-CA/sharepoint2010setup/thread/95a9f8fa-3da6-4bb7-9983-2102910ff4aa

     

    I have run into this issue myself. In my case I had the following scenario:

    • Initially, my web application had 'Browser File Handling' set to 'Strict' (which is the default when creating a web application)
    • Created a site collection, then a custom document library, and saved it as a template
    • Created a new document library using the template
    • Changed the web application 'Browser File Handling' to 'Permissive'
    • Found that I still was prompted to save PDF files before opening in the document libraries created with my template. Document libraries created with the out-of-the-box templates worked as expected.

    I am sure there are more scenarios where this issue would surface, perhaps saving a web as a template before changing 'Browser File Handling'. Although I should do more testing for a complete list of scenarios, I needed to find out what was the cause. So I investigated.

    Each Document Library in SharePoint 2010 actually has a property titled BrowserFileHandling that is set based on the BrowserFileHandling selection at the Web Application level. In the scenario I described above, I have found that the inheritance of this property does not always behave as you would expect.  Using PowerShell (you could also use the object model) you can take a look at the BrowserFileHandling property at the Document Library level as this is not exposed in the UI.

    Here is some PowerShell to help and please note this is used in the SharePoint 2010 Management Shell

    #Get Web
    $web = Get-SPWeb "http://yourspweburl"
    
    #Get Document Library
    $docLib = $web.lists["Your Document Library Title"]
    
    #View all properties/methods of the Document Library and you'll see that BrowserFileHandling is a property
    $docLib | Get-Member 
    
    #See the current BrowserFileHandling setting for the Document Library
    $docLib.BrowserFileHandling
    
    #If you need to change it from Strict to Permissive
    $docLib.BrowserFileHandling = "Permissive"
    $docLib.Update()
    

    Even if the template scenario that I describe isn't your scenario you can certainly use the above PowerShell code to inspect, and if necessary, change the BrowserFileHandling property in a Document Library that is presenting the problem you describe.

    I hope this helps.

    C.

    • Marked as answer by Wayne Fan Wednesday, March 23, 2011 11:50 AM
    Thursday, March 17, 2011 9:56 AM
  • The scripting worked like a charm thanks!!!  We always set our File handling permissions to permissive, but I never thought that a template would automatically set it to strict, but if that is a default setting.  Is there a way to make permissive the default setting?
    Friday, March 18, 2011 4:38 PM
  • I'm not familiar with PowerShell syntax, and I keep getting errors on the above script at

    #Get Document Library
    $docLib = $web.lists["Your Document Library Title"]

    The library I'm working with is a standard "Shared Documents"  default doc library on a team subsites.  The title is apparently "Documents" so I have tried all of the following:

    $docLib = $web.lists["Documents"]
    $docLib = $web.lists["Shared Documents"]
    $docLib = $web.lists["Shared %20Documents"]
    $docLib = $web.lists ["Documents"]
    $docLib = $web.lists ["Shared Documents"]
    $docLib = $web.lists ["Shared %20Documents"]
    $docLib = $web.lists"Documents"
    $docLib = $web.lists"Shared Documents"
    $docLib = $web.lists"Shared %20Documents"
    $docLib = $web.lists "Documents"
    $docLib = $web.lists "Shared Documents"
    $docLib = $web.lists "Shared %20Documents"

    I get the error "unexpected token..."

    Could you possible supply a real-world example with actual names so I can just substitute my names?

    ALSO, is there any way to change this setting in a subsite without using PowerShell?

    Thanks.

    Tuesday, May 17, 2011 7:34 PM