home *** CD-ROM | disk | FTP | other *** search
/ Chip 1999 September / CHIPCD_9_99.iso / software / uaktualnienia / OptionPackPL / iis4_07.cab / HIWCatalog.asp < prev    next >
Text File  |  1998-04-27  |  8KB  |  177 lines

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
  2. <HTML>
  3. <HEAD>
  4. <!--META TAGS ARE RECOMMENDED FOR THE SEARCH ENGINE-->
  5. <META NAME="DESCRIPTION" Content="How It Works Page">
  6. <META NAME="KEYWORDS" CONTENT="help, code, source code, questions, explanation">
  7. <META NAME="GENERATOR" CONTENT="Microsoft Visual InterDev 1.0">
  8. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso8859-1">
  9. <!--END META TAGS-->
  10.  
  11. <TITLE>How The Catalog Page Works</TITLE>
  12. </HEAD>
  13.  
  14. <BODY  BGCOLOR=#FFFFFF TOPMARGIN=0 LEFTMARGIN=0 ALINK=#23238E VLINK=#808080 LINK=#FFCC00>
  15. <BASEFONT FACE="VERDANA, ARIAL, HELVETICA" SIZE=2>
  16.  
  17. <!--Change link color on mouseover
  18.     Only if running Internet Explorer 4.0 or later -->
  19. <!--#include file=../libHighlight.inc-->
  20.  
  21. <!--BEGIN TOP TABLE HOLDING GRAPHIC, NAVIGATIONAL LINK, AND MAIN CONTENT-->
  22. <TABLE WIDTH="100%" HEIGHT="100%" CELLPADDING=0 CELLSPACING=0  BGCOLOR="#000000" BORDER=0>
  23.     <TR>
  24.         <TD BGCOLOR="#000000" ALIGN=CENTER VALIGN=TOP WIDTH=170>
  25.             <BR>
  26.             <IMG SRC="../images/btslarge.jpg" HEIGHT=119 WIDTH=171  ALT="Behind the Scenes at Exploration Air" BORDER=0>
  27.             <BR>
  28.             <BR>
  29.             <BR>
  30.             <!--BACK BUTTON AND VARIABLE TO RETURN TO ORIGINATING PAGE-->
  31.             <A HREF="<%=Request.ServerVariables("HTTP_REFERER")%>"><IMG SRC="../images/barrowy.gif" HEIGHT=8 WIDTH=8 ALT="Return to Previous Page" BORDER=0></A>
  32.              <FONT SIZE=2 FACE="VERDANA, ARIAL, HELVETICA">
  33.             <STRONG>
  34.             <A HREF="<%=Request.ServerVariables("HTTP_REFERER")%>">B  A  C  K </A>
  35.             </STRONG>
  36.             </FONT>
  37.             <BR> 
  38.             <BR>
  39.             <!--JAVASCRIPT TO VIEW PAGE'S SOURCE CODE-->
  40.             <A HREF="JavaScript:openWindow('../catalog/catalog.asp')">View Source</A>
  41.             <BR>
  42.         </TD>
  43.  
  44.         <TD BGCOLOR="#FFFFFF" BACKGROUND="../images/btsbg.gif" VALIGN=top>
  45.             <BR CLEAR=ALL>
  46.             <TABLE WIDTH="100%" CELLPADDING=10 CELLSPACING=0 BORDER=0>   
  47.                 <TR>
  48.                     <TD VALIGN=top>
  49.                         <FONT FACE="VERDANA, ARIAL, HELVETICA" COLOR="#0000FF" SIZE=5>How The Catalog Page Works</FONT>
  50.                         <HR>
  51.                         <TABLE BORDER=0>
  52.                             <TR>
  53.                                 <TD>
  54.                                     <H2>Functional Overview</H2>
  55.                                     <FONT FACE="VERDANA, ARIAL, HELVETICA" SIZE="2">
  56.                                         The Exploration Air/AdventureWorks Catalog page is designed to show how 
  57.                                         Microsoft Internet Information Server (IIS) 4.0 handles server errors
  58.                                         such as misbehaved dynamic-link libraries (DLLs).
  59.                                         <P>
  60.                                         Starting with IIS4.0 you can isolate server applications, which means they will 
  61.                                         be run in a process separate from the Web server process. 
  62.                                         If an isolated application fails, it won't affect the running of the server 
  63.                                         (or of other applications, except for those that work as 
  64.                                         a unit with the failed application). Isolating an application can also be described 
  65.                                         as running it in a separate memory space.
  66.                                         <P>
  67.                                         Generally, it is a good idea to isolate applications; slightly more memory is used, 
  68.                                         but the server will be less likely to fail if an 
  69.                                         application fails. There may be some performance degradation while running a 
  70.                                         Web application in this manner, but, depending on the
  71.                                         business scenario, the extra robustness may be more important than performance.
  72.                                     </FONT>
  73.                                     <P>
  74.                                 </TD>
  75.                                 <TD VALIGN=TOP>
  76.                                     <TABLE CELLPADDING=4 CELLSPACING=4>
  77.                                         <TR>
  78.                                             <TD BGCOLOR=#C0C0C0>
  79.                                                 <STRONG>Required Settings</STRONG>
  80.                                                 <P>
  81.                                                 <FONT SIZE=2>
  82.                                                     For the ExAir Catalog application to work correctly you <STRONG>must</STRONG> 
  83.                                                     have the following settings on the Catalog directory.
  84.                                                     <P>
  85.                                                     <STRONG>Run in separate memory space:</STRONG> Yes<BR>
  86.                                                     <STRONG>Enable debug exception catching:</STRONG> No<BR>
  87.                                                     <STRONG>Enable ASP server-side script debugging:</STRONG> Yes<BR>
  88.                                                     <P>
  89.                                                     It is also recommended that you turn off page caching in your browser.
  90.                                                 </FONT>
  91.                                             </TD>
  92.                                         </TR>
  93.                                     </TABLE>
  94.                                 </TD>
  95.                             </TR>
  96.                         </TABLE>
  97.                         <FONT FACE="VERDANA, ARIAL, HELVETICA" SIZE="2">
  98.                         The <STRONG>MoreInfo.asp</STRONG> file calls a component called <STRONG>ProdLookup.ProdLookup.1</STRONG>, which is defined in 
  99.                         a DLL in <STRONG>ProdInfo.dll</STRONG>. ProdInfo.dll has the job of creating an <STRONG>Access Violation</STRONG> when the user
  100.                         selects the carabiner, otherwise it returns some data about the product selected. 
  101.                         An access violation is a serious error which may cause an application to fail.
  102.                         <P>
  103.                         <CENTER><IMG SRC="images/AVCarabiner.jpg" WIDTH=438 HEIGHT=199 ALT="Access Violation" BORDER=0>
  104.                         <BR>
  105.                         <STRONG>Selecting the carabiner causes ProdInfo.dll to create an Access Violation. </STRONG>
  106.                         </CENTER>
  107.                         <P>
  108.                         A DLL is not a process and as such must run in the address space of another process. 
  109.                         Normally, the DLL would run in the IIS process itself, which would mean that the DLL has access to the same memory as IIS and as such
  110.                         could cause IIS to fail. The Exploration Air sample site is an isolated application which means it runs in a separate process to IIS.
  111.                         These processes are always called Mtx.exe because they are controlled by Microsoft Transaction Server.
  112.                         <P>
  113.                         The following shows how it looks schematically:
  114.                         <P>
  115.                         <CENTER><IMG BORDER=1 SRC="images/Isolated.jpg" WIDTH=444 HEIGHT=192 ALT="Isolated Process">
  116.                         <BR>
  117.                         <STRONG>Two DLLs - One in-process (inproc) with respect to IIS, <BR>the other out-of-process (OOP) with respect to IIS.</STRONG>
  118.                         </CENTER>
  119.                         <P>
  120.                         If you look carefully at the picture from Task Manager below, you can see three important processes. The first is Inetinfo.exe
  121.                         itself and two processes called Mtx.exe. The first Mtx.exe (labeled '1') is a process owned by Inetinfo.exe and is internal to IIS. 
  122.                         The second Mtx.exe (labeled '2') is the second process started when the Exploration Air site is accessed for the first time. 
  123.                         All Active Server Pages and DLLs for Exploration Air are loaded into this one process. If anything should cause a serious error 
  124.                         (such as ProdInfo.dll failing) then Microsoft Transaction Server will <STRONG>failfast</STRONG> and shut down the offending process,
  125.                         in this case Mtx.exe. If ProdInfo.dll were running inside of the IIS process Windows NT would shut down IIS.
  126.                         <P>
  127.                         <CENTER><IMG BORDER=0 SRC="images/TaskMgr.jpg" WIDTH=404 HEIGHT=509 ALT="Windows NT Task Manager">
  128.                         <BR>
  129.                         <STRONG>Windows NT Server Task Manager showing isolated processes.</STRONG>
  130.                         </CENTER>
  131.                         <P>
  132.                         Note that when the user attempts to load another Exploration Air page, IIS will automatically reload Mtx.exe and load the appropriate DLLs
  133.                         and Active Server Pages, without notifying the user. You can try this by reloading the Catalog.asp file.
  134.                         <P>
  135.                         <H2>Components Used</H2>
  136.                         The page uses the component ProdInfo.dll which is written in C++. It has one method, Details, 
  137.                         which returns information about the item in question. As you'll notice from the code, it is all hard-coded data. The intent is not
  138.                         to show data access from C++, but rather to show what happens when a very serious fault occurs in a DLL.
  139.                     </TD>
  140.                 </TR>
  141.             </TABLE>
  142.             <!--END TOP TABLE HOLDING GRAPHIC, NAVIGATIONAL LINK, AND MAIN CONTENT-->
  143.  
  144.             <BR>
  145.             <BR>
  146.  
  147.             <CENTER>
  148.             <!--BEGIN LEGAL INFORMATION-->
  149.             <TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
  150.                 <TR>
  151.                     <TD>
  152.                         <FONT FACE="VERDANA, ARIAL, HELVETICA" SIZE="1"><A HREF="../legal.htm">©1997 Microsoft Corporation. All rights reserved. Terms of Use.</A></FONT>
  153.                         <P>
  154.                     </TD>
  155.                 </TR>
  156.             </TABLE>
  157.             </CENTER>
  158.             <!--END LEGAL INFORMATION-->
  159.         </TD>
  160.     </TR>
  161. </TABLE>
  162.  
  163. </BODY>
  164. </HTML>
  165.  
  166. <SCRIPT LANGUAGE="JavaScript">
  167. function openWindow(SourceURL)
  168. {
  169.     // Set some defaults
  170.     width=450;
  171.     height=450;
  172.  
  173.     url = "code.asp?Source=" + SourceURL;
  174.     window.open(url,"Sample","resizable=yes,scrollbars=yes,width=" + width + ",height=" + height);
  175. }
  176. </SCRIPT>
  177.