How to hide URL query information in ASP.NET in VB.NET

In many cases, the URL query contains information that should keep on hidden from the user. You can switch to another form of state management or encrypt the query string. You can encrypt the query string by using the cryptography classes provided with .NET and by leveraging the DPAPI.

As a first step you should […]

How to hide URL query information in ASP.NET in C#

In many cases, the URL query contains information that should keep on hidden from the user. You can switch to another form of state management or encrypt the query string. You can encrypt the query string by using the cryptography classes provided with .NET and by leveraging the DPAPI.

As a first step you should […]

How to use dynamic queries with multiple values to protect ASP.NET web application from SQL injection in VB.NET

There is a specific kind of SQL injection that is related to handling multiple values in a query. Multiple values are often used in dynamically generated queries, for example, in combination with IN SQL clause or when you need to filter by different words.  In this case you want to apply the same technique […]

How to use dynamic queries with multiple values to protect ASP.NET web application from SQL injection in C#

There is a specific kind of SQL injection that is related to handling multiple values in a query. Multiple values are often used in dynamically generated queries, for example, in combination with IN SQL clause or when you need to filter by different words.  In this case you want to apply the same technique […]

How to use parameterized SQL queries to protect ASP.NET web application from SQL injection in VB.NET

SQL injection is used as a way to gain control over a web application by simply injecting some specially created SQL query via a parameter. This kind of the worst attack for a web application is caused by improper handling of string concatenation. The next code lines illustrate a typical problem related to SQL […]

How to use parameterized SQL queries to protect ASP.NET web application from SQL injection in C#

SQL injection is used as a way to gain control over a web application by simply injecting some specially created SQL query via a parameter. This kind of the worst attack for a web application is caused by improper handling of string concatenation. The next code lines illustrate a typical problem related to SQL […]

How to use asymmetric encryption in ASP.NET in VB.NET

If you have to use asymmetric encryption in your ASP.NET project you can use the class described in the article How to create asymmetric encryption utility class in ASP.NET in VB.NET. To illustrate this you can create a page that permits you to generate a key and enter clear-text data through a text box. You can […]

How to use asymmetric encryption in ASP.NET in C#

If you have to use asymmetric encryption in your ASP.NET project you can use the class described in the article How to create asymmetric encryption utility class in ASP.NET in C#. To illustrate this you can create a page that permits you to generate a key and enter clear-text data through a text box. […]

How to create asymmetric encryption utility class in ASP.NET in VB.NET

The major difference between symmetric and asymmetric algorithms is key management. Symmetric algorithms have one key, and asymmetric algorithms have two keys: public key for encrypting data and private key for decrypting data. The public key can be available to everyone who wants to encrypt data, the private key should be available only to […]

How to create asymmetric encryption utility class in ASP.NET in C#

The major difference between symmetric and asymmetric algorithms is key management. Symmetric algorithms have one key, and asymmetric algorithms have two keys: public key for encrypting data and private key for decrypting data. The public key can be available to everyone who wants to encrypt data, the private key should be available only to […]

Recommended ASP.NET Examples