home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / iis4_07.cab / readme.txt2 < prev    next >
Text File  |  1997-10-25  |  7KB  |  164 lines

  1.   CkyMunge: ISAPI filter for ASP session state for cookieless browsers
  2.   ====================================================================
  3.  
  4.  
  5. Table of Contents
  6. =================
  7.  
  8.     Overview
  9.     Installation
  10.     Build Notes
  11.     Support
  12.     Change Notes
  13.  
  14.  
  15. Overview
  16. ========
  17.  
  18. This filter is a workaround that helps Active Server Pages deal with
  19. browsers that don't understand cookies or that refuse to accept
  20. cookies.  ASP uses the ASPSESSIONID cookie to maintain its session
  21. state.  ASP expects the browser to send this cookie to the server with
  22. every request that it makes.  The ASPSESSIONID cookie is unique to a
  23. session.  Without it, ASP does not know which session the user owns and
  24. it cannot keep the Session object up to date as the user moves from page
  25. to page.
  26.  
  27. The CkyMunge filter works like this:
  28.  
  29. 1. The filter receives a request for a particular URL.  If the
  30.    headers of the request contain either "Cookie: ASPSESSIONID=xxx"
  31.    (IIS 3.0) or "Cookie: ASPSESSIONIDxxxxxxxx=xxx" (IIS 4.0)
  32.    header that ASPSESSIONID is recorded.  If the URL contains an
  33.    encoded ASPSESSIONID (see step 2), the ASPSESSIONID is
  34.    removed from the URL and a Cookie header is generated
  35.    instead.  The ASPSESSIONID, if present, is recorded for this
  36.    transaction.
  37.  
  38. 2. CkyMunge filters all outgoing data.  When ASP sends out a page in
  39.    response to the above request, CkyMunge removes the ASPSESSIONID
  40.    Set-Cookie headers, if present (so that browsers with cookie
  41.    warnings will have nothing to complain about), and munges any
  42.    local, relative URLs embedded in the page (e.g., http:foo/bar.asp will
  43.    become something like http:foo/bar.asp-ASP=PVZQGHUMEAYAHMFV).
  44.  
  45. 3. If the user clicks on one of those modified URLs, the request
  46.    comes back to the server (and filter) and step 1 starts all
  47.    over again.
  48.  
  49. Notes:
  50.  
  51. * Filtering outgoing raw data is an expensive process.  Every
  52.   single byte of data sent out by IIS must be streamed through
  53.   the filter.  The filter goes to some pains to be smart about
  54.   not unneccesarily processing data it's not interested in (such
  55.   as GIFs), but there are unavoidable performance costs
  56.   associated with IIS needing to copy all data from kernel to
  57.   user memory.
  58.  
  59.   It is impossible to give an accurate prediction of how much
  60.   performance will degrade on your server if the CkyMunge filter
  61.   is installed.  On a lightly loaded server, the difference
  62.   should not matter.  On a heavily loaded server, the
  63.   performance might become unacceptable.
  64.  
  65.   It is up to you to measure the performance of your server both
  66.   with and without the filter installed and see if the
  67.   convenience of supporting paranoid users or users with old
  68.   browsers outweighs the cost of poorer performance.
  69.  
  70.   User education may be a better solution in the long run.
  71.     The ASPSESSIONID cookie is not used to track longterm
  72.     information about you.  The cookie is destroyed as soon
  73.     as your browser shuts down and it is not stored on your
  74.     machine.  It simply allows our webserver to keep track
  75.     of what's in your shopping basket as you move from page
  76.     to page in our application.
  77.  
  78.     If your browser doesn't support cookies, we'd like to
  79.     suggest that you upgrade to a newer one that does.  When
  80.     you do, you'll enjoy our site much more because your
  81.     browser will also support frames and tables and other
  82.     newer features of HTML that we've made use of.
  83.  
  84. * If you elect not to install this filter, you can minimize the
  85.   number of cookies sent by Active Server Pages in one of two ways:
  86.     * Put something into the Session object:
  87.       <% Session("something") = whatever %>
  88.     * Put a global.asa into the virtual root for your
  89.       application, with a do-nothing Session_OnStart subroutine.
  90.  
  91. * The filter has 3 modes: off, on, and smart.  In the off mode
  92.   the filter does no work (a better way of turning it off would
  93.   be to remove it from the list of filters).  In On mode, all
  94.   URLs will be munged as normal, and no cookies will be sent
  95.   out.  In smart mode, the filter will munge and let cookies
  96.   go out to the browser.  If the cookie comes back it will
  97.   stop munging URLs and use the cookies.  If the cookie doesn't
  98.   come back it will begin eating outgoing cookies and continue
  99.   to munge URLs.  This will result in slightly better performance.
  100.   The mode is controlled by a registry setting:
  101.   /HKEY_LOCAL_MACHINE/software/microsoft/ckymunge/mungemode.  A
  102.   mode of 0 is off, 1 is on, and 2 is smart.
  103.  
  104. * URLs will look ugly (http:foo/bar.asp-ASP=PVZQGHUMEAYAHMFV).
  105.   Users can still bookmark them, however.  If the ASPSESSIONID
  106.   is stale, the server will assign them a new session ID and
  107.   start a new session.  If CkyMunge has been disabled in the
  108.   meantime, then the URL will be unreachable.
  109.  
  110. * Only local, relative URLs are modified.  Absolute URLs are not
  111.   modified (e.g., http://www.mycompany.com/foo/bar.asp).  Nor are
  112.   local absolute URLS (e.g., http:/foo/bar.asp).  It is always good
  113.   HTML style to use relative URLs wherever possible, to ensure
  114.   location independence, so that moving a set of pages to a different
  115.   server or a different directory will not require modification of
  116.   the text.
  117.  
  118. * The filter does not work well with pure HTML pages (pages with
  119.   an .HTM or .HTML extension) as the Set-Cookie header does not
  120.   get sent out and hence the filter has no way of knowing how to
  121.   modify any embedded URLs.  Rename your .HTM and .HTML pages to
  122.   have a .ASP extension, even if they contain no server-side
  123.   scripting.
  124.  
  125. * If you have some client-side scripting that dynamically
  126.   constructs URLs in the user's browser (windows.navigate),
  127.   these URLs will not be modified to contain the ASPSESSIONID.
  128.  
  129. * This filter is transparent to Active Server Pages.  It neither
  130.   knows nor cares that the filter is present.
  131.  
  132.  
  133. Installation
  134. ============
  135.  
  136. To install this on IIS 4.0, you must:
  137.  
  138.     * Copy ckymunge.dll to somewhere suitable, such as \InetPub\Scripts
  139.       or \Winnt\System32\InetSrv
  140.  
  141.     * Use the Internet Service Manager to add ckymunge.dll to the list of
  142.       ISAPI filters to be used for your web site.  The Internet Service Manager
  143.       is found in the Start Menu.
  144.  
  145.         Start\
  146.             Programs\
  147.                 Windows NT 4.0 Option Pack\
  148.                     Microsoft Internet Information Server\
  149.                         Internet Service Manager
  150.  
  151.       Right mouse click on the web site you wish to install this filter on.
  152.       Choose Properties.  Click on the ISAPI Filters tab and add the filter.
  153.  
  154.       If you have other filters installed, the order in which they are executed
  155.       may become important.  Ckymunge is a medium-priority filter.
  156.  
  157.  
  158. Build Notes
  159. ===========
  160.  
  161. You can build this component with nmake at the command line.  Read the
  162. Makefile for more details.
  163.  
  164.