SlideShare a Scribd company logo
3SC – Q6 Dudy Fathan Ali S.Kom
Review Materi ASP.NET
3SC – Q6
Dudy Fathan Ali, S.Kom (DFA)
2014
CEP - CCIT
Fakultas Teknik Universitas Indonesia
Consuming Web Services in a Web Application
3SC – Q6 Dudy Fathan Ali S.Kom
Consuming Web Services in a Web Application
Web services are the application components that
can be used by other Web applications.
You can create a Web service and publish it on a Web
server, thereby, making it available for other Web
applications to use.
Consuming Web Services in a Web Application
3SC – Q6 Dudy Fathan Ali S.Kom
Invoking Web Services
A Web service:
Is a self-describing Web component that exposes its functionality to
the consumers through open standards such as XML and Simple
Object Access Protocol (SOAP).
Is a widely used method for implementing Service-Oriented
Architecture (SOA).
Allows integration of applications developed in different languages
and running on different platforms.
Communicates by using a standard protocol called SOAP. SOAP defines
a standard way of passing the XML-encoded data.
Developing ASP.NET Web services starts by creating an .asmx
file and hosting it on a Web server, such as IIS.
A Web service once hosted or published on the server can be
consumed by any client.
Consuming Web Services in a Web Application
3SC – Q6 Dudy Fathan Ali S.Kom
Invoking Web Services
The client locates the service by adding a Web reference.
This adds a proxy class on the client side, which exposes the
methods, parameters, and return types of the methods
contained in the Web service.
After adding the proxy class, the client application creates an
instance of the proxy class and accesses the methods provided
by the Web service through the instance.
The client requests are then handled by the proxy class.
After processing the request, the response is also sent as a
SOAP message to the proxy.
The proxy then converts this SOAP message into method return
value, which is returned to the client.
Consuming Web Services in a Web Application
3SC – Q6 Dudy Fathan Ali S.Kom
Invoking Windows Communication Foundation Services
In distributed computing, Web services along with various other
technologies, such as COM+, .NET Remoting, Message Queues,
and Web Service Enhancement (WSE) were used to provide a
wide range of functionality.
WCF:
Unifies features of such discreet technologies under one single
framework.
Provides a unified programming model used to build a secure, reliable,
and robust Web service.
Aims at providing encoding, hosting, messaging patterns, networking,
security, and interoperability in a single infrastructure.
Consuming Web Services in a Web Application
3SC – Q6 Dudy Fathan Ali S.Kom
Invoking Windows Communication Foundation Services
The following figure shows the WCF architecture.
Consuming Web Services in a Web Application
3SC – Q6 Dudy Fathan Ali S.Kom
Invoking Windows Communication Foundation Services
The following set of APIs is unified in the WCF architecture:
ASP.NET Web Services (ASMX)
WSE
System.Messaging
Enterprise Services
Remoting
The design goals for building WCF services are:
Unification
Interoperability
Service orientation
Creating Rich Internet Applications Using AJAX
3SC – Q6 Dudy Fathan Ali S.Kom
AJAX is a technology, which when implemented in
Web applications makes the interaction between the
client and the server asynchronous.
AJAX implementation:
Allows users to interact with the Web application while
waiting for a response from the server.
Enables partial updates in Web applications.
Explaining the AJAX Framework
Creating Rich Internet Applications Using AJAX
3SC – Q6 Dudy Fathan Ali S.Kom
AJAX is a Web development technique that:
Is used for creating dynamically interactive applications.
Enables Web applications to retrieve data from the server,
asynchronously in the background, without interfering with
the display and behavior of the existing page.
To understand the concept of AJAX, you need to
understand the relevance of the following terms:
Asynchronous communication
JavaScript
XML
Understanding AJAX
Creating Rich Internet Applications Using AJAX
3SC – Q6 Dudy Fathan Ali S.Kom
AJAX-enabled Web applications offer:
Quick response to a user’s request
Asynchronous communication that allows a user to
interact with the rest of the Web page while the
application is processing the changed or updated parts of
the Web page
Auto-generated proxy classes that are used to call Web
service methods from client script such as JavaScript
Support for the widely used Web browsers such as
Microsoft Internet Explorer, Mozilla Firefox, and Apple
Safari
Advantages of AJAX-Enabled Web Applications
Creating Rich Internet Applications Using AJAX
3SC – Q6 Dudy Fathan Ali S.Kom
Some of the limitations of AJAX-enabled Web
applications are:
Browser Integration
Dependency on JavaScript
Limitations of AJAX-Enabled Web Applications
Creating Rich Internet Applications Using AJAX
3SC – Q6 Dudy Fathan Ali S.Kom
The ASP.NET AJAX Web applications consist of client-side and
server-side scripts.
The following figure displays the ASP.NET AJAX architecture.
Architecture of ASP.NET AJAX
Creating Rich Internet Applications Using AJAX
3SC – Q6 Dudy Fathan Ali S.Kom
Architecture of ASP.NET AJAX
The preceding figure shows that the ASP.NET AJAX
architecture consists of the following components:
Client-based Microsoft AJAX library
Server-based AJAX features for ASP.NET
Creating Rich Internet Applications Using AJAX
3SC – Q6 Dudy Fathan Ali S.Kom
Architecture of ASP.NET AJAX
Client-based Microsoft AJAX library:
The ASP.NET AJAX client architecture provides features that
enable you to create rich, intuitive, responsive, and
interactive Web applications. This architecture includes the
ASP.NET AJAX library that includes:
Components
Browser compatibility
Networking
Core services
Creating Rich Internet Applications Using AJAX
3SC – Q6 Dudy Fathan Ali S.Kom
Architecture of ASP.NET AJAX
Server-based AJAX features for ASP.NET:
The ASP.NET AJAX server architecture provides the
functionalities for the following server-based AJAX
features:
Script support
Web services
Application services
Server controls
Implementing Internationalization and Accessibility
3SC – Q6 Dudy Fathan Ali S.Kom
Implementing Internationalization
To make an international application customizable, you need to
understand the following phases that are involved in developing an
internationalized application:
• Globalization: Globalization is the process of designing and
developing a Web application in such a way that it is culture-neutral
and language-neutral.
• Localizability: Localizability is an intermediate process that ensures
that a globalized Web application is ready for implementing
localization.
• Localization: Localization is the process of customizing the
globalized Web application to a specific locale and culture. In this
phase, various resources, such as images and text, for the
designated locale are created.
Implementing Internationalization and Accessibility
3SC – Q6 Dudy Fathan Ali S.Kom
Factors Related to Creating International Applications
Application developers need to attend to locale considerations
when they develop international applications because negligence
of these considerations can lead to issues. The factors that need
to be considered while designing an internationalized application
are:
• Language issues
• Formatting issues
• String-related issues
• User-interface issues
Implementing Internationalization and Accessibility
3SC – Q6 Dudy Fathan Ali S.Kom
Factors Related to Creating International Applications
Language issues
Languages around the world differ in display, alphabets,
grammar, and syntactical rules. For example, some languages
such as Arabic are written from right-to-left, whereas other
languages are written from left-to-right. Some languages include
uppercase and lowercase characters, whereas others do not even
have the concept of uppercase and lowercase. Languages differ in
the number of characters, storage requirements, keyboard
layouts, and code representations. This diversity makes it difficult
to share data between cultures. It is even more difficult to create
a multilingual user interface.
Implementing Internationalization and Accessibility
3SC – Q6 Dudy Fathan Ali S.Kom
Factors Related to Creating International Applications
Formatting issues
Formatting is the main source of differences in applications
designed for multiple languages or cultures. Formatting
differences may arise in the addresses, currency, dates,
numerals, telephone numbers, time, and units of measure of
various languages.
Implementing Internationalization and Accessibility
3SC – Q6 Dudy Fathan Ali S.Kom
Factors Related to Creating International Applications
String-related issues
When developing international applications, programmers must
consider issues related to strings. When strings are translated
from one language to another, the translated strings may be
longer than the original strings. In strings, the order of alphabets
varies in different languages. This causes major problems in
sorting and comparison of strings. Issues also arise when strings
are concatenated because these strings may convey different
meanings in different languages.
Implementing Internationalization and Accessibility
3SC – Q6 Dudy Fathan Ali S.Kom
Factors Related to Creating International Applications
User-interface issues
Various user interfaces are associated with the design of an
international application. The size of user interface elements
should be larger than that required for accommodating
English strings. This is because strings in other languages are
usually longer than strings in the English language. When
messages grow in size as a result of translation to another
language, they should be allowed to wrap to subsequent lines.
You should also ensure that all the access-key and shortcut-key
combinations are available on international keyboards. This is
because every language has a different keyboard layout, and
some characters do not exist on all keyboards.
Implementing Internationalization and Accessibility
3SC – Q6 Dudy Fathan Ali S.Kom
Implementing Accessibility
Accessibility:
Refers to the degree of ease with which an application can be used by a
variety of people.
Helps people having disabilities to work with the application easily.
Enables users to interact with the application more efficiently.
ASP.NET provides some guidelines that you should consider
while designing your Web application to achieve high
accessibility.
Implementing Internationalization and Accessibility
3SC – Q6 Dudy Fathan Ali S.Kom
Fundamentals of Designing an Accessible Application
The features of a Web application that are used frequently
should have a high degree of accessibility.
Therefore, a developer should strictly follow the accessibility
guidelines while designing this feature.
The principles that should be followed while implementing
accessibility support in an application are:
Flexible user interface
Flexible input and output features
Simple and Intuitive
Implementing Internationalization and Accessibility
3SC – Q6 Dudy Fathan Ali S.Kom
Accessibility Design Guidelines for the Web
Some guidelines for implementing accessibility in an
application are:
Standardize font styles
Support keyboard navigation
Standardize the use of images
Standardize the use of tables
Minimize the use of style sheets
Use controls properly
Implementing Internationalization and Accessibility
3SC – Q6 Dudy Fathan Ali S.Kom
Assistive Technologies Used for Accessibility of the Web
People with disabilities use various assistive technologies for
accessing a Web application.
Some assistive technologies used by the people with
disabilities are:
Braille and refreshable Braille
Scanning software
Screen magnifiers
Screen readers
Visual notifier
Securing Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Introducing the ASP.NET Security Model
The ASP.NET security model:
Allows you to implement security in your Web
applications.
Provides restricted levels of access to secure website
information from unauthorized access.
Helps in maintaining data integrity and confidentiality.
Securing Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Introducing the ASP.NET Security Model
The following figure displays the architecture of the ASP.NET
security model.
Web Clients
ASP.NET Applications
.NET Framework
Windows Operating System
IIS
Securing Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Introducing the ASP.NET Security Model
The working of the ASP.NET security model is described in the
following steps:
1. Internet Information Services (IIS) receives a request from a Web
client.
2. IIS attempts to authenticate the user.
3. If ASP.NET authenticates the user, it allows requests to the specified
Web page.
4. When the ASP.NET code requests resources, the operating system
performs its own security checks to verify that the authenticated user
is allowed access to the specified file and directory.
5. If access is granted, the requested resource is returned through IIS.
Securing Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Configuring IIS for Implementing Security
IIS authenticates the user who has requested for the application by using
a specific type of authentication.
The type of authentication depends on how the security for Web
applications is configured on IIS.
You need to configure security on IIS to authenticate users before they
are permitted access to a Web application.
IIS provides the following types of authentication to control access to
your Web application:
Anonymous
Basic
Digest
Integrated Windows
Securing Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Configuring an ASP.NET Application for Security
ASP.NET uses its own security mechanism to authenticate
users.
To be able to use ASP.NET security mechanism, you need to
configure the security settings in the web.config file of the
Web application.
These security settings include configuring authentication,
authorization, and impersonation for accessing resources in
your application.
Securing Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Configuring Authentication
Authentication is the process of validating the identity of a
user before granting access to a restricted resource.
Authentication in a Web application can be configured by
using the <authentication> element in the web.config
file.
The <authentication> element specifies the
authentication type that is used by an application to
authenticate the user.
The authentication type can be specified by using the mode
attribute of the <authentication> element.
Securing Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Configuring Authentication
The mode attribute can have the following values:
Windows: This mode specifies that the authentication is performed
by IIS by using basic, digest, or Integrated Windows authentication.
Forms: This mode specifies that the user will be authenticated by
using form-based authentication method.
Passport: This mode specifies that the user will be authenticated by
using Microsoft Passport authentication method.
None: This mode specifies that no authentication mechanism is set
and that any anonymous user can access the Web application.
Securing Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Configuring Impersonation
When a user requests an ASP.NET application, the request goes
to IIS.
IIS authenticates the user and forwards the request to ASP.NET.
If ASP.NET impersonation is disabled, irrespective of the user
who has logged on, the ASP.NET application will be executed by
using a fixed machine-specific account.
In Windows XP, this account is automatically created by
ASP.NET and is named as ASPNET.
Securing Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Configuring Impersonation
Impersonation is the process of executing code under the
authenticated user identity and not under the ASPNET
account.
Impersonation involves the following steps:
1. When a request from a remote client is received, IIS carries out
authentication. If the client is authenticated, it passes the request to
the ASP.NET application.
2. The application impersonates the client and uses the authentication
given by IIS to access the restricted resources.
3. If authorized to access resources, the ASP.NET application returns the
requested resources to the client through IIS.
Tracing and Monitoring Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Implementing Tracing in Web Applications
To ensure that the application is working properly and is not
giving unexpected results, you need to keep track of the
execution of your Web application.
ASP.NET provides you with the tracing feature that enables
you to track the program execution, thereby ensuring that
your Web application runs properly.
You can use tracing feature to:
View diagnostic information about a particular Web page.
Display custom tracing information about the execution of an
application.
Tracing and Monitoring Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Implementing Tracing in Web Applications
Tracing can be implemented at any of the following
levels:
Page level
Application level
Tracing and Monitoring Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Implementing Tracing in Web Applications
Page-level tracing:
Page-level tracing is used to generate diagnostic
information at the end of page rendering.
The diagnostic information includes all the information
about the requests made to the page and their responses.
To enable page-level tracing, you need to perform the
following steps:
1. Include the following directive at the top of the page:
<%@ Page Trace="True" %>
2. Include the TraceMode attribute in the @ Page directive to
specify the sort order for your trace messages.
Tracing and Monitoring Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Implementing Tracing in Web Applications
The following information is displayed when page-level tracing is
enabled:
Request details
Trace information
Control tree
Session state
Application state
Request Cookies Collection
Response Cookies Collection
Headers Collection
Response Headers Collection
Form Collection
Querystring Collection
Server Variables
Tracing and Monitoring Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Implementing Tracing in Web Applications
Application-level tracing:
Application-level tracing is used to trace information for every Web page in a
Web application.
A special page named trace.axd is used to view this trace information.
To use the trace.axd page, you have to first enable
application-level tracing within the Web.config file for your application.
You can use the following attributes of the <trace> element to change the
tracing settings of your website:
enabled
requestLimit
pageOutput
traceMode
localOnly
mostRecent
Tracing and Monitoring Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Writing Trace Information
When a Web application is in the development stage, you
often use several Response.Write statements in the
program code to display debugging information, which is used
to troubleshoot the application.
The messages displayed using Response.Write
statements are required for debugging and should not be
displayed to an end user.
The process of tracing enables you to insert debugging code
within an application such that the debugging code does not
need to be removed at the time of deployment.
The Trace property of the Page class returns a Trace
object, which can be used to write custom trace statements.
Tracing and Monitoring Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Writing Trace Information
The Trace object:
Is an instance of the TraceContext class.
Provides a set of methods and properties that help you to trace the
execution of your application.
The properties of the Trace object are:
IsEnabled: Denotes whether tracing is enabled for the current
request.
TraceMode: Sets the trace modes such as sortByCategory or
sortByTime.
Some of the methods of the Trace object are:
Warn: Displays the trace information in red color.
Write: Displays the trace information in black color.
Tracing and Monitoring Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Using Trace Listeners
Trace listeners are used to:
Collect, store, and route tracing messages.
Redirect the tracing information to logs, windows, or text files.
ASP.NET provides three types of predefined trace listeners:
TextWriterTraceListener
EventLogTraceListener
DefaultTraceListener
Tracing and Monitoring Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Using Trace Listeners
Adding a trace listener:
To add a trace listener in the web.config file, you need to include the
following markup in the web.config file:
<configuration>
<system.diagnostics>
<trace>
<listeners>
<add name="MyListener"
type="System.Diagnostics.
TextWriterTraceListener"
initializeData="D:myListener.txt" />
</listeners>
</trace>
</system.diagnostics>
</configuration>
Tracing and Monitoring Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Using Trace Listeners
To enable ASP.NET to route tracing information to a
System.Diagnostics listener, you need to include the
following entry in the web.config file:
<system.web>
<trace writeToDiagnosticsTrace = “true” />
<customErrors mode=”off” />
</system.web>
Tracing and Monitoring Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Using Trace Listeners
Removing a trace listener:
To remove a trace listener from the listeners collection, you need to
include the following markup in the web.config file:
<configuration>
<system.diagnostics>
<trace>
<listeners>
<remove name="MyListener"/>
</listeners>
</trace>
</system.diagnostics>
</configuration>
Tracing and Monitoring Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Using Trace Listeners
You can control the tracing output by using trace switches.
Trace switches can be configured to provide filtered tracing output.
You can also enable and disable certain tracing output using trace switches.
The two types of trace switches are:
BooleanSwitch
TraceSwitch
To initialize a TraceSwitch, you need to first create its object.
The following code snippet shows how you can create and initialize a
TraceSwitch:
System.Diagnostics.TraceSwitch MyTraceSwitch = new
System.Diagnostics.TraceSwitch("MySwitch", "Entire
application");
Tracing and Monitoring Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Monitoring Web Applications
After deploying a Web application, a System Administrator
needs to constantly monitor the application for its proper
functioning.
By monitoring a Web application, you can detect the problems
occurring in the application and troubleshoot them.
Monitoring and troubleshooting are required to improve the
performance of a Web application.
To help you track monitor a Web application, ASP.NET provides
you with the following two features:
Health monitoring
Performance monitoring
Tracing and Monitoring Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Health Monitoring
ASP.NET health monitoring system:
Enables you to monitor the status of the deployed Web
applications.
Is used to track system events and errors, which can hamper
the performance of a Web application.
Enables you to get the detailed run-time information about
ASP.NET resources used by a Web application.
Is implemented by using the System.Web.Management
namespace.
Tracing and Monitoring Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Health Monitoring
You can configure applications to use built-in or
customized monitoring providers.
To use the health monitoring system you need to:
Configure and enable Web events to monitor.
Configure and enable event providers that listen for and
process various Web events.
Web events contain information about the health of a
Web application.
Tracing and Monitoring Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Health Monitoring
There are several events that you can trap to monitor the
health of a Web application. Some of the important events
are:
WebBaseEvent
WebBaseErrorEvent
WebHeartbeatEvent
WebRequestEvent
WebErrorEvent
WebApplicationLifetimeEvent
WebRequestErrorEvent
WebAuditEvent
WebFailureAuditEvent
Tracing and Monitoring Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Health Monitoring
The event providers are used to listen for Web events that are
raised by a Web application. Some of the built-in providers are:
EventLogWebEventProvider
SqlWebEventProvider
SimpleMailWebEventProvider and TemplatedMailWebEventProvider
TraceWebEventProvider
WmiWebEventProvider
Tracing and Monitoring Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Performance Monitoring
Performance is an important factor in making a Web
application or project successful.
You need to monitor a Web application to troubleshoot any
performance-related issues.
You need to keep a track of such errors to improve the
performance of your Web application.
ASP.NET provides you with several performance counters,
such as Application Restarts, Requests Queued, and Errors
Total to help you keep track of the execution of your Web
application.
Tracing and Monitoring Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Performance Monitoring
ASP.NET supports the following two groups of performance
counters:
System performance counters
Application performance counters
Tracing and Monitoring Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Performance Monitoring
The following table lists some of the system performance
counters.
System Performance Counter Description
Application Running Represents the number of applications running
simultaneously on a Web server.
Requests Disconnected Represents the number of requests that have been
disconnected due to a communication failure.
Request Wait Time Represents the number of milliseconds that the most
recent request waited in the queue for being processed by
the server.
State Server Sessions Active Represents the number of user sessions that have become
inactive because of some user action. This counter is
available only on the computer where the state server
service, aspnet_state is running.
Worker Process Running Represents the number of worker processes running on a
Web server.
Tracing and Monitoring Web Applications
3SC – Q6 Dudy Fathan Ali S.Kom
Performance Monitoring
The following table lists some of the application performance
counters.
Application Performance Counter Description
Anonymous Requests Represents the number of requests that are using
anonymous authentication.
Anonymous Requests/Sec Represents the number of requests per second that
are using anonymous authentication.
Cache Total Entries Represents the total number of entries in the
cache.
Cache Total Hits Represents the total number of hits from the cache.
Debugging Requests Represents the number of requests that occur while
debugging is enabled.
3SC – Q6 Dudy Fathan Ali S.Kom
Thank You!
Dudy Fathan Ali S.Kom
dudy.fathan@eng.ui.ac.id
Source : NIIT Courseware Q6M2

More Related Content

PDF
Understanding COM+
PDF
R0701116121
DOC
Dotnet ch1
PDF
Ashish tripath
DOCX
Gireesh G.G Resume
PDF
Technologies prior to .Net
DOC
resume
DOCX
Online advertising management system
Understanding COM+
R0701116121
Dotnet ch1
Ashish tripath
Gireesh G.G Resume
Technologies prior to .Net
resume
Online advertising management system

What's hot (16)

PDF
Thomas Georgeson CV Jan16
DOC
Mandar_Kamate_Resume _DotNet
PPS
Vb net xp_15
PDF
Gervais Peter Resume Oct :2015
DOCX
Viktor Aleksandrov-Resume-2015
PDF
Pathway,I Ts Web Client Programming Manual
DOC
BhanuChand_Resume
PDF
Best things to know about .net framework
DOC
Rakshatha_Resume
DOCX
Resume for Ladan Jamali
DOCX
Subramanyam_Nalam
DOC
Bmp_Resume
DOCX
Varun Rajasekaran-TIBCO
DOC
Saravanan rajalingam
DOCX
William-Timpany-2016-03-09-v4-Resume
Thomas Georgeson CV Jan16
Mandar_Kamate_Resume _DotNet
Vb net xp_15
Gervais Peter Resume Oct :2015
Viktor Aleksandrov-Resume-2015
Pathway,I Ts Web Client Programming Manual
BhanuChand_Resume
Best things to know about .net framework
Rakshatha_Resume
Resume for Ladan Jamali
Subramanyam_Nalam
Bmp_Resume
Varun Rajasekaran-TIBCO
Saravanan rajalingam
William-Timpany-2016-03-09-v4-Resume
Ad

Viewers also liked (20)

PPTX
Parallelminds.asp.net with sp
PDF
Computer fundamentals
PPT
Your First ASP_Net project part 1
PDF
Chapter 1 (asp.net over view)
PPT
Asp dot net long
PPTX
ASP.NET - Introduction to Web Forms and MVC
PPT
E sampark with c#.net
PPTX
Java CRUD Mechanism with SQL Server Database
PPTX
ASP.NET Lecture 1
PDF
Asp.Net 3 5 Part 1
PDF
Computer Notes
PDF
Asp.Net 3.5 Part 2
PPT
PDF
Computer Notes
PDF
Bai giang asp.net full
PPSX
ASP.NET Web form
PPT
Intro To Asp Net And Web Forms
PDF
01 Computer Forensics Fundamentals - Notes
PPTX
Web forms in ASP.net
Parallelminds.asp.net with sp
Computer fundamentals
Your First ASP_Net project part 1
Chapter 1 (asp.net over view)
Asp dot net long
ASP.NET - Introduction to Web Forms and MVC
E sampark with c#.net
Java CRUD Mechanism with SQL Server Database
ASP.NET Lecture 1
Asp.Net 3 5 Part 1
Computer Notes
Asp.Net 3.5 Part 2
Computer Notes
Bai giang asp.net full
ASP.NET Web form
Intro To Asp Net And Web Forms
01 Computer Forensics Fundamentals - Notes
Web forms in ASP.net
Ad

Similar to Review Materi ASP.NET (20)

PPTX
Food borne human diseases
PDF
Asp.net Web Development | SEO Expert Bangladesh LTD
PPTX
SOA & WCF
PPT
Enterprise Software Architecture
DOCX
Tech Lead-Sachidanand Sharma
PPT
Web 2 0 Fullfeatures
PPT
Web 2 0 Fullfeatures
PPT
OWIN (Open Web Interface for .NET)
PPT
Web 2 0 Fullfeatures
DOCX
Online furniture management system
PPTX
Getting started with dotnet core Web APIs
PDF
Asp.net web application framework management system.pdf
PDF
Community platform for job seekers | web application for job seekers | case s...
PDF
IRJET- Cross-Platform Supported E-Learning Mobile Application
PPTX
UNIT 3 web iiiBCA.pptx
PDF
A Deep Dive into Android App Development 2.0.pdf
PDF
Angular JS Basics
PDF
Important Backend Frameworks To Remember For Businesses In 2023
PPTX
Assignment3.2
PPT
sMash_for_zOS-users
Food borne human diseases
Asp.net Web Development | SEO Expert Bangladesh LTD
SOA & WCF
Enterprise Software Architecture
Tech Lead-Sachidanand Sharma
Web 2 0 Fullfeatures
Web 2 0 Fullfeatures
OWIN (Open Web Interface for .NET)
Web 2 0 Fullfeatures
Online furniture management system
Getting started with dotnet core Web APIs
Asp.net web application framework management system.pdf
Community platform for job seekers | web application for job seekers | case s...
IRJET- Cross-Platform Supported E-Learning Mobile Application
UNIT 3 web iiiBCA.pptx
A Deep Dive into Android App Development 2.0.pdf
Angular JS Basics
Important Backend Frameworks To Remember For Businesses In 2023
Assignment3.2
sMash_for_zOS-users

More from Dudy Ali (20)

PDF
Distributed Application Development (Introduction)
PPTX
Network Socket Programming with JAVA
PPTX
XML Schema Part 2
PPTX
XML Schema Part 1
PPTX
Rendering XML Document
PPTX
Pengantar XML
PPTX
Pengantar XML DOM
PPTX
Pengantar ADO.NET
PPTX
Database Connectivity with JDBC
PPTX
XML - Displaying Data ith XSLT
PPTX
Algorithm & Data Structure - Algoritma Pengurutan
PPTX
Algorithm & Data Structure - Pengantar
PPTX
Object Oriented Programming - Value Types & Reference Types
PPTX
Object Oriented Programming - Inheritance
PPTX
Object Oriented Programming - File Input & Output
PPTX
Object Oriented Programming - Constructors & Destructors
PPTX
Object Oriented Programming - Abstraction & Encapsulation
PPTX
Web Programming Syaria - Pengenalan Halaman Web
PPTX
Web Programming Syaria - PHP
PPTX
Software Project Management - Project Management Knowledge
Distributed Application Development (Introduction)
Network Socket Programming with JAVA
XML Schema Part 2
XML Schema Part 1
Rendering XML Document
Pengantar XML
Pengantar XML DOM
Pengantar ADO.NET
Database Connectivity with JDBC
XML - Displaying Data ith XSLT
Algorithm & Data Structure - Algoritma Pengurutan
Algorithm & Data Structure - Pengantar
Object Oriented Programming - Value Types & Reference Types
Object Oriented Programming - Inheritance
Object Oriented Programming - File Input & Output
Object Oriented Programming - Constructors & Destructors
Object Oriented Programming - Abstraction & Encapsulation
Web Programming Syaria - Pengenalan Halaman Web
Web Programming Syaria - PHP
Software Project Management - Project Management Knowledge

Recently uploaded (20)

PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PPTX
Tartificialntelligence_presentation.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Mushroom cultivation and it's methods.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Machine learning based COVID-19 study performance prediction
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
A comparative analysis of optical character recognition models for extracting...
Univ-Connecticut-ChatGPT-Presentaion.pdf
Tartificialntelligence_presentation.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Spectroscopy.pptx food analysis technology
MIND Revenue Release Quarter 2 2025 Press Release
Spectral efficient network and resource selection model in 5G networks
Heart disease approach using modified random forest and particle swarm optimi...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Encapsulation_ Review paper, used for researhc scholars
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Mushroom cultivation and it's methods.pdf
Network Security Unit 5.pdf for BCA BBA.
SOPHOS-XG Firewall Administrator PPT.pptx
Empathic Computing: Creating Shared Understanding
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Machine learning based COVID-19 study performance prediction
Build a system with the filesystem maintained by OSTree @ COSCUP 2025

Review Materi ASP.NET

  • 1. 3SC – Q6 Dudy Fathan Ali S.Kom Review Materi ASP.NET 3SC – Q6 Dudy Fathan Ali, S.Kom (DFA) 2014 CEP - CCIT Fakultas Teknik Universitas Indonesia
  • 2. Consuming Web Services in a Web Application 3SC – Q6 Dudy Fathan Ali S.Kom Consuming Web Services in a Web Application Web services are the application components that can be used by other Web applications. You can create a Web service and publish it on a Web server, thereby, making it available for other Web applications to use.
  • 3. Consuming Web Services in a Web Application 3SC – Q6 Dudy Fathan Ali S.Kom Invoking Web Services A Web service: Is a self-describing Web component that exposes its functionality to the consumers through open standards such as XML and Simple Object Access Protocol (SOAP). Is a widely used method for implementing Service-Oriented Architecture (SOA). Allows integration of applications developed in different languages and running on different platforms. Communicates by using a standard protocol called SOAP. SOAP defines a standard way of passing the XML-encoded data. Developing ASP.NET Web services starts by creating an .asmx file and hosting it on a Web server, such as IIS. A Web service once hosted or published on the server can be consumed by any client.
  • 4. Consuming Web Services in a Web Application 3SC – Q6 Dudy Fathan Ali S.Kom Invoking Web Services The client locates the service by adding a Web reference. This adds a proxy class on the client side, which exposes the methods, parameters, and return types of the methods contained in the Web service. After adding the proxy class, the client application creates an instance of the proxy class and accesses the methods provided by the Web service through the instance. The client requests are then handled by the proxy class. After processing the request, the response is also sent as a SOAP message to the proxy. The proxy then converts this SOAP message into method return value, which is returned to the client.
  • 5. Consuming Web Services in a Web Application 3SC – Q6 Dudy Fathan Ali S.Kom Invoking Windows Communication Foundation Services In distributed computing, Web services along with various other technologies, such as COM+, .NET Remoting, Message Queues, and Web Service Enhancement (WSE) were used to provide a wide range of functionality. WCF: Unifies features of such discreet technologies under one single framework. Provides a unified programming model used to build a secure, reliable, and robust Web service. Aims at providing encoding, hosting, messaging patterns, networking, security, and interoperability in a single infrastructure.
  • 6. Consuming Web Services in a Web Application 3SC – Q6 Dudy Fathan Ali S.Kom Invoking Windows Communication Foundation Services The following figure shows the WCF architecture.
  • 7. Consuming Web Services in a Web Application 3SC – Q6 Dudy Fathan Ali S.Kom Invoking Windows Communication Foundation Services The following set of APIs is unified in the WCF architecture: ASP.NET Web Services (ASMX) WSE System.Messaging Enterprise Services Remoting The design goals for building WCF services are: Unification Interoperability Service orientation
  • 8. Creating Rich Internet Applications Using AJAX 3SC – Q6 Dudy Fathan Ali S.Kom AJAX is a technology, which when implemented in Web applications makes the interaction between the client and the server asynchronous. AJAX implementation: Allows users to interact with the Web application while waiting for a response from the server. Enables partial updates in Web applications. Explaining the AJAX Framework
  • 9. Creating Rich Internet Applications Using AJAX 3SC – Q6 Dudy Fathan Ali S.Kom AJAX is a Web development technique that: Is used for creating dynamically interactive applications. Enables Web applications to retrieve data from the server, asynchronously in the background, without interfering with the display and behavior of the existing page. To understand the concept of AJAX, you need to understand the relevance of the following terms: Asynchronous communication JavaScript XML Understanding AJAX
  • 10. Creating Rich Internet Applications Using AJAX 3SC – Q6 Dudy Fathan Ali S.Kom AJAX-enabled Web applications offer: Quick response to a user’s request Asynchronous communication that allows a user to interact with the rest of the Web page while the application is processing the changed or updated parts of the Web page Auto-generated proxy classes that are used to call Web service methods from client script such as JavaScript Support for the widely used Web browsers such as Microsoft Internet Explorer, Mozilla Firefox, and Apple Safari Advantages of AJAX-Enabled Web Applications
  • 11. Creating Rich Internet Applications Using AJAX 3SC – Q6 Dudy Fathan Ali S.Kom Some of the limitations of AJAX-enabled Web applications are: Browser Integration Dependency on JavaScript Limitations of AJAX-Enabled Web Applications
  • 12. Creating Rich Internet Applications Using AJAX 3SC – Q6 Dudy Fathan Ali S.Kom The ASP.NET AJAX Web applications consist of client-side and server-side scripts. The following figure displays the ASP.NET AJAX architecture. Architecture of ASP.NET AJAX
  • 13. Creating Rich Internet Applications Using AJAX 3SC – Q6 Dudy Fathan Ali S.Kom Architecture of ASP.NET AJAX The preceding figure shows that the ASP.NET AJAX architecture consists of the following components: Client-based Microsoft AJAX library Server-based AJAX features for ASP.NET
  • 14. Creating Rich Internet Applications Using AJAX 3SC – Q6 Dudy Fathan Ali S.Kom Architecture of ASP.NET AJAX Client-based Microsoft AJAX library: The ASP.NET AJAX client architecture provides features that enable you to create rich, intuitive, responsive, and interactive Web applications. This architecture includes the ASP.NET AJAX library that includes: Components Browser compatibility Networking Core services
  • 15. Creating Rich Internet Applications Using AJAX 3SC – Q6 Dudy Fathan Ali S.Kom Architecture of ASP.NET AJAX Server-based AJAX features for ASP.NET: The ASP.NET AJAX server architecture provides the functionalities for the following server-based AJAX features: Script support Web services Application services Server controls
  • 16. Implementing Internationalization and Accessibility 3SC – Q6 Dudy Fathan Ali S.Kom Implementing Internationalization To make an international application customizable, you need to understand the following phases that are involved in developing an internationalized application: • Globalization: Globalization is the process of designing and developing a Web application in such a way that it is culture-neutral and language-neutral. • Localizability: Localizability is an intermediate process that ensures that a globalized Web application is ready for implementing localization. • Localization: Localization is the process of customizing the globalized Web application to a specific locale and culture. In this phase, various resources, such as images and text, for the designated locale are created.
  • 17. Implementing Internationalization and Accessibility 3SC – Q6 Dudy Fathan Ali S.Kom Factors Related to Creating International Applications Application developers need to attend to locale considerations when they develop international applications because negligence of these considerations can lead to issues. The factors that need to be considered while designing an internationalized application are: • Language issues • Formatting issues • String-related issues • User-interface issues
  • 18. Implementing Internationalization and Accessibility 3SC – Q6 Dudy Fathan Ali S.Kom Factors Related to Creating International Applications Language issues Languages around the world differ in display, alphabets, grammar, and syntactical rules. For example, some languages such as Arabic are written from right-to-left, whereas other languages are written from left-to-right. Some languages include uppercase and lowercase characters, whereas others do not even have the concept of uppercase and lowercase. Languages differ in the number of characters, storage requirements, keyboard layouts, and code representations. This diversity makes it difficult to share data between cultures. It is even more difficult to create a multilingual user interface.
  • 19. Implementing Internationalization and Accessibility 3SC – Q6 Dudy Fathan Ali S.Kom Factors Related to Creating International Applications Formatting issues Formatting is the main source of differences in applications designed for multiple languages or cultures. Formatting differences may arise in the addresses, currency, dates, numerals, telephone numbers, time, and units of measure of various languages.
  • 20. Implementing Internationalization and Accessibility 3SC – Q6 Dudy Fathan Ali S.Kom Factors Related to Creating International Applications String-related issues When developing international applications, programmers must consider issues related to strings. When strings are translated from one language to another, the translated strings may be longer than the original strings. In strings, the order of alphabets varies in different languages. This causes major problems in sorting and comparison of strings. Issues also arise when strings are concatenated because these strings may convey different meanings in different languages.
  • 21. Implementing Internationalization and Accessibility 3SC – Q6 Dudy Fathan Ali S.Kom Factors Related to Creating International Applications User-interface issues Various user interfaces are associated with the design of an international application. The size of user interface elements should be larger than that required for accommodating English strings. This is because strings in other languages are usually longer than strings in the English language. When messages grow in size as a result of translation to another language, they should be allowed to wrap to subsequent lines. You should also ensure that all the access-key and shortcut-key combinations are available on international keyboards. This is because every language has a different keyboard layout, and some characters do not exist on all keyboards.
  • 22. Implementing Internationalization and Accessibility 3SC – Q6 Dudy Fathan Ali S.Kom Implementing Accessibility Accessibility: Refers to the degree of ease with which an application can be used by a variety of people. Helps people having disabilities to work with the application easily. Enables users to interact with the application more efficiently. ASP.NET provides some guidelines that you should consider while designing your Web application to achieve high accessibility.
  • 23. Implementing Internationalization and Accessibility 3SC – Q6 Dudy Fathan Ali S.Kom Fundamentals of Designing an Accessible Application The features of a Web application that are used frequently should have a high degree of accessibility. Therefore, a developer should strictly follow the accessibility guidelines while designing this feature. The principles that should be followed while implementing accessibility support in an application are: Flexible user interface Flexible input and output features Simple and Intuitive
  • 24. Implementing Internationalization and Accessibility 3SC – Q6 Dudy Fathan Ali S.Kom Accessibility Design Guidelines for the Web Some guidelines for implementing accessibility in an application are: Standardize font styles Support keyboard navigation Standardize the use of images Standardize the use of tables Minimize the use of style sheets Use controls properly
  • 25. Implementing Internationalization and Accessibility 3SC – Q6 Dudy Fathan Ali S.Kom Assistive Technologies Used for Accessibility of the Web People with disabilities use various assistive technologies for accessing a Web application. Some assistive technologies used by the people with disabilities are: Braille and refreshable Braille Scanning software Screen magnifiers Screen readers Visual notifier
  • 26. Securing Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Introducing the ASP.NET Security Model The ASP.NET security model: Allows you to implement security in your Web applications. Provides restricted levels of access to secure website information from unauthorized access. Helps in maintaining data integrity and confidentiality.
  • 27. Securing Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Introducing the ASP.NET Security Model The following figure displays the architecture of the ASP.NET security model. Web Clients ASP.NET Applications .NET Framework Windows Operating System IIS
  • 28. Securing Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Introducing the ASP.NET Security Model The working of the ASP.NET security model is described in the following steps: 1. Internet Information Services (IIS) receives a request from a Web client. 2. IIS attempts to authenticate the user. 3. If ASP.NET authenticates the user, it allows requests to the specified Web page. 4. When the ASP.NET code requests resources, the operating system performs its own security checks to verify that the authenticated user is allowed access to the specified file and directory. 5. If access is granted, the requested resource is returned through IIS.
  • 29. Securing Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Configuring IIS for Implementing Security IIS authenticates the user who has requested for the application by using a specific type of authentication. The type of authentication depends on how the security for Web applications is configured on IIS. You need to configure security on IIS to authenticate users before they are permitted access to a Web application. IIS provides the following types of authentication to control access to your Web application: Anonymous Basic Digest Integrated Windows
  • 30. Securing Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Configuring an ASP.NET Application for Security ASP.NET uses its own security mechanism to authenticate users. To be able to use ASP.NET security mechanism, you need to configure the security settings in the web.config file of the Web application. These security settings include configuring authentication, authorization, and impersonation for accessing resources in your application.
  • 31. Securing Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Configuring Authentication Authentication is the process of validating the identity of a user before granting access to a restricted resource. Authentication in a Web application can be configured by using the <authentication> element in the web.config file. The <authentication> element specifies the authentication type that is used by an application to authenticate the user. The authentication type can be specified by using the mode attribute of the <authentication> element.
  • 32. Securing Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Configuring Authentication The mode attribute can have the following values: Windows: This mode specifies that the authentication is performed by IIS by using basic, digest, or Integrated Windows authentication. Forms: This mode specifies that the user will be authenticated by using form-based authentication method. Passport: This mode specifies that the user will be authenticated by using Microsoft Passport authentication method. None: This mode specifies that no authentication mechanism is set and that any anonymous user can access the Web application.
  • 33. Securing Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Configuring Impersonation When a user requests an ASP.NET application, the request goes to IIS. IIS authenticates the user and forwards the request to ASP.NET. If ASP.NET impersonation is disabled, irrespective of the user who has logged on, the ASP.NET application will be executed by using a fixed machine-specific account. In Windows XP, this account is automatically created by ASP.NET and is named as ASPNET.
  • 34. Securing Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Configuring Impersonation Impersonation is the process of executing code under the authenticated user identity and not under the ASPNET account. Impersonation involves the following steps: 1. When a request from a remote client is received, IIS carries out authentication. If the client is authenticated, it passes the request to the ASP.NET application. 2. The application impersonates the client and uses the authentication given by IIS to access the restricted resources. 3. If authorized to access resources, the ASP.NET application returns the requested resources to the client through IIS.
  • 35. Tracing and Monitoring Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Implementing Tracing in Web Applications To ensure that the application is working properly and is not giving unexpected results, you need to keep track of the execution of your Web application. ASP.NET provides you with the tracing feature that enables you to track the program execution, thereby ensuring that your Web application runs properly. You can use tracing feature to: View diagnostic information about a particular Web page. Display custom tracing information about the execution of an application.
  • 36. Tracing and Monitoring Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Implementing Tracing in Web Applications Tracing can be implemented at any of the following levels: Page level Application level
  • 37. Tracing and Monitoring Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Implementing Tracing in Web Applications Page-level tracing: Page-level tracing is used to generate diagnostic information at the end of page rendering. The diagnostic information includes all the information about the requests made to the page and their responses. To enable page-level tracing, you need to perform the following steps: 1. Include the following directive at the top of the page: <%@ Page Trace="True" %> 2. Include the TraceMode attribute in the @ Page directive to specify the sort order for your trace messages.
  • 38. Tracing and Monitoring Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Implementing Tracing in Web Applications The following information is displayed when page-level tracing is enabled: Request details Trace information Control tree Session state Application state Request Cookies Collection Response Cookies Collection Headers Collection Response Headers Collection Form Collection Querystring Collection Server Variables
  • 39. Tracing and Monitoring Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Implementing Tracing in Web Applications Application-level tracing: Application-level tracing is used to trace information for every Web page in a Web application. A special page named trace.axd is used to view this trace information. To use the trace.axd page, you have to first enable application-level tracing within the Web.config file for your application. You can use the following attributes of the <trace> element to change the tracing settings of your website: enabled requestLimit pageOutput traceMode localOnly mostRecent
  • 40. Tracing and Monitoring Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Writing Trace Information When a Web application is in the development stage, you often use several Response.Write statements in the program code to display debugging information, which is used to troubleshoot the application. The messages displayed using Response.Write statements are required for debugging and should not be displayed to an end user. The process of tracing enables you to insert debugging code within an application such that the debugging code does not need to be removed at the time of deployment. The Trace property of the Page class returns a Trace object, which can be used to write custom trace statements.
  • 41. Tracing and Monitoring Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Writing Trace Information The Trace object: Is an instance of the TraceContext class. Provides a set of methods and properties that help you to trace the execution of your application. The properties of the Trace object are: IsEnabled: Denotes whether tracing is enabled for the current request. TraceMode: Sets the trace modes such as sortByCategory or sortByTime. Some of the methods of the Trace object are: Warn: Displays the trace information in red color. Write: Displays the trace information in black color.
  • 42. Tracing and Monitoring Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Using Trace Listeners Trace listeners are used to: Collect, store, and route tracing messages. Redirect the tracing information to logs, windows, or text files. ASP.NET provides three types of predefined trace listeners: TextWriterTraceListener EventLogTraceListener DefaultTraceListener
  • 43. Tracing and Monitoring Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Using Trace Listeners Adding a trace listener: To add a trace listener in the web.config file, you need to include the following markup in the web.config file: <configuration> <system.diagnostics> <trace> <listeners> <add name="MyListener" type="System.Diagnostics. TextWriterTraceListener" initializeData="D:myListener.txt" /> </listeners> </trace> </system.diagnostics> </configuration>
  • 44. Tracing and Monitoring Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Using Trace Listeners To enable ASP.NET to route tracing information to a System.Diagnostics listener, you need to include the following entry in the web.config file: <system.web> <trace writeToDiagnosticsTrace = “true” /> <customErrors mode=”off” /> </system.web>
  • 45. Tracing and Monitoring Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Using Trace Listeners Removing a trace listener: To remove a trace listener from the listeners collection, you need to include the following markup in the web.config file: <configuration> <system.diagnostics> <trace> <listeners> <remove name="MyListener"/> </listeners> </trace> </system.diagnostics> </configuration>
  • 46. Tracing and Monitoring Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Using Trace Listeners You can control the tracing output by using trace switches. Trace switches can be configured to provide filtered tracing output. You can also enable and disable certain tracing output using trace switches. The two types of trace switches are: BooleanSwitch TraceSwitch To initialize a TraceSwitch, you need to first create its object. The following code snippet shows how you can create and initialize a TraceSwitch: System.Diagnostics.TraceSwitch MyTraceSwitch = new System.Diagnostics.TraceSwitch("MySwitch", "Entire application");
  • 47. Tracing and Monitoring Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Monitoring Web Applications After deploying a Web application, a System Administrator needs to constantly monitor the application for its proper functioning. By monitoring a Web application, you can detect the problems occurring in the application and troubleshoot them. Monitoring and troubleshooting are required to improve the performance of a Web application. To help you track monitor a Web application, ASP.NET provides you with the following two features: Health monitoring Performance monitoring
  • 48. Tracing and Monitoring Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Health Monitoring ASP.NET health monitoring system: Enables you to monitor the status of the deployed Web applications. Is used to track system events and errors, which can hamper the performance of a Web application. Enables you to get the detailed run-time information about ASP.NET resources used by a Web application. Is implemented by using the System.Web.Management namespace.
  • 49. Tracing and Monitoring Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Health Monitoring You can configure applications to use built-in or customized monitoring providers. To use the health monitoring system you need to: Configure and enable Web events to monitor. Configure and enable event providers that listen for and process various Web events. Web events contain information about the health of a Web application.
  • 50. Tracing and Monitoring Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Health Monitoring There are several events that you can trap to monitor the health of a Web application. Some of the important events are: WebBaseEvent WebBaseErrorEvent WebHeartbeatEvent WebRequestEvent WebErrorEvent WebApplicationLifetimeEvent WebRequestErrorEvent WebAuditEvent WebFailureAuditEvent
  • 51. Tracing and Monitoring Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Health Monitoring The event providers are used to listen for Web events that are raised by a Web application. Some of the built-in providers are: EventLogWebEventProvider SqlWebEventProvider SimpleMailWebEventProvider and TemplatedMailWebEventProvider TraceWebEventProvider WmiWebEventProvider
  • 52. Tracing and Monitoring Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Performance Monitoring Performance is an important factor in making a Web application or project successful. You need to monitor a Web application to troubleshoot any performance-related issues. You need to keep a track of such errors to improve the performance of your Web application. ASP.NET provides you with several performance counters, such as Application Restarts, Requests Queued, and Errors Total to help you keep track of the execution of your Web application.
  • 53. Tracing and Monitoring Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Performance Monitoring ASP.NET supports the following two groups of performance counters: System performance counters Application performance counters
  • 54. Tracing and Monitoring Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Performance Monitoring The following table lists some of the system performance counters. System Performance Counter Description Application Running Represents the number of applications running simultaneously on a Web server. Requests Disconnected Represents the number of requests that have been disconnected due to a communication failure. Request Wait Time Represents the number of milliseconds that the most recent request waited in the queue for being processed by the server. State Server Sessions Active Represents the number of user sessions that have become inactive because of some user action. This counter is available only on the computer where the state server service, aspnet_state is running. Worker Process Running Represents the number of worker processes running on a Web server.
  • 55. Tracing and Monitoring Web Applications 3SC – Q6 Dudy Fathan Ali S.Kom Performance Monitoring The following table lists some of the application performance counters. Application Performance Counter Description Anonymous Requests Represents the number of requests that are using anonymous authentication. Anonymous Requests/Sec Represents the number of requests per second that are using anonymous authentication. Cache Total Entries Represents the total number of entries in the cache. Cache Total Hits Represents the total number of hits from the cache. Debugging Requests Represents the number of requests that occur while debugging is enabled.
  • 56. 3SC – Q6 Dudy Fathan Ali S.Kom Thank You! Dudy Fathan Ali S.Kom dudy.fathan@eng.ui.ac.id Source : NIIT Courseware Q6M2