IT533 Lectures Configuring, Deploying, Tracing and Error Handling.

Slides:



Advertisements
Similar presentations
11 Getting Started with ASP.NET Beginning ASP.NET 4.0 in C# 2010 Chapters 5 and 6.
Advertisements

1 Configuring Internet- related services (April 22, 2015) © Abdou Illia, Spring 2015.
Working with ASP Pages. Slide 2 The Tag (1) Remember that most ASP.NET pages contain a single tag with the runat attribute set It’s possible to have multiple.
Web Development in Microsoft Visual Studio Slide 2 Lecture Overview Introduce Visual Studio 2013 Create a first ASP.NET application.
1 Configuring Web services (Week 15, Monday 4/17/2006) © Abdou Illia, Spring 2006.
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 1.1 of…
Authenticating Users in an ASP.NET Application. Web Site Administration Tool From VS 2008, click Website/ ASP.Net Configuration to open Web Site Administration.
Introduction to ASP.NET, Second Edition2 Chapter Objectives.
Introduction to ASP.NET
ASP.NET 2.0 Chapter 6 Securing the ASP.NET Application.
Building Applications using ASP.NET and C# / Session 14 / 1 of 18 Session 14.
.NET Health Monitoring Jonathan Franco ITD Application Services.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
Tutorial: Introduction to ASP.NET Internet Technologies and Web Application 4 th February 2010.
© 2004 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Programming the Web Using ASP.Net Chapter 2: The ASP.Net Template Dave.
Deployment of web Site. Preparing the web site for deployment you now have two versions of web site 1 -one running in the production environment 2-one.

