共用方式為


Creating custom HTML error messages in Forefront TMG SP2

Applies To: Forefront Threat Management Gateway (TMG)

In Forefront TMG SP2, after selecting to use the new HTML error messages (see Customizing HTML error messages) you can edit the existing messages and create additional HTML error messages that are customized for your organization. The new HTML error messages have been redesigned to provide a new look and feel and to allow you to add embedded objects; such as videos, images or logos, and Adobe Flash content to the messages. For example, you can customize the error messages by adding your corporate logo to provide an end-to-end corporate experience for your users.

There are two default HTML error files in the ...\Forefront Threat Management Gateway\Templates\WebObjectsTemplates\ISA folder that can be used as templates for creating additional HTML error message pages:

  • DEFAULT.htm (internal clients)

  • DEFAULTR.htm (external clients)

The following procedure describes how to create custom HTML error messages. You can also customize existing error messages using the same procedure.

To create custom HTML error messages in Forefront TMG SP2

  1. Open one of the default error message pages in your preferred HTML editor.

  2. Save the new error message in the same folder with the file name Errorcode.htm.

  3. Edit the file as follows:

    • Replace [ERRORNUM] with the appropriate error code.

    • Replace [ERRORTEXT] with the appropriate error message text.

    • Replace [SERVERNAME] with the name of the server that returns the HTML page.

    • Replace [VIAHEADER] with the Via header message string that the Forefront TMG computer receives.

  4. To use embedded objects in your custom HTML error messages, you must store them in the ...\Forefront Threat Management Gateway\Templates\WebObjectsTemplates\ISA\HTML directory on the Forefront TMG computer.

  5. To add an embedded object to the HTML page, make sure that the path to the object is written in the HTML as HTML/<file_name>, for example, to add an image to the HTML page add the following code:

    <img src="HTML/MyImage.gif"> </img>
    
  6. Save the new error message.

    Note

    You can test the new error message on the Forefront TMG computer by opening the file in a web browser. The embedded object will appear on the webpage.

  7. Restart the Microsoft Forefront TMG Firewall service for the changes to take effect.