PRB: Internet Explorer Prompts User to Open/Save Office File Streamed from ASP


When you use an Active Server Pages (ASP) page to stream back the binary contents of an Office file, such as a Microsoft Word document or a Microsoft Excel workbook, you may be prompted to specify whether to open the file directly or save the file to a disk. This is expected behavior on a newly installed client computer. If you clear Always ask before opening this type of file in the dialog box, you are usually not prompted again. However, on some computers you always receive the prompt, even if you have cleared this option.


Internet Explorer checks both the settings for the Multipurpose Internet Mail Extensions (MIME) type and the file extension. When you are prompted the first time, it is because the EditFlags registry setting has not been set for that file type previously. If you clear the Always ask option, the EditFlags entry is made for that file type. However, because the URL points to an ASP file, Internet Explorer also looks at the settings for the ASP file type if one is registered on the system. If the ASP file type is registered, but has been configured to prompt, you receive the prompt regardless of the settings for the MIME type.


There are two ways to resolve the problem:
  • From the server: Append a question mark (?) to the end of your URL links so that Internet Explorer does not find the settings for the ASP extension. Your link may resemble the following:
    This solution is good if you cannot control settings on the client.

  • On the client: You can change the prompt behavior for the ASP file type so that it does not prompt by default when it is downloaded. To do this, follow these steps:
    1. On the desktop, double-click the My Computer icon to open the Windows Explorer.
    2. If you are running Microsoft Windows 2000, on the Tools menu, click Folder Options, and then click the File Types tab to view all file types.

      If you are running Microsoft Windows 95, Microsoft Windows 98, or Microsoft Windows NT 4.0, on the View menu, click Folder Options, and then click the File Types tab to view all file types.
    3. From the list of registered file types, look for Active Server Document associated with the ASP extension. If this is not present on your computer, your computer does not experience the problem described in this article. If it is present, select it and click Advanced (for Windows 2000) or Edit (for Windows 95, Windows 98, or Windows NT 4.0).
    4. In the new dialog box, clear Confirm open after download and click OK.
    5. Click OK to close the Folder Options dialog box.

More Information

Internet Explorer resolves whether to prompt for a downloaded file based on the file extension. If an ASP page is accessed and the ASP extension is registered on your computer, you will probably be prompted to confirm whether you want to open it if the content is not HTML, XML, GIF or JPEG (that is to say, if the MIME content type headers indicate that the page is of a type that Internet Explorer does not natively support). You may also receive a prompt depending on the settings for the file type that is specified by the MIME content type. To avoid any prompts, clients with a registered ASP extension need to configure both the ASP file type and the file type that is specified by the MIME content so that they do not prompt. See the steps above for an example of how to change this setting.

Clearing Confirm open after download adds a special binary value to the registry key that describes that file type. The DWORD value is called "EditFlags" and a setting of "0x00010000" turns off the prompt for that file type. For example, the following REG file script turns off the dialog box for Word 97, Word 2000, and Word 2002 documents:



Because different products may register the ASP extension differently, the above REG script cannot fix the issue that is discussed in this article because the exact mapping of the .asp extension to its file type registry key (typically but not exclusively aspfile) cannot be known for all cases. Developers who want to programmatically set this client key must find the correct registry key from the extension by using the Windows registry application programming interfaces (APIs).