Page 133 - DCAP312_WEB_TECHNOLOGIES_II
P. 133

Unit 6: Error Handling



               •  The custom Errors element of the Web.config file is the last line of defence against an   Notes
                 unhandled error.

               •  The difference between Message and Message Detail above is that MessageDetail contains
                 error information that is WebAPI-specific that remote clients should not have to see in
                 most cases.
               •  Web API is a brand new framework that makes it easy to build HTTP services. As such,
                 it provides several features that make it easy to send back useful and informative error
                 messages in a variety of cases.

            6.7 Keywords


            ASP.NET: It is a Web application framework developed and marketed by Microsoft to allow
            programmers to build dynamic Web sites, Web applications and Web services.

            Exception Handling: It is the process of responding to the occurrence, during computation, of
            exceptions anomalous or exceptional situations requiring special processing often changing the
            normal flow of program execution.
            Hypertext Transfer Protocol: The Hypertext Transfer Protocol (HTTP) is an application protocol
            for distributed, collaborative, hypermedia information systems.
            Web API: A Web API (Application Programming Interface) is typically a defined set of HTTP
            request  messages  along  with  a  definition  of  the  structure  of  response  messages,  typically
            expressed in JSON or XML.

            Web.Config:  Web.config  is  the  main  settings  and  configuration  file  for  an  ASP.NET  web
            application.
                          1. Create a Web.config file in Visualstudio.

                          2. Prepare a flow chart to handle an exception.

            6.8 Review Questions

               1.  Define the logics of error handling.
               2.  What are the aspects of error handling?

               3.  Explain the levels of error handling.
               4.  Define the web application error handling in ASP.NET.
               5.  Explain error handling in ASP.NET web API.

               6.  Define error handling using the page error or on error sub.
               7.  What is the custom error handling in ASP.NET?
               8.  Define web config file.

               9.  Explain Http response exception.
              10.  Explain global.Asax File?

            Answers for Self Assessment Questions
               1.  (a)    2.  (b)       3.  (c)      4.   (d)       5.   (a)
               6.  (b)    7.  (d)       8.  (c)      9.   (a)      10.   (b)
               11.  (d)   12.  (a)     13.  (d)     14.   (b)      15.   (a)


                                             LOVELY PROFESSIONAL UNIVERSITY                                   127
   128   129   130   131   132   133   134   135   136   137   138