黄色网页视频 I 影音先锋日日狠狠久久 I 秋霞午夜毛片 I 秋霞一二三区 I 国产成人片无码视频 I 国产 精品 自在自线 I av免费观看网站 I 日本精品久久久久中文字幕5 I 91看视频 I 看全色黄大色黄女片18 I 精品不卡一区 I 亚洲最新精品 I 欧美 激情 在线 I 人妻少妇精品久久 I 国产99视频精品免费专区 I 欧美影院 I 欧美精品在欧美一区二区少妇 I av大片网站 I 国产精品黄色片 I 888久久 I 狠狠干最新 I 看看黄色一级片 I 黄色精品久久 I 三级av在线 I 69色综合 I 国产日韩欧美91 I 亚洲精品偷拍 I 激情小说亚洲图片 I 久久国产视频精品 I 国产综合精品一区二区三区 I 色婷婷国产 I 最新成人av在线 I 国产私拍精品 I 日韩成人影音 I 日日夜夜天天综合

IIS架構(gòu)與HTTP請(qǐng)求處理流程(2)

系統(tǒng) 2391 0
ASP.NET Web編程原理 之
IIS架構(gòu)與HTTP請(qǐng)求處理流程(2)
<meta content="Word.Document" name="ProgId"> <meta content="Microsoft Word 12" name="Generator"> <meta content="Microsoft Word 12" name="Originator"> <link href="file:///C:%5CUsers%5CJINXUL%7E1%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"> <link href="file:///C:%5CUsers%5CJINXUL%7E1%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_editdata.mso" rel="Edit-Time-Data"> <link href="file:///C:%5CUsers%5CJINXUL%7E1%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_oledata.mso" rel="OLE-Object-Data"> <style> v/:* {behavior:url(#default#VML);} o/:* {behavior:url(#default#VML);} w/:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <link href="file:///C:%5CUsers%5CJINXUL%7E1%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"> <link href="file:///C:%5CUsers%5CJINXUL%7E1%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"> <style> <!-- /* Font Definitions */ @font-face {font-family:Wingdings; panose-1:5 0 0 0 0 0 0 0 0 0; mso-font-charset:2; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:0 268435456 0 0 -2147483648 0;} @font-face {font-family:宋體; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:SimSun; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 680460288 22 0 262145 0;} @font-face {font-family:黑體; panose-1:2 1 6 9 6 1 1 1 1 1; mso-font-alt:SimHei; mso-font-charset:134; mso-generic-font-family:modern; mso-font-pitch:fixed; mso-font-signature:-2147482945 953122042 22 0 262145 0;} @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:華文中宋; panose-1:2 1 6 0 4 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:647 135200768 16 0 262303 0;} @font-face {font-family:隸書(shū); panose-1:2 1 5 9 6 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:modern; mso-font-pitch:fixed; mso-font-signature:1 135135232 16 0 262144 0;} @font-face {font-family:新宋體; panose-1:2 1 6 9 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:modern; mso-font-pitch:fixed; mso-font-signature:3 680460288 22 0 262145 0;} @font-face {font-family:"/@宋體"; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 680460288 22 0 262145 0;} @font-face {font-family:"/@新宋體"; panose-1:2 1 6 9 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:modern; mso-font-pitch:fixed; mso-font-signature:3 680460288 22 0 262145 0;} @font-face {font-family:"/@黑體"; panose-1:2 1 6 9 6 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:modern; mso-font-pitch:fixed; mso-font-signature:-2147482945 953122042 22 0 262145 0;} @font-face {font-family:"/@隸書(shū)"; panose-1:2 1 5 9 6 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:modern; mso-font-pitch:fixed; mso-font-signature:1 135135232 16 0 262144 0;} @font-face {font-family:"/@華文中宋"; panose-1:2 1 6 0 4 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:647 135200768 16 0 262303 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; text-align:justify; text-justify:inter-ideograph; mso-pagination:none; font-size:10.5pt; mso-bidi-font-size:12.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:宋體; mso-font-kerning:1.0pt;} h1 {mso-style-unhide:no; mso-style-qformat:yes; mso-style-link:"標(biāo)題 1 Char"; mso-style-next:正文; margin-top:24.0pt; margin-right:0cm; margin-bottom:24.0pt; margin-left:0cm; text-align:center; text-indent:0cm; line-height:12.0pt; mso-line-height-rule:exactly; mso-pagination:lines-together; page-break-after:avoid; mso-outline-level:1; mso-list:l0 level1 lfo1; font-size:26.0pt; mso-bidi-font-size:36.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:華文中宋; mso-font-kerning:22.0pt; font-weight:normal; mso-bidi-font-weight:bold;} h2 {mso-style-update:auto; mso-style-unhide:no; mso-style-qformat:yes; mso-style-link:"標(biāo)題 2 Char"; mso-style-next:正文; margin-top:13.0pt; margin-right:0cm; margin-bottom:13.0pt; margin-left:0cm; text-align:center; text-indent:0cm; mso-pagination:lines-together; page-break-after:avoid; mso-outline-level:2; mso-list:l0 level2 lfo1; font-size:24.0pt; font-family:"Times New Roman","serif"; color:#993300; mso-font-kerning:1.0pt; font-weight:normal; mso-bidi-font-weight:bold;} h3 {mso-style-unhide:no; mso-style-qformat:yes; mso-style-link:"標(biāo)題 3 Char"; mso-style-next:正文; margin-top:6.0pt; margin-right:0cm; margin-bottom:6.0pt; margin-left:0cm; text-indent:0cm; mso-pagination:lines-together; page-break-after:avoid; mso-outline-level:3; mso-list:l0 level3 lfo1; font-size:18.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:隸書(shū); color:#339966; mso-font-kerning:1.0pt; font-weight:normal; mso-bidi-font-weight:bold;} h4 {mso-style-update:auto; mso-style-unhide:no; mso-style-qformat:yes; mso-style-link:"標(biāo)題 4 Char"; mso-style-next:正文; margin-top:6.0pt; margin-right:0cm; margin-bottom:0cm; margin-left:0cm; margin-bottom:.0001pt; text-indent:0cm; mso-pagination:lines-together; page-break-after:avoid; mso-outline-level:4; mso-list:l0 level4 lfo1; font-size:16.0pt; mso-bidi-font-size:12.0pt; font-family:"Times New Roman","serif"; mso-font-kerning:1.0pt; font-weight:normal; mso-bidi-font-weight:bold;} h5 {mso-style-unhide:no; mso-style-qformat:yes; mso-style-link:"標(biāo)題 5 Char"; mso-style-next:正文; margin-top:14.0pt; margin-right:0cm; margin-bottom:14.5pt; margin-left:0cm; text-indent:0cm; line-height:156%; mso-pagination:lines-together; page-break-after:avoid; mso-outline-level:5; mso-list:l0 level5 lfo1; font-size:14.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:新宋體; color:#333399; mso-font-kerning:1.0pt;} h6 {mso-style-unhide:no; mso-style-qformat:yes; mso-style-link:"標(biāo)題 6 Char"; mso-style-next:正文; margin-top:12.0pt; margin-right:0cm; margin-bottom:3.2pt; margin-left:0cm; text-indent:0cm; line-height:133%; mso-pagination:lines-together; page-break-after:avoid; mso-outline-level:6; mso-list:l0 level6 lfo1; font-size:12.0pt; font-family:"Arial","sans-serif"; mso-fareast-font-family:黑體; mso-bidi-font-family:"Times New Roman"; mso-font-kerning:1.0pt;} p.MsoHeading7, li.MsoHeading7, div.MsoHeading7 {mso-style-unhide:no; mso-style-qformat:yes; mso-style-link:"標(biāo)題 7 Char"; mso-style-next:正文; margin-top:12.0pt; margin-right:0cm; margin-bottom:3.2pt; margin-left:0cm; text-indent:0cm; line-height:133%; mso-pagination:lines-together; page-break-after:avoid; mso-outline-level:7; mso-list:l0 level7 lfo1; font-size:10.5pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:宋體; color:navy; mso-font-kerning:1.0pt; font-weight:bold;} p.MsoHeading8, li.MsoHeading8, div.MsoHeading8 {mso-style-unhide:no; mso-style-qformat:yes; mso-style-link:"標(biāo)題 8 Char"; mso-style-next:正文; margin-top:12.0pt; margin-right:0cm; margin-bottom:3.2pt; margin-left:0cm; text-indent:0cm; line-height:133%; mso-pagination:lines-together; page-break-after:avoid; mso-outline-level:8; mso-list:l0 level8 lfo1; font-size:12.0pt; font-family:"Arial","sans-serif"; mso-fareast-font-family:黑體; mso-bidi-font-family:"Times New Roman"; mso-font-kerning:1.0pt;} p.MsoHeading9, li.MsoHeading9, div.MsoHeading9 {mso-style-unhide:no; mso-style-qformat:yes; mso-style-link:"標(biāo)題 9 Char"; mso-style-next:正文; margin-top:12.0pt; margin-right:0cm; margin-bottom:3.2pt; margin-left:0cm; text-indent:0cm; line-height:133%; mso-pagination:lines-together; page-break-after:avoid; mso-outline-level:9; mso-list:l0 level9 lfo1; font-size:10.5pt; font-family:"Arial","sans-serif"; mso-fareast-font-family:黑體; mso-bidi-font-family:"Times New Roman"; mso-font-kerning:1.0pt;} p.MsoFootnoteText, li.MsoFootnoteText, div.MsoFootnoteText {mso-style-noshow:yes; mso-style-unhide:no; mso-style-link:"腳注文本 Char"; margin:0cm; margin-bottom:.0001pt; mso-pagination:none; layout-grid-mode:char; font-size:9.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:宋體; mso-font-kerning:1.0pt;} p.MsoCaption, li.MsoCaption, div.MsoCaption {mso-style-unhide:no; mso-style-qformat:yes; mso-style-next:正文; margin:0cm; margin-bottom:.0001pt; text-align:center; mso-pagination:none; font-size:10.0pt; font-family:"Arial","sans-serif"; mso-fareast-font-family:黑體; mso-font-kerning:1.0pt;} span.MsoFootnoteReference {mso-style-noshow:yes; mso-style-unhide:no; vertical-align:super;} span.1Char {mso-style-name:"標(biāo)題 1 Char"; mso-style-unhide:no; mso-style-locked:yes; mso-style-link:"標(biāo)題 1"; mso-ansi-font-size:26.0pt; mso-bidi-font-size:36.0pt; font-family:華文中宋; mso-fareast-font-family:華文中宋; mso-font-kerning:22.0pt; mso-bidi-font-weight:bold;} span.2Char {mso-style-name:"標(biāo)題 2 Char"; mso-style-unhide:no; mso-style-locked:yes; mso-style-link:"標(biāo)題 2"; mso-ansi-font-size:24.0pt; mso-bidi-font-size:24.0pt; color:#993300; mso-font-kerning:1.0pt; mso-bidi-font-weight:bold;} span.3Char {mso-style-name:"標(biāo)題 3 Char"; mso-style-unhide:no; mso-style-locked:yes; mso-style-link:"標(biāo)題 3"; mso-ansi-font-size:18.0pt; mso-bidi-font-size:18.0pt; font-family:隸書(shū); mso-fareast-font-family:隸書(shū); color:#339966; mso-font-kerning:1.0pt; mso-bidi-font-weight:bold;} span.4Char {mso-style-name:"標(biāo)題 4 Char"; mso-style-unhide:no; mso-style-locked:yes; mso-style-link:"標(biāo)題 4"; mso-ansi-font-size:16.0pt; mso-bidi-font-size:12.0pt; mso-font-kerning:1.0pt; mso-bidi-font-weight:bold;} span.5Char {mso-style-name:"標(biāo)題 5 Char"; mso-style-unhide:no; mso-style-locked:yes; mso-style-link:"標(biāo)題 5"; mso-ansi-font-size:14.0pt; mso-bidi-font-size:14.0pt; font-family:新宋體; mso-fareast-font-family:新宋體; color:#333399; mso-font-kerning:1.0pt; font-weight:bold;} span.6Char {mso-style-name:"標(biāo)題 6 Char"; mso-style-unhide:no; mso-style-locked:yes; mso-style-link:"標(biāo)題 6"; mso-ansi-font-size:12.0pt; mso-bidi-font-size:12.0pt; font-family:"Arial","sans-serif"; mso-ascii-font-family:Arial; mso-fareast-font-family:黑體; mso-hansi-font-family:Arial; mso-font-kerning:1.0pt; font-weight:bold;} span.7Char {mso-style-name:"標(biāo)題 7 Char"; mso-style-unhide:no; mso-style-locked:yes; mso-style-link:"標(biāo)題 7"; mso-ansi-font-size:10.5pt; mso-bidi-font-size:10.5pt; color:navy; mso-font-kerning:1.0pt; font-weight:bold;} span.8Char {mso-style-name:"標(biāo)題 8 Char"; mso-style-unhide:no; mso-style-locked:yes; mso-style-link:"標(biāo)題 8"; mso-ansi-font-size:12.0pt; mso-bidi-font-size:12.0pt; font-family:"Arial","sans-serif"; mso-ascii-font-family:Arial; mso-fareast-font-family:黑體; mso-hansi-font-family:Arial; mso-font-kerning:1.0pt;} span.9Char {mso-style-name:"標(biāo)題 9 Char"; mso-style-unhide:no; mso-style-locked:yes; mso-style-link:"標(biāo)題 9"; mso-ansi-font-size:10.5pt; mso-bidi-font-size:10.5pt; font-family:"Arial","sans-serif"; mso-ascii-font-family:Arial; mso-fareast-font-family:黑體; mso-hansi-font-family:Arial; mso-font-kerning:1.0pt;} span.Char {mso-style-name:"腳注文本 Char"; mso-style-noshow:yes; mso-style-unhide:no; mso-style-locked:yes; mso-style-link:腳注文本; mso-ansi-font-size:9.0pt; mso-bidi-font-size:9.0pt; mso-font-kerning:1.0pt;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt; mso-ascii-font-family:"Times New Roman"; mso-fareast-font-family:宋體; mso-hansi-font-family:"Times New Roman"; mso-font-kerning:0pt;} /* Page Definitions */ @page {mso-page-border-surround-header:no; mso-page-border-surround-footer:no; mso-footnote-separator:url("file:///C:/Users/JINXUL~1/AppData/Local/Temp/msohtmlclip1/01/clip_header.htm") fs; mso-footnote-continuation-separator:url("file:///C:/Users/JINXUL~1/AppData/Local/Temp/msohtmlclip1/01/clip_header.htm") fcs; mso-endnote-separator:url("file:///C:/Users/JINXUL~1/AppData/Local/Temp/msohtmlclip1/01/clip_header.htm") es; mso-endnote-continuation-separator:url("file:///C:/Users/JINXUL~1/AppData/Local/Temp/msohtmlclip1/01/clip_header.htm") ecs;} @page Section1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;} div.Section1 {page:Section1;} /* List Definitions */ @list l0 {mso-list-id:123738110; mso-list-template-ids:-310468926;} @list l0:level1 {mso-level-start-at:8; mso-level-style-link:"標(biāo)題 1"; mso-level-suffix:none; mso-level-text:第%1章; mso-level-tab-stop:none; mso-level-number-position:left; margin-left:0cm; text-indent:0cm;} @list l0:level2 {mso-level-number-format:none; mso-level-style-link:"標(biāo)題 2"; mso-level-suffix:none; mso-level-text:""; mso-level-tab-stop:none; mso-level-number-position:left; margin-left:0cm; text-indent:0cm;} @list l0:level3 {mso-level-number-format:none; mso-level-style-link:"標(biāo)題 3"; mso-level-suffix:none; mso-level-text:""; mso-level-tab-stop:none; mso-level-number-position:left; margin-left:0cm; text-indent:0cm;} @list l0:level4 {mso-level-number-format:none; mso-level-style-link:"標(biāo)題 4"; mso-level-suffix:none; mso-level-text:""; mso-level-tab-stop:none; mso-level-number-position:left; margin-left:0cm; text-indent:0cm;} @list l0:level5 {mso-level-number-format:none; mso-level-style-link:"標(biāo)題 5"; mso-level-suffix:none; mso-level-text:""; mso-level-tab-stop:none; mso-level-number-position:left; margin-left:0cm; text-indent:0cm;} @list l0:level6 {mso-level-number-format:none; mso-level-style-link:"標(biāo)題 6"; mso-level-suffix:none; mso-level-text:""; mso-level-tab-stop:none; mso-level-number-position:left; margin-left:0cm; text-indent:0cm;} @list l0:level7 {mso-level-number-format:none; mso-level-style-link:"標(biāo)題 7"; mso-level-suffix:none; mso-level-text:""; mso-level-tab-stop:none; mso-level-number-position:left; margin-left:0cm; text-indent:0cm;} @list l0:level8 {mso-level-number-format:none; mso-level-style-link:"標(biāo)題 8"; mso-level-suffix:none; mso-level-text:""; mso-level-tab-stop:none; mso-level-number-position:left; margin-left:0cm; text-indent:0cm;} @list l0:level9 {mso-level-number-format:none; mso-level-style-link:"標(biāo)題 9"; mso-level-suffix:none; mso-level-text:""; mso-level-tab-stop:none; mso-level-number-position:left; margin-left:0cm; text-indent:0cm;} @list l1 {mso-list-id:2014642387; mso-list-type:hybrid; mso-list-template-ids:-312174330 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l1:level1 {mso-level-number-format:bullet; mso-level-text:?; mso-level-tab-stop:21.0pt; mso-level-number-position:left; margin-left:21.0pt; text-indent:-21.0pt; font-family:Wingdings;} ol {margin-bottom:0cm;} ul {margin-bottom:0cm;} --> </style>

8.1.2 應(yīng)用程序池與工作者進(jìn)程


應(yīng)用程序池( Applicaion Pool ”是 Windows Server 為提升 Web 服務(wù)的性能和可靠性而引入的一個(gè) Web 程序隔離機(jī)制。

一個(gè)應(yīng)用程序池可包含一個(gè)或多個(gè) Web 應(yīng)用程序。 ASP.NET Web 應(yīng)用程序必須運(yùn)行在一個(gè)應(yīng)用程序池中。

Windows Server 中,一個(gè)或多個(gè)“ 工作者進(jìn)程( Worker Process ”為應(yīng)用程序池提供服務(wù),停止一個(gè)應(yīng)用程序池將導(dǎo)致這些工作者進(jìn)程被關(guān)閉,這時(shí),所有發(fā)往此應(yīng)用程序池中 Web 應(yīng)用程序的 HTTP 請(qǐng)求將收到“ 503 服務(wù)不可用”的響應(yīng)信息。

8 ? 7 展示了一臺(tái) Web 服務(wù)器上正在運(yùn)行的應(yīng)用程序池。

應(yīng)用程序池

<shapetype id="_x0000_t75" coordsize="21600,21600" o:preferrelative="t" o:spt="75" filled="f" stroked="f" path=" m@4@5 l@4@11@9@11@9@5 xe"><stroke joinstyle="miter"><formulas><f eqn="if lineDrawn pixelLineWidth 0"><f eqn="sum @0 1 0"><f eqn="sum 0 0 @1"><f eqn="prod @2 1 2"><f eqn="prod @3 21600 pixelWidth"><f eqn="prod @3 21600 pixelHeight"><f eqn="sum @0 0 1"><f eqn="prod @6 1 2"><f eqn="prod @7 21600 pixelWidth"><f eqn="sum @8 21600 0"><f eqn="prod @7 21600 pixelHeight"><f eqn="sum @10 21600 0"></f><path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"><lock aspectratio="t" v:ext="edit"></lock><shape id="圖片_x0020_2" style="visibility: visible; width: 415.5pt; height: 152.25pt;" type="#_x0000_t75" o:spid="_x0000_i1025"><imagedata o:title="" src="file:///C:%5CUsers%5CJINXUL%7E1%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_image001.png"></imagedata></shape></path></f></f></f></f></f></f></f></f></f></f></f></formulas></stroke></shapetype>

8 ? 7 IIS 7 中的應(yīng)用程序池

8 ? 7 所示,本臺(tái) Web 服務(wù)器上的設(shè)置了 3 個(gè)應(yīng)用程序池,每個(gè)應(yīng)用程序池中可運(yùn)行多個(gè) Web 應(yīng)用程序,圖中 DefaultAppPool 這一應(yīng)用程序池運(yùn)行了 5 個(gè) Web 應(yīng)用程序。每個(gè)應(yīng)用程序池都可以加載特定版本的 .NET Framework ,以對(duì) ASP.NET 應(yīng)用程序提供支持。在 IIS 7 中,應(yīng)用程序池有兩種運(yùn)行模式—— 經(jīng)典模式和集成模式

經(jīng)典模式下, IIS7 應(yīng)用程序池運(yùn)行方式同 IIS 6 [1] 。

集成模式下, IIS 7 直接預(yù)裝載 .NET Framework ,從而為 ASP.NET 應(yīng)用程序提供了更好的性能。

IIS 管理器中可以隨時(shí)啟動(dòng)和停止某個(gè)應(yīng)用程序池。

Windows Server 上運(yùn)行應(yīng)用程序池的系統(tǒng)帳號(hào)是“ NetworkService ”。在后面的章節(jié)中可以看到在部署 ASP.NET 網(wǎng)站時(shí)往往需要給此帳號(hào)設(shè)置特定的權(quán)限(比如允許 ASP.NET 應(yīng)用程序向某文件夾中添加文件)。

下面深入介紹一下 IIS 的系統(tǒng)架構(gòu)以及 Windows Server 是如何響應(yīng) HTTP 請(qǐng)求的。


8.1.3 IIS的系統(tǒng)架構(gòu)

IIS 6 (運(yùn)行于 Windows 2003 Server )的架構(gòu)如 8 ? 8 所示。



IIS 6架構(gòu)

<shape id="_x0000_i1026" style="width: 415.5pt; height: 192.75pt;" o:ole="" type="#_x0000_t75" coordsize="21600,21600"><imagedata o:title="" src="file:///C:%5CUsers%5CJINXUL%7E1%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_image002.emz"></imagedata></shape> 8 ? 8 IIS 6 的架構(gòu)

8 ? 8 中可以看到, IIS 6 架構(gòu)由以下幾個(gè)部分組成:

(1)HTTP.SYS :運(yùn)行于 Windows 核心( Kernel )的一個(gè)組件,它負(fù)責(zé)偵聽(tīng)( Listen )來(lái)自于外部的 HTTP 請(qǐng)求(通常來(lái)自網(wǎng)絡(luò)中另一臺(tái)計(jì)算機(jī)上的瀏覽器),根據(jù)請(qǐng)求的 URL 將其轉(zhuǎn)發(fā)給相應(yīng)的應(yīng)用程序池,由運(yùn)行于應(yīng)用程序池中的工作者進(jìn)程來(lái)響應(yīng)此 HTTP 請(qǐng)求。當(dāng)此 HTTP 請(qǐng)求處理完成時(shí),它又負(fù)責(zé)將處理結(jié)果發(fā)送出去(其接收者通常為發(fā)出 HTTP 請(qǐng)求的瀏覽器)。

為了提供更好的性能, HTTP.SYS 內(nèi)部建立了一個(gè)緩沖區(qū),將最近的 HTTP 請(qǐng)求處理結(jié)果保存起來(lái),如果發(fā)現(xiàn)某個(gè) HTTP 請(qǐng)求“不久以前”處理過(guò)了(即在緩沖區(qū)中可以找到),它就簡(jiǎn)單地直接從緩沖區(qū)中取出這些結(jié)果發(fā)回給客戶端(通常為發(fā)出 HTTP 請(qǐng)求的瀏覽器)。

(2)InetInfo :在 IIS 5 時(shí)代, InetInfo IIS 服務(wù)的主進(jìn)程,在 IIS 6 中,它不再負(fù)責(zé)處理 HTTP 請(qǐng)求,但它繼續(xù)負(fù)責(zé)管理除了 WWW 服務(wù)之外的其他互聯(lián)網(wǎng)服務(wù),比如用于文件傳輸?shù)? FTP 服務(wù)和用于郵件收發(fā)的 SMTP 服務(wù)。

InetInfo 內(nèi)部維護(hù)了一個(gè)元數(shù)據(jù)庫(kù)( Metabase ),在這個(gè)數(shù)據(jù)庫(kù)中存入了一些重要的信息,這些信息對(duì)于維護(hù)各種互聯(lián)網(wǎng)服務(wù)(比如 WWW FTP )等是必不可少的。

(3)Worker Process :負(fù)責(zé)處理 HTTP 請(qǐng)求,被譯為“ 工作者進(jìn)程 ”,事實(shí)上,它是由一個(gè)可執(zhí)行程序 W3WP.EXE 運(yùn)行時(shí)所生成的一個(gè)進(jìn)程[2] , 每一個(gè)工作者進(jìn)程內(nèi)部都可以管理一個(gè)或多個(gè) ASP.NET 應(yīng)用程序。 工作者進(jìn)程運(yùn)行于一個(gè)應(yīng)用程序池( Application Pool )中。 IIS 6 可以創(chuàng)建多個(gè)應(yīng)用程序池,并指定某個(gè) ASP.NET 應(yīng)用程序在特定的應(yīng)用程序池中運(yùn)行( 8 ? 9 )。



設(shè)定程序池

<shape id="_x0000_i1027" style="visibility: visible; width: 282.75pt; height: 261pt;" type="#_x0000_t75" alt="IIS1"><imagedata o:title="IIS1" src="file:///C:%5CUsers%5CJINXUL%7E1%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_image003.jpg"></imagedata></shape>

8 ? 9 設(shè)定 ASP.NET 網(wǎng)站所屬的應(yīng)用程序池(圖截自 Windows 2003 Server

一般情況下,一個(gè)應(yīng)用程序池只有一個(gè)工作者進(jìn)程,但也可通過(guò)配置必要的參數(shù)讓多個(gè)工作者進(jìn)程同時(shí)運(yùn)行在同一個(gè)應(yīng)用程序池中,在這種情況下,這個(gè)應(yīng)用程序池被稱為“ Web Garden Web 園) ”。

(4)WAS Web Admin Service :這是一個(gè)監(jiān)控程序,它一方面可以存取放在 InetInfo 元數(shù)據(jù)庫(kù)( Metabase )中的各種信息,另一方面也負(fù)責(zé)監(jiān)控應(yīng)用程序池( Application Pool )中的工作者進(jìn)程的工作狀態(tài)況,必要時(shí)它會(huì)關(guān)閉一個(gè)老的工作者進(jìn)程并創(chuàng)建一個(gè)新的取而代之。



[1] IIS 6 中應(yīng)用程序池的運(yùn)行方式后文有詳細(xì)介紹

[2]“進(jìn)程( Process )”是一個(gè)具有一定獨(dú)立功能的程序在一個(gè)數(shù)據(jù)集合上的一次動(dòng)態(tài)執(zhí)行過(guò)程。如用通俗的語(yǔ)言來(lái)表達(dá),可以簡(jiǎn)單地將“進(jìn)程”理解成一個(gè)正在運(yùn)行的程序。


(請(qǐng)看 下一部分

IIS架構(gòu)與HTTP請(qǐng)求處理流程(2)


更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號(hào)聯(lián)系: 360901061

您的支持是博主寫(xiě)作最大的動(dòng)力,如果您喜歡我的文章,感覺(jué)我的文章對(duì)您有幫助,請(qǐng)用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長(zhǎng)非常感激您!手機(jī)微信長(zhǎng)按不能支付解決辦法:請(qǐng)將微信支付二維碼保存到相冊(cè),切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對(duì)您有幫助就好】

您的支持是博主寫(xiě)作最大的動(dòng)力,如果您喜歡我的文章,感覺(jué)我的文章對(duì)您有幫助,請(qǐng)用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長(zhǎng)會(huì)非常 感謝您的哦?。?!

發(fā)表我的評(píng)論
最新評(píng)論 總共0條評(píng)論