1 / 14

Configuring Applications MacDonald Ch. 9

Configuring Applications MacDonald Ch. 9. MIS 424 Professor Sandvig. Today. Why Applications? IIS Role in handing a request .NET Applications Application Object Global.asax Configuration files Machine.config Web.Config. Why Applications?. Dark ages (pre-2003)

penney
Download Presentation

Configuring Applications MacDonald Ch. 9

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Configuring ApplicationsMacDonald Ch. 9 MIS 424 Professor Sandvig

  2. Today • Why Applications? • IIS • Role in handing a request • .NET • Applications • Application Object • Global.asax • Configuration files • Machine.config • Web.Config

  3. Why Applications? • Dark ages (pre-2003) • “blue screen of death” not unusual • Single failure bring down whole system • Worse yet: • Memory leaks • Cause IIS hang • Stop serving pages • Required manual intervention(reboot)

  4. Why Applications • Today (Windows Server 2003 & later) • Applications still crash • Applications are compartmentalized • OS handles gracefully • System rarely affected • OS monitors application health • Recycles unhealthy processes • Result: system stable & reliable

  5. IIS Overview • IIS listens for web requests • Default port 80 • Attempts to retrieve file • Checks permissions • Passes control to appropriate program depending upon file extension • Table lookup • ASP.NET files passed to appropriate application

  6. IIS Overview http://theserverside.net/articles/showarticle.tss?id=IIS_ASP

  7. IIS Applications • Folders may be configured as “Applications” • IIS provides configuration interface • Each application is assigned to an Application Pool • Each application pool has a unique Windows process • Specify error handling, timeouts, etc. for each application • Benefit: • Compartmentalize applications • Reduces dependencies • Improves reliability • Allows application specific settings • Error handling, log files, filters, headers, timeouts… • 100’s of settings

  8. Applications Settings • Configuration settings: • Web.config • Application level settings • Located in root folder • Machine.config • Settings common to all applications • Application event handlers • Global.asax file • Located in root folder

  9. ASP.NET Configuration .config files • Hierarchical configuration • Similar to CSS • Inheritance • Child has precedence over parent • Machine.config • Rarely need to modify

  10. Web.Config • XML file • Case sensitive • Camel casing • Configure: • Application settings • Error handling • Timeouts • Sessions…etc. etc. • Security • .config files not served

  11. Global.asax • Handles application & session events • 15+ events • Application_start • Application_error • Session_start • Located in root folder of application • Triggered each page request • Optional

  12. Global.asax • Example: • Create new application on server • web.config: source • global.asax: source • TestPage.aspx: source, output

  13. Documentation • MSDN • ASP.NET Configuration • QuickStart Samples • Configuration • Various ASP.NET sites • 4GuysFromRolla

  14. Summary • Configuration Objectives: • Flexibility • Security • Reliability • Convenience • IIS • Handles requests • Application • Application object • Events: global.asax • Configuration • Machine.config • Web.config

More Related