title: How to ensure Sharepoint form link opens in browser?
body: <p>We have SharePoint 2013 testing and production environments.  A site in the test environment has a form library with template, some workflows, and some forms.  The same template and workflows are applied to a form library in the production environment.  A certain workflow results in an email being sent which contains a link to that form ([%Current Item:Encoded Absolute URL%]); so link points directly to the form .xml file.  </p>
  
  <p>When the link from the email from the test system is opened via Internet Explorer, the form is displayed in the browser.  When the link from the email from the production system is opened via Internet Explorer, the user is prompted to download the .xml file to fill out and submit viq InfoPath Filler.  To be clear, this differing functionality happens on the same machine, same installation/configuration of IE.  The links appear syntactically identical.  So I naturally suspect a server setting.</p>
  
  <p>I have spent a good piece of the day researching this.  These were some of the more useful sources I found.</p>
  
  <ul>
  <li><a href="https://social.technet.microsoft.com/Forums/en-US/c09297c2-69f5-4db5-a70a-1d533e485d43/link-of-a-email-to-infopath-form-to-open-in-browser" rel="nofollow noreferrer">link of a email to infopath form to open in browser</a></li>
  <li><a href="https://msdn.microsoft.com/en-us/library/ms772417.aspx" rel="nofollow noreferrer">Use Query Parameters to Invoke Browser-Enabled InfoPath Forms</a></li>
  <li><a href="http://www.bizsupportonline.net/blog/2014/what-is-sharepoint-form-library.htm" rel="nofollow noreferrer">Fill out InfoPath forms via the browser vs. InfoPath Filler</a></li>
  </ul>
  
  <p>I was able to narrow down that the issue is only occurring in environments where InfoPath is installed, and when Internet Explorer is the browser being used.  Otherwise the form always opens in the browser as we want.</p>
  
  <p>Things I've verified:</p>
  
  <ol>
  <li>Adding "?OpenIn=Browser" to the link will force IE to open the link in the browser.  But the emails sent from the test environment don't require this; leading me to think it's server-configuration based and that I can do something else.</li>
  <li>The form library has the "Opening Documents in the Browser" setting set to "Open in Browser" in production - but IE still prompts to download the .xml.</li>
  <li>The Site Settings have the site collection feature "Open Documents in Client Applications by Default" deactivated.</li>
  <li>The InfoPath form itself is a "Web Browser Form," so should be (and is) render-able in a browser window.</li>
  </ol>
  
  <p>I've also looked at similar questions here on SO, such as <a href="https://stackoverflow.com/questions/1743313/get-a-sharepoint-infopath-form-to-load-in-the-browser-from-a-task">Get a SharePoint InfoPath form to load in the browser from a task</a>, but haven't found the key yet.</p>
  
  <p>I've found a number of references to this issue in SharePoint 2007-2013, with most people suggesting to just add "?OpenIn=Browser" or some other query string parameter to the link.  So I have a workaround - but one environment works, and the other doesn't, and I'd really like to nail down what the actual issue is.</p>