home *** CD-ROM | disk | FTP | other *** search
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
- <HTML>
- <HEAD>
- <!--META TAGS ARE RECOMMENDED FOR THE SEARCH ENGINE-->
- <META NAME="DESCRIPTION" Content="How It Works Page">
- <META NAME="KEYWORDS" CONTENT="help, code, source code, questions, explanation">
- <META NAME="GENERATOR" CONTENT="Microsoft Visual InterDev 1.0">
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso8859-1">
- <!--END META TAGS-->
-
- <TITLE>How The Catalog Page Works</TITLE>
- </HEAD>
-
- <BODY BGCOLOR=#FFFFFF TOPMARGIN=0 LEFTMARGIN=0 ALINK=#23238E VLINK=#808080 LINK=#FFCC00>
- <BASEFONT FACE="VERDANA, ARIAL, HELVETICA" SIZE=2>
-
- <!--Change link color on mouseover
- Only if running Internet Explorer 4.0 or later -->
- <!--#include file=../libHighlight.inc-->
-
- <!--BEGIN TOP TABLE HOLDING GRAPHIC, NAVIGATIONAL LINK, AND MAIN CONTENT-->
- <TABLE WIDTH="100%" HEIGHT="100%" CELLPADDING=0 CELLSPACING=0 BGCOLOR="#000000" BORDER=0>
- <TR>
- <TD BGCOLOR="#000000" ALIGN=CENTER VALIGN=TOP WIDTH=170>
- <BR>
- <IMG SRC="../images/btslarge.jpg" HEIGHT=119 WIDTH=171 ALT="Behind the Scenes at Exploration Air" BORDER=0>
- <BR>
- <BR>
- <BR>
- <!--BACK BUTTON AND VARIABLE TO RETURN TO ORIGINATING PAGE-->
- <A HREF="<%=Request.ServerVariables("HTTP_REFERER")%>"><IMG SRC="../images/barrowy.gif" HEIGHT=8 WIDTH=8 ALT="Return to Previous Page" BORDER=0></A>
- <FONT SIZE=2 FACE="VERDANA, ARIAL, HELVETICA">
- <STRONG>
- <A HREF="<%=Request.ServerVariables("HTTP_REFERER")%>">B A C K </A>
- </STRONG>
- </FONT>
- <BR>
- <BR>
- <!--JAVASCRIPT TO VIEW PAGE'S SOURCE CODE-->
- <A HREF="JavaScript:openWindow('../catalog/catalog.asp')">View Source</A>
- <BR>
- </TD>
-
- <TD BGCOLOR="#FFFFFF" BACKGROUND="../images/btsbg.gif" VALIGN=top>
- <BR CLEAR=ALL>
- <TABLE WIDTH="100%" CELLPADDING=10 CELLSPACING=0 BORDER=0>
- <TR>
- <TD VALIGN=top>
- <FONT FACE="VERDANA, ARIAL, HELVETICA" COLOR="#0000FF" SIZE=5>How The Catalog Page Works</FONT>
- <HR>
- <TABLE BORDER=0>
- <TR>
- <TD>
- <H2>Functional Overview</H2>
- <FONT FACE="VERDANA, ARIAL, HELVETICA" SIZE="2">
- The Exploration Air/AdventureWorks Catalog page is designed to show how
- Microsoft Internet Information Server (IIS) 4.0 handles server errors
- such as misbehaved dynamic-link libraries (DLLs).
- <P>
- Starting with IIS4.0 you can isolate server applications, which means they will
- be run in a process separate from the Web server process.
- If an isolated application fails, it won't affect the running of the server
- (or of other applications, except for those that work as
- a unit with the failed application). Isolating an application can also be described
- as running it in a separate memory space.
- <P>
- Generally, it is a good idea to isolate applications; slightly more memory is used,
- but the server will be less likely to fail if an
- application fails. There may be some performance degradation while running a
- Web application in this manner, but, depending on the
- business scenario, the extra robustness may be more important than performance.
- </FONT>
- <P>
- </TD>
- <TD VALIGN=TOP>
- <TABLE CELLPADDING=4 CELLSPACING=4>
- <TR>
- <TD BGCOLOR=#C0C0C0>
- <STRONG>Required Settings</STRONG>
- <P>
- <FONT SIZE=2>
- For the ExAir Catalog application to work correctly you <STRONG>must</STRONG>
- have the following settings on the Catalog directory.
- <P>
- <STRONG>Run in separate memory space:</STRONG> Yes<BR>
- <STRONG>Enable debug exception catching:</STRONG> No<BR>
- <STRONG>Enable ASP server-side script debugging:</STRONG> Yes<BR>
- <P>
- It is also recommended that you turn off page caching in your browser.
- </FONT>
- </TD>
- </TR>
- </TABLE>
- </TD>
- </TR>
- </TABLE>
- <FONT FACE="VERDANA, ARIAL, HELVETICA" SIZE="2">
- The <STRONG>MoreInfo.asp</STRONG> file calls a component called <STRONG>ProdLookup.ProdLookup.1</STRONG>, which is defined in
- a DLL in <STRONG>ProdInfo.dll</STRONG>. ProdInfo.dll has the job of creating an <STRONG>Access Violation</STRONG> when the user
- selects the carabiner, otherwise it returns some data about the product selected.
- An access violation is a serious error which may cause an application to fail.
- <P>
- <CENTER><IMG SRC="images/AVCarabiner.jpg" WIDTH=438 HEIGHT=199 ALT="Access Violation" BORDER=0>
- <BR>
- <STRONG>Selecting the carabiner causes ProdInfo.dll to create an Access Violation. </STRONG>
- </CENTER>
- <P>
- A DLL is not a process and as such must run in the address space of another process.
- 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
- could cause IIS to fail. The Exploration Air sample site is an isolated application which means it runs in a separate process to IIS.
- These processes are always called Mtx.exe because they are controlled by Microsoft Transaction Server.
- <P>
- The following shows how it looks schematically:
- <P>
- <CENTER><IMG BORDER=1 SRC="images/Isolated.jpg" WIDTH=444 HEIGHT=192 ALT="Isolated Process">
- <BR>
- <STRONG>Two DLLs - One in-process (inproc) with respect to IIS, <BR>the other out-of-process (OOP) with respect to IIS.</STRONG>
- </CENTER>
- <P>
- If you look carefully at the picture from Task Manager below, you can see three important processes. The first is Inetinfo.exe
- 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.
- The second Mtx.exe (labeled '2') is the second process started when the Exploration Air site is accessed for the first time.
- All Active Server Pages and DLLs for Exploration Air are loaded into this one process. If anything should cause a serious error
- (such as ProdInfo.dll failing) then Microsoft Transaction Server will <STRONG>failfast</STRONG> and shut down the offending process,
- in this case Mtx.exe. If ProdInfo.dll were running inside of the IIS process Windows NT would shut down IIS.
- <P>
- <CENTER><IMG BORDER=0 SRC="images/TaskMgr.jpg" WIDTH=404 HEIGHT=509 ALT="Windows NT Task Manager">
- <BR>
- <STRONG>Windows NT Server Task Manager showing isolated processes.</STRONG>
- </CENTER>
- <P>
- Note that when the user attempts to load another Exploration Air page, IIS will automatically reload Mtx.exe and load the appropriate DLLs
- and Active Server Pages, without notifying the user. You can try this by reloading the Catalog.asp file.
- <P>
- <H2>Components Used</H2>
- The page uses the component ProdInfo.dll which is written in C++. It has one method, Details,
- 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
- to show data access from C++, but rather to show what happens when a very serious fault occurs in a DLL.
- </TD>
- </TR>
- </TABLE>
- <!--END TOP TABLE HOLDING GRAPHIC, NAVIGATIONAL LINK, AND MAIN CONTENT-->
-
- <BR>
- <BR>
-
- <CENTER>
- <!--BEGIN LEGAL INFORMATION-->
- <TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
- <TR>
- <TD>
- <FONT FACE="VERDANA, ARIAL, HELVETICA" SIZE="1"><A HREF="../legal.htm">©1997 Microsoft Corporation. All rights reserved. Terms of Use.</A></FONT>
- <P>
- </TD>
- </TR>
- </TABLE>
- </CENTER>
- <!--END LEGAL INFORMATION-->
- </TD>
- </TR>
- </TABLE>
-
- </BODY>
- </HTML>
-
- <SCRIPT LANGUAGE="JavaScript">
- function openWindow(SourceURL)
- {
- // Set some defaults
- width=450;
- height=450;
-
- url = "code.asp?Source=" + SourceURL;
- window.open(url,"Sample","resizable=yes,scrollbars=yes,width=" + width + ",height=" + height);
- }
- </SCRIPT>
-