Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

ISA Server 2004 blocks compressed file attachments if the "Block responses containing Windows executable content" option is enabled in the HTTP filter settings


View products that this article applies to.

Symptoms

Consider the following scenario. You publish an Outlook Web Access (OWA) Web site in Microsoft Internet Security and Acceleration (ISA) Server 2004. In the OWA Web publishing rule, you enable the Block responses containing Windows executable content option in the HTTP filter settings. However, OWA users cannot download compressed (.zip) file attachments.

When this problem occurs, OWA users receive the following error message in the Web browser:
Technical Information (for support personnel)
Error Code: 500 Internal Server Error. The request was rejected by the HTTP filter. Contact your ISA Server administrator. (12217)

↑ Back to the top


Cause

This problem occurs because OWA uses a "Content-Encoding: none" header when OWA sends compressed (.zip) file attachments. This content-encoding header indicates that the content is not encoded. However, ISA Server does not recognize this non-standard encoding schema. Therefore, ISA Server blocks the response when ISA Server inspects the response body.

↑ Back to the top


Resolution

To resolve this problem, follow these steps:
  1. Apply the hotfix package that is described in the following Microsoft Knowledge Base article:
    945043� getKB -Description of the ISA Server 2004 hotfix package: date
  2. Start Notepad.
  3. Copy the following code, and then paste it into Notepad.
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    '
    ' Copyright (c) Microsoft Corporation. All rights reserved.
    ' THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE
    ' RISK OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE
    ' USER. USE AND REDISTRIBUTION OF THIS CODE, WITH OR WITHOUT MODIFICATION, IS
    ' HEREBY PERMITTED.
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    	
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    ' This script sets whether ISA will treat the 'Content-Encoding: none' response header 
    ' to mean that the content is not encoded for a specified rule
    '
    ' usage - to enable this functionality run the script as follows:-
    ' cscript AllowNoneEncoding.vbs rulename
    '
    ' where rulename is the name of the OWA Web pubishing rule
    '
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    
    Const SE_VPS_GUID = "{143F5698-103B-12D4-FF34-1F34767DEabc}"
    Const SE_VPS_NAME = "AllowNoneEncoding"
    Const SE_VPS_VALUE = true
    
    
    'Define the constants needed
    const Error_FileNotFound = &H80070002
    Const fpcPolicyWebPublishing = 2
    
    Main(WScript.Arguments)
    
    Sub Main(args)
    
        If(args.Count = 1) Then
            SetAllowNoneEncoding args(0)
        Else
            Usage()
        End If
    End Sub
    
    Sub SetAllowNoneEncoding(ruleName)
    
        ' Create the root object.
        Dim root  ' The FPCLib.FPC root object
        Set root = CreateObject("FPC.Root")
    
        ' Declare the other objects needed.
        Dim isaArray        ' An FPCArray object
        Dim rule            ' An FPCPolicyRule object
    
        ' Obtain a reference to the array object.
        Set isaArray = root.GetContainingArray()
    
        ' Obtain a reference to the policy rule specified.
        On Error Resume Next
        Set rule = isaArray.ArrayPolicy.PolicyRules.Item(ruleName)
        If Err.Number = Error_FileNotFound Then
            WScript.Echo "The policy rule specified could not be found."
        Else
            Err.Clear
            On Error GoTo 0
            If rule.Type = fpcPolicyWebPublishing Then
    
                Dim VendorSets  ' An FPCVendorParametersSets collection
                Dim VendorSet   ' An FPCVendorParametersSet object
    
                Set VendorSets = rule.VendorParametersSets
    
                On Error Resume Next
                Set VendorSet = VendorSets.Item( SE_VPS_GUID )
    
                If Err.Number <> 0 Then
                    Err.Clear
    
                    ' Add the item
                    Set VendorSet = VendorSets.Add( SE_VPS_GUID )
                    CheckError
                    WScript.Echo "New VendorSet added... " & VendorSet.Name
    
                Else
                    WScript.Echo "Existing VendorSet found... value- " &  VendorSet.Value(SE_VPS_NAME)
                End If
    
                if VendorSet.Value(SE_VPS_NAME) <> SE_VPS_VALUE Then
    
                    Err.Clear
                    VendorSet.Value(SE_VPS_NAME) = SE_VPS_VALUE
    
                    If Err.Number <> 0 Then
                            CheckError
                    End If
                End If
    
                rule.Save
                WScript.Echo "Done!"
    
            Else
                WScript.Echo "The policy rule specified is not a Web publishing rule."
            End If
        End If
    
    End Sub
    
    Sub Usage()
        WScript.Echo "Usage:" & VbCrLf _
            & "  " & WScript.ScriptName & " RuleName" & VbCrLf _
            & "" & VbCrLf _
            & "    RuleName - Name of the Web publishing rule"
        WScript.Quit
    End Sub
    
    
    Sub CheckError()
    
        If Err.Number <> 0 Then
            WScript.Echo "An error occurred: 0x" & Hex(Err.Number) & " " & Err.Description
            Err.Clear
        End If
    
    End Sub
    
    Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure. However, they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
  4. Save the file as a Microsoft Visual Basic script file by using the .vbs file name extension. For example, use the following name to save the file:
    AllowNoneEncoding.vbs
  5. At a command prompt, change to the location where you saved the file in step 4, and then run the following command:
    cscript AllowNoneEncoding.vbs Rulename
    In this command, the Rulename placeholder represents the name of the OWA Web Publishing rule.
Note To revert to the default setting, edit the script by changing "Const SE_VPS_VALUE = true" to "Const SE_VPS_VALUE = false." Save the script, and then run it again.

↑ Back to the top


Workaround

To work around this problem, disable the Block responses containing Windows executable content option in the OWA Web publishing rule.

For more information, visit the following Microsoft TechNet Web site:

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


More information

For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684� Description of the standard terminology that is used to describe Microsoft software updates

↑ Back to the top


Keywords: KB944252, kbqfe, kbexpertiseinter

↑ Back to the top

Article Info
Article ID : 944252
Revision : 5
Created on : 12/4/2007
Published on : 12/4/2007
Exists online : False
Views : 282