Tracing, Logging, and Error Handling MacDonald Ch. 8 MIS 424 MIS 424 Professor Sandvig Professor Sandvig.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
Integrating CFML with ASP.NET Vince Bonfanti President New Atlanta Communications, LLC.
Developing Workflows with SharePoint Designer David Coe Application Development Consultant Microsoft Corporation.
Microsoft Internet Information Services 5.0 (IIS) By: Edik Magardomyan Fozi Abdurhman Bassem Albaiady Vince Serobyan.
Session 10: Managing State. Overview State Management Types of State Management Server-Side State Management Client-Side State Management The Global.asax.
Web Programming: Client/Server Applications Server sends the web pages to the client. –built into Visual Studio for development purposes Client displays.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Course ILT Internet/intranet support Unit objectives Use the Internet Information Services snap-in to manage IIS, Web sites, virtual directories, and WebDAV.
Internet Information Server © N. Ganesan, Ph.D. All Rights Reserved.
11 Web Services. 22 Objectives You will be able to Say what a web service is. Write and deploy a simple web service. Test a simple web service. Write.
ASP.NET application. Roadmap ASP.NET file types Bin directory Application updates Simple application from start to finish using a virtual directory Behind.
IIS Security Sridurga Mavram. Contents -Introduction -Security Consideration -Creating a web page -Drawbacks -Security Tools -Conclusion -References.
Murach’s ASP.NET 4.0/VB, C1© 2006, Mike Murach & Associates, Inc.Slide 1.
Tracing 1www.tech.findforinfo.com. Contents Why Tracing Why Tracing Tracing in ASP.NET Tracing in ASP.NET Page Level tracing Page Level tracing Application.
DEV339 Best Practices for Debugging Visual Studio.NET Applications Keith Pleas Architect, Guided Design
1 CS 3870/CS 5870 Note04 Session Variables and Post Back.
Efficient Deployment & Management of ASP.NET 2.0 Applications on IIS 6.0 Alexis Eller Program Manager Internet Information Services Microsoft Corporation.
Christopher M. Pascucci Basic Structural Concepts of.NET Managing State & Scope.
Introducing ASP.NET 2.0. Internet Technologies WWW Architecture Web Server Client Server Request Response Network HTTP TCP/IP PC/Mac/Unix + Browser (IE,
Module 7: Creating a Microsoft ASP.NET Web Application.
What is Web Site Administration Tool ? WAT Allow you to Configure Web Site With Simple Interface –Manage Users –Manage Roles –Manage Access Rules.
PAGE DIRECTIVES. Page Directives  They are instructions, inserted at the top of an ASP.NET page, to control the behavior of ASP.NET pages.  So it is.
ASP. What is ASP? ASP stands for Active Server Pages ASP is a Microsoft Technology ASP is a program that runs inside IIS IIS stands for Internet Information.
Web Services Error Handling and Debugging. Agenda Simple SOAP faults Advanced SOAP faults SOAP headers and faults Error handling From a Service Perspective.
Introducing ASP+ Scott Mitchell
1 Chapter Overview Creating Web Sites and FTP Sites Creating Virtual Directories Managing Site Security Troubleshooting IIS.
Module 3: Managing Web Applications with IIS 7.0.
Configuring and Deploying Web Applications Lesson 7.
.NET Mobile Application Development XML Web Services.
11 Getting Started with ASP.NET Beginning ASP.NET in C# and VB Chapters 1 and 2.
Delivering Excellence in Software Engineering ® EPAM Systems. All rights reserved. Configuration.
Text INTRODUCTION TO ASP.NET. InterComm Campaign Guidelines CONFIDENTIAL Simply Server side language Simplified page development model Modular, well-factored,
Module 5: Using Trace in Microsoft ASP.NET Pages.
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
Alexey Polovinkin Post graduate student, CMC department.
Introduction to ASP.NET, Second Edition2 Chapter Objectives.
ASP.NET Overview Brian Hitney Developer Evangelist Microsoft Corporation
111 State Management Beginning ASP.NET in C# and VB Chapter 4 Pages
Computing with C# and the .NET Framework
ASP.NET Forms.
Essential tools for implementing and testing websites
ITEC 420 Framework Based Internet Applications
Session Variables and Post Back
© 2016, Mike Murach & Associates, Inc.
ASP.NET Web Configuration File
Security mechanisms and vulnerabilities in .NET
Active Server Pages ASP.Net
ASP.NET Application Framework
Web Development in Microsoft Visual Studio 2013
Application Infrastructure
Configuring Internet-related services
ITEC 420 Framework Based Internet Applications
Presentation transcript:

IT533 Lectures Configuring, Deploying, Tracing and Error Handling

IIS Internet Information Server Microsoft’s web server Foundation for ASP.NET Runs in inetinfo.exe process Also FTP, NNTP, SMTP Shared resources Default location c:\inetpub\wwwroot Internet Services Manager A Microsoft Management Console (MMC) snap-in

IIS Virtual Directories Provides a level of indirection from URL to actual file locations on the server For example, the file for the url: could be mapped to the physical location: d:\myFolder\myAppFolder\foo.asp

Deployment XCOPY deployment Components are placed in.\bin folder No DLL deployment, registration Unless you’re using COM or other DLLs No locked DLLs DLLs are “shadow copied” into a hidden folder.aspx files are automatically compiled Not true for codebehind Update code (.aspx and assemblies) while server is running No need to stop/bounce the server

Demo Let’s take a website we’ve implemented and deloy it to our IIS server. Look at Properties of the application:

Configuration Goal Provide extensible configuration for admins & developers to hierarchically apply settings for an application Solution Store configuration data in XML text files Format is human- and machine- readable and writable

Configuration Settings specified in configuration sections, e.g. Security, SessionState, Compilation, CustomErrors, ProcessModel, HTTPHandlers, Globalization, AppSettings, WebServices, WebControls, etc. Configuration information stored in web.config It is just a file, no DLL registration, no Registry settings, no Metabase settings

Configuration Configuration Hierarchy Configuration files can be stored in application folders Configuration system automatically detects changes Hierarchical configuration architecture Applies to the actual directory and all subdirectories Root Dir Sub Dir1 Sub Dir2 web.config

Configuration web.config Sample web.config sample

Configuration Configuration Hierarchy Standard machine-wide configuration file Provides standard set of configuration section handlers C:\WINDOWS\Microsoft.NET\Framework\v \CONFIG\machine.config

Configuration User-defined Settings In root web.config string customSetting = System.Configuration.ConfigurationManager.AppSettings. Get("customsetting1");  Retrieve settings at run-time

Tracing ASP.NET supports tracing Easy way to include “debug” statements No more messy Response.Write() calls! Debug statements can be left in, but turned off Great way to collect request details Server control tree Server variables, headers, cookies Form/Query string parameters Tracing provides a wealth of information about the page Can be enabled at page- or application- level

Tracing Methods and Properties Methods Trace.Write : Writes category and text to trace Trace.Warn : Writes category and text to trace in red Properties Trace.IsEnabled : True if tracing is turned on for the application or just that page Trace.Mode : SortByTime, SortByCategory Implemented in System.Web.TraceContext class

Tracing Application-Level Tracing To enable tracing across multiple pages: 1. Write web.config file in application root 2. Hit one or more pages in the application 3. Access tracing URL for the application <trace enabled="true" pageOutput="false" requestLimit="40" localOnly="false"/>

Tracing Page-Level Tracing To enable tracing for a single page: 1. Add trace directive at top of page 2. Add trace calls throughout page Trace.Write(“MyApp”, “Button Clicked”); Trace.Write(“MyApp”, “Value: ” + value); 3. Access page from browser

Tracing Tracing Demo Let’s add some traces to the AjaxExample website Show information obtained from tracing

Error Handling.NET Common Language Runtime provides a unified exception architecture Runtime errors done using exceptions VB now supports try / catch / finally ASP.NET also provides declarative application custom error handling Automatically redirect users to error page when unhandled exceptions occur Prevents ugly error messages from being sent to users

Error Handling Custom Error Pages Can specify error pages for specific HTTP status codes in web.config <customerrors mode=“remoteonly” defaultredirect=“error.htm”> <error statuscode=“404” redirect=“adminmessage.htm”/> <error statuscode=“403” redirect=“noaccessallowed.htm”/>

Err or Handling Custom Error Pages Can configure error pages on IIS Properties

Error Handling Error Event What do you actually do when an error occurs? Add global.asax to your website Use System.Diagnostics.EventLog class to write custom events to log when errors occur Use System.Web.Mail.SmtpMail class to send to administrators