-
Ways Developer Can Secure An ASP.NET Application, Part 1
Don’t turn off request validation unless you need to. Request Validation in ASP.NET explains what this feature does, how to disable it if you must in Web Forms, MVC, and Web Pages and how to manually validate request in absence of it. To mitigate Cross-Site Scripting (XSS) attack, encode any input that you output via Response.Write(), em... Read More
-
A Custom WebGrid (My 1st Iteration)
[DEMO (unavailable)](#) [CODE](https://github.com/rodansotto/webgriddemo-aspnetmvc4) To display tabular data in ASP.NET MVC (I’m using MVC 4 at the time), I used the web helper WebGrid. It has sorting and paging but no filtering. Also sorting and paging is only client-side and not server-side, meaning all the d... Read More
-
Nested Transactions in SQL Server
If you have a stored proc that executes a bunch of SQL statements inside a transaction because they are all meant to be executed as one atomic transaction and needs to be executed as quick as possible to avoid blocking too long others who want to call this stored proc, then you need to make sure this stored proc is not nested in another transa... Read More
-
C#: Using or not using
I am not referring to the using directive to import types defined in other namespaces, but I am referring to the using statement to define a scope where at the end of it an object will be disposed, such as this: using (var cn = new SqlConnection()) { // your code here... } Just be aware that the using statement is just a shortcut or a c... Read More
-
Calling .Net Assembly from VBA
Stuck in VBA? You don’t have to be. You can move all your business logic code from VBA to a .Net assembly. It’s easier than you might think and this post will show you how. First you need to create a new Class Library project and below is the basic structure of a COM-callable wrapper for your .Net assembly. // need this so we can decorate... Read More