Validating Application Input

When working on real-world projects, there may be scenarios where different kinds of users access your application and enter information in to it. In the event that any aspect of the scenario was not handled properly, or any input data was not properly parsed, this can cause your application to crash or result in the corruption of your application data. Even though you validate all the input data used and accessed within your application when deployed in production, input data can interact with other external applications, which can place your application in jeopardy.

The purpose of this chapter is to understand the importance of validating input data in your application. Different validation techniques are available in the .NET Framework to validate JSON data and XML data.

In upcoming sections, we will focus on why it is important to validate input data, how we can manage data integrity, how to use framework-provided parsing statements and regular expressions, and how to validate JSON and XML data. After reading this chapter, you will be able to create application logic to validate incoming data and also handle scenarios where exceptions might occur.

In this chapter, we will cover the following topics:

  • The importance of validating input data
  • Data integrity
  • Parsing and converting
  • Regular expressions
  • JSON and XML

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.41.148