Results 1 to 2 of 2

Thread: IIS 6 Compression

  1. #1
    bcorbett is offline VB.NET Forum Newbie
    .NET Framework
    .NET 2.0 (VS 2005)
    Join Date
    Oct 2006
    Posts
    27
    Reputation
    84

    IIS 6 Compression

    I have the following function running in a webservice:

    Code:
    <WebMethod()> _
     Public Function Mobile_ReturnDataset_New(ByVal UDID As String, ByVal DeviceID As String, ByVal Passkey As String, ByVal LastRev As String) As DataSet
            Try
             
                  
                    Dim dsDemoData As DataSet = New DataSet
                    dsDemoData = GetDataset("exec pr_wsSelectMobileDemo '" & Passkey.Trim & "','" & UDID.Trim & "'")
                    UpdateAuditLog(Passkey, UDID, LastRev, "Demo")
                    Return dsDemoData
                
    
            Catch ex As Exception
                Dim ds As DataSet = New DataSet
                ds = ErrorMsg("System Error: " & Replace(Replace(ex.Message.ToString, "'", " "), Chr(39), " "))
                Return ds
            End Try
    
    
        End Function
    This method is used by an iPhone app. The developers who are writing the iPhone app have asked me to implement G ZIP compression. I researched this and found some articles saying that you can set this up in IIS 6. So I went to IIS and did the following.

    1. Right Click on "Web Sites"
    2. Clicked "Properties"
    3. Clicked "Services"
    4. Under "HTTP Compression" I checked "Compress application files" and "Compress static files"

    Then I pressed "Ok".

    But this didn't seem to have any effect. The method returned the raw XML, no compression.

    I restarted the IIS server and that didn't have any effect.

    I rewrote the method to return a compressed Byte array, but the developers preferred that we do the compression at the server level.

    Does anybody know what I'm doing wrong here?

    Thanks In advance.

  2. #2
    Herman is offline VB.NET Forum Miyagee
    .NET Framework
    .NET 4.0
    Join Date
    Oct 2011
    Location
    Montreal, QC, CA
    Posts
    466
    Reputation
    348
    Well first off the whole point of using compression is to compress the data from the server and decompress it at the client, to reduce network bandwidth. To implement HTTP compression, the client (web browser or otherwise) must request it by announcing it supports GZIP compression in its request header (Accept-Encoding: gzip, deflate), and the server must confirm which supported encoding format it will use for the data (Content-Encoding: gzip). What you implemented is the server side compression support, but you must also make sure the client requests compression.

    The question is, does the iPhone web browser support GZIP encoding? Also keep in mind the whole thing is transparent, the data you get back at user level will already be decompressed. You can verify that compression is working by examining the server response headers to a request.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Harvest time tracking