Customize HTML Error Messages on ISA Server 2006

By default, ISA Server 2006 includes a set of error messages which can be returned to Web browser clients if there is any error occurs such as host not found (code: 11001), access denied (code: 502), etc. These error messages are too general and not always helpful for users. Here is the example of error message which ISA Server has denied the request.
Default Error Message on ISA Server 2006

If you are using ISA Server 2006 in an organization, you might want to customize these error messages to be more specific for your organization. For example, include your company logo, explain why users cannot access the request web page, provide help-desk’s contact information if user need more information, etc. These error messages are kept as .htm files in directory ErrorHtmls in the ISA Server installation directory. So the default location is “C:\Program Files\Microsoft ISA Server\ErrorHtmls“. The following syntax is used to identify the files:

  • For internal clients, the files are named Error_number.htm.
  • For external clients, the files are named Error_numberR.htm (where R indicates reverse).

Default Location for Error Messages - ErrorHtmls
On this article, I will show how to create a new HTML error message from the default error message and customize it. The error message that I will customize is code 12202: The ISA Server denied the specified Uniform Resource Locator (URL) which occurs when ISA Server blocks a request from client.

Step-by-step to customize HTML error messages

  1. On ISA Server 2006, open folder to ErrorHtmls where the error messages are located. The default location is “C:\Program Files\Microsoft ISA Server\ErrorHtmls“. You will see that there is no error message for code 12202 yet so I will create a new one.
    Note: You should backup the original file if you are going to edit an existing error message so that if there is something wrong, you still have a backup.
  2. Duplicate the file default.htm (by copy and paste on the current directory) and rename it to 12202.htm
    Duplicate Default.htm
  3. Open the file 12202.htm with WordPad. You see HTML code which is the default error message.
    Note: You can use other HTML editor as you want.
    Open HTML Error Message with WordPad
  4. On this example, I modify only some text message between <BODY>…</BODY> tag and leave page’s style as default. Then, save the file.
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    
    <body bgColor=#f3f3ed>
    <table cellSpacing=0 cellPadding=0 width="100%">
      <tbody>
      <tr>
        <td class=titleborder_x width=30>
          <table height=25 cellSpacing=2 cellPadding=0 width=25 bgColor=black>
            <tbody>
            <tr>
              <td class=x vAlign=center align=middle>X</td>
            </tr>
            </tbody>
          </table>
        </td>
        <td class=titleBorder id=L_default_2>Network Access Message:<span class=TitleDescription> The page cannot be displayed</span> </td>
      </tr>
      </tbody>
    </table>
     
    <table id=spacer>
      <tbody>
      <tr>
        <td height=10></td></tr></tbody></table>
    <table width=400>
      <tbody>
      <tr>
        <td noWrap width=25></td>
        <td width=400><span class=explain><id id=L_default_3><b>Explanation:</b></id></span><id id=L_default_4> You are not authorized to view this page. Please check if you have enough permission to access the page.</id><br /><br />
     
    <id id=L_default_9>If you need more information, please contact our IT personnel.
    <br />
    Tel: 123-4567
    <br />
    Mobile: 0900-111-2222
    <br />
    E-mail: [email protected].</id> <br /><br />
        </td>
      </tr>
      </tbody>
    </table>
     
    <table id=spacer><tbody><tr><td height=15></td></tr></tbody></table>
     
    <table width=400>
      <tbody>
      <tr>
        <td noWrap width=25></td>
        <td width=400 id=L_default_10><b>Technical Information (for support personnel)</b> 
          <ul class=adminList>
            <li id=L_default_11>Error Code: [ERRORNUM]. [ERRORTEXT]([SPECIFICERRORNUM])
    </li><li id=L_default_12>IP Address: [IPADDRESS]
    </li><li id=L_default_13>Date: [TIMESTAMP]
    </li><li id=L_default_14>Server: [SERVERNAME]
    </li><li id=L_default_15>Source: [SOURCE]
     
          </li></ul>
        </td>
      </tr>
      </tbody>
    </table>
     
    </body>
  5. To make changes effect, you need to restart the firewall service. Open Services console and restart Microsoft Firewall.
    Note: You can also restart the firewall service from ISA Server Management -> Monitoring -> Services -> right-click on Microsoft Firewall and select Stop and then select Start.
    Restart Microsoft Firewall Service
  6. That’s it. Now if client try browse to an unauthorized web site, a new customized error message will be shown.
    Customized HTML Error Message on ISA Server 2006

Reference

6 Comments

  1. nwebsolution December 1, 2010
  2. Sean Brady December 8, 2010
  3. Dudy April 5, 2011
  4. Grigori May 21, 2011
  5. aungaung June 5, 2011
  6. Judi Bibb June 11, 2011

Leave a Reply