Author Archive

Overhauling the Security Framework of our Content Management System

The past few weeks have been challenging in an interesting and fun way. We are on track to release version 2.6 of our Content Management System and finally decided it was time to overhaul our security framework. We are moving from a simple role based architecture to a framework that supports the following:

  • Roles
  • Permissions
  • Ability to assign Permissions to Roles
  • Ability to assign Supplemental Permissions to Users external of Roles
  • Ability to assign Roles to Users
  • Ability to grant/deny access down to the control level
  • Reverse capability of locking individual elements down by assigning Roles/Permissions to user created elements

In working on this there have been LOTS of questions as you can imagine. Here are a few resources I found useful and/or interesting while working on this implementation.

  • I am a regular reader of the .NET Security Blog and found the CAS and CLR discussions pertaining to .NET 4 interesting.
  • I found a nice way to get a flattened hierarchy of controls on a page over at the Vault of Thoughts. We implemented something similar but with a few additions.
  • Here is a good read on general role based security.

Derek Bemis

Dispose – Dispose – Dispose – even if it doesn’t do anything

I am always astounded how often I inherit code from smart developers who know what they are doing, but still do not take the time to close and destroy objects. As much fuss is made about memory management and such, this is still an area of coding where laziness abounds.

.Net memory management and garbage collection is intended to free up our need to manage memory at a micro level, but at the same time it is criticized for not freeing up memory fast enough and then blamed for application issues and server slowness. For best practices, never rely on inherent memory management. Where you can, close and DISPOSE!
Read the rest of this entry »

WebApp Vs. Website

The bottom line much of the time, is that developers are creatures of habit… much of what we do, we do because that is what we do, and we have no better reason than that. Perhaps the first time we do something we thought it through, but rarely do we go back and revise those thoughts, and conciously choose a different direction, ideology or methodology… for me this is the case with my choice of choosing Website over WebApp for my development.

Recently I began a new project with a co-worker, and although we discussed every aspect of the project, the coding, the tools, the flow, basically every detail as to what was ahead of us, we never addressed whether this would be a WebApp or a Website project. As I began coding my first page of this project, the dev environment was different, my options had changed, and I knew we had not addressed a fundamental decision that we should have addressed.
Read the rest of this entry »

VisualSVN and our .NET Development Environment

Recently our organization (The Net Impact) made the decision to rebuild our entire development environment. As most know this can be both a daunting and yet exciting venture. During the planning phase we had numerous discussions concerning which source control utility to implement and we finally decided to test Subversion versus Microsoft Team Server.

One of the complaints I have had in the past with Subversion is how clunky interfacing with it has been. I feel that in this day and age any command line interface is past its prime, and having to run external third party interfaces is simply annoying. I wanted something fully integrated into our development tools mimicking the functionality of eclipse and PVCS I had used years back.
Read the rest of this entry »