IT Nota

  • Home
  • How To
  • .NET
  • WordPress
  • Contact

How to Serve Outlook File Type on IIS

If you need to have Outlook File Template (.oft) to open via a click on a landing page, be aware that .oft is not part of the default mime types and it has to be manually added. If you try to open an OFT link with default settings, you will be getting a 404 error.

IIS 404 Error Message

You can add the Mime Type via IIS Manager or directly editing the web.config file in root directory.

Adding MIME Type from IIS Manager

  1. On IIS, click on the site application on the left pane and double-click on the MIME Types icon.

    MIME Types Settings Icon on IIS

  2. On the right pane, click Add… and type in the extension for File name extension: and the application type under MIME type:. In this case, you want to type in “.oft” and “application/vnd.ms-outlook” (without quotes) respectively.

    MIME Types Settings on IIS

  3. Click OK and restart IIS.

Adding MIME Type Directly to web.config

The second way to add a MIME type is by directly modifying the web.config file under your root directory. Adding one line on top of the web.config from the ETags configuration example, we just need to add one line as highlighted in example below:

<system.webServer>
  <staticContent>
    <mimeMap fileExtension=".oft" mimeType="application/vnd.ms-outlook" />
      <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="5.00:00:00" setEtag="false" />
  </staticContent>
</system.webServer>

Typically you want to also include Outlook MSG File (.msg) in your MIME Types. In this case, you just need to add another line in your web.config file like so:

<system.webServer>
  <staticContent>
    <mimeMap fileExtension=".oft" mimeType="application/vnd.ms-outlook" />
    <mimeMap fileExtension=".msg" mimeType="application/vnd.ms-outlook" />
      <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="5.00:00:00" setEtag="false" />
  </staticContent>
</system.webServer>

Keep in mind, even if you add MIME types with IIS Manager, it will modify the web.config so you only need to choose either one, not both.

Further Reading

How do I open Outlook Template Files in the client application from a document library?
Opening .msg e-mails in Outlook from a SharePoint 2010 document library.
MIME Types
How to Serve AVIF Image on IIS
How to Serve WebP image on IIS

March 6, 2015 Filed Under: How To Tagged With: IIS, Internet Information Services, Microsoft, Mime Types, Windows Server

Buy me a coffee Support this site
Buy Me a Coffee?

Categories

  • .NET
  • Coding
  • Cybersecurity
  • Database
  • How To
  • Internet
  • Multimedia
  • Photography
  • Programming
  • Resources
  • Review
  • Tips and Tricks
  • Uncategorized
  • Use Case
  • WordPress
  • Writing

Recent Posts

  • How to View Stored Procedure Code in SQL Server
  • How to Find a String in SQL Server Stored Procedures
  • How to Remove Cached Credentials without Rebooting Windows
  • ESP Work Automation: Empowering Enterprises with Streamlined Workflows and Operational Efficiency
  • How to Search for a String in All Tables in a Database

Recent Posts

  • How to View Stored Procedure Code in SQL Server
  • How to Find a String in SQL Server Stored Procedures
  • How to Remove Cached Credentials without Rebooting Windows
  • ESP Work Automation: Empowering Enterprises with Streamlined Workflows and Operational Efficiency
  • How to Search for a String in All Tables in a Database

Tags

.NET .NET Core AdSense ASP.NET Cdonts Dll Classic ASP Code Editor ETL FSharp Genesis Framework Git Google HP Asset Manager HTML5 Hugo IIS Information Security Internet Internet Information Services iOS JAMStack Linux macOS Microsoft Microsoft SQL Server MVC PHP PowerShell Python Simple Mail Transfer Protocol Smtp Server SQL SQL Server SSIS SSMS SSRS Sublime Text Visual Studio Visual Studio Code VPN Windows Windows 8 Windows 10 Windows 2012 Windows Server

Copyright © 2011-2025 IT Nota. All rights reserved. Terms of Use | Privacy Policy | Disclosure