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.
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).
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
- 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. - Duplicate the file default.htm (by copy and paste on the current directory) and rename it to 12202.htm
- 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.
- 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>
- 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.
- That’s it. Now if client try browse to an unauthorized web site, a new customized error message will be shown.
HTML error customize messages to deal with the error which are occurred in the total kinds of facilities given to the client.
Cool. I found this post very interesting! Thank you for sharing with us!
you’re awesome!! it’s very useful article.thanks for sharing brother.
Hey man.Thank u very much.Howerver,i want to your help.I followed your guide,customized,modify 502 error,indigenous language (vietnamese)but in client,have been shown with Enlish.why ??? >”<
thank
I wanted to thank you for this excellent read! I was looking for this information for quite some time, but I was not able to see a reliable source.