Force MVC Route URL to Lowercase

So one of my pet peeves in web development is mixed case URL’s. And I usually make sure that all my URL’s in my personal projects follow this standard. I also believe, contrary to my URL case standard, that my code should follow standards .NET naming techniques, such as Pascal casing for my method names. These two naming standards come in to conflict with MVC because the name of the action method in the controller is used in its native Pascal case. Which generates URL’s that look like this: ...

March 31, 2008 · 2 min · 234 words · Nick Berardi

ASP.NET MVC: Securing Your Controller Actions (The .NET Framework Way)

So I just read Rob Conery’s blog post on Securing Your Controller Actions in MVC. I was a little perplexed about why guys at Microsoft love to reinvent stuff they have already done. I know Rob Conery is a really smart guy and has a wonderful grasp of the .NET framework, so I would have to assume he knows about what I have outlined below. My only guess is that he just wanted to re-invent something that is already built in to the framework using his own code. ...

March 13, 2008 · 3 min · 461 words · Nick Berardi

ASP.NET MVC Preview 2 CAPTCHA using ActionFilterAttribute

My last article on ASP.NET MVC CAPTCHA was very well received by many of my readers and it even caught the eye of the DotNetKicks crowd. Now that MVC Preview 2 was released last week, many new features make encapsulating my CAPTCHA control even easier. Most notably is the ActionFilterAttribute which allows you to override the Pre and Post action events for any action the attribute is applied to. Basically everything works the same as it did in the previous article. I just modified things for MVC Preview 2. To validate the CAPTCHA you add the attribute CaptchaValidation to the action. ...

March 9, 2008 · 1 min · 203 words · Nick Berardi

Singularity Source Code Released to CodePlex

Just saw on OSNews that Microsoft Research has just released the Singularity Source Code on CodePlex. Microsoft has released source code from the Singularity research project onto Codeplex under an academic, non-commercial license. “The Singularity Research Development Kit is based on the Microsoft Research Singularity project. It includes source code, build tools, test suites, design notes, and other background materials. The Singularity RDK is for academic non-commercial use only and is governed by this license.” ...

March 4, 2008 · 2 min · 266 words · Nick Berardi

ASP.NET MVC CAPTCHA

Note: Most recent update for MVC Release Candidate 3 is out. So my MVC application that I have been working on required a CAPTCHA today. The problem is that all of the solutions out there, that I could find for ASP.NET, are control based and I wanted a more MVC approach. I know I could have easily implemented one of them using the Html.RenderControl(), however I want to use a MVC approach to the CAPTCHA authentication box. So I started out with Jeff Atwood’s CAPTCHA Control made for ASP.NET 2.0 in VB.NET 2005. I then converted it to C# and modified and expanded on it for the MVC framework. The following is the result of my work. ...

March 3, 2008 · 3 min · 620 words · Nick Berardi

ASP.NET MVC Route Validation and SEO

Recently I have been using the ASP.NET MVC framework for a project at work. And one of the requirements was that certain data inputed in to the URL be tightly verified. I originally thought that data was verified by the type specified in the ControllerAction, however I came to find out that it wasn’t. So if you have say a page number and the user enters a letter in the URL the application just proceeds on it’s marry way. For example on the Kigg site: ...

February 27, 2008 · 3 min · 621 words · Nick Berardi

What I Learned About MVC On Day One

I am really blown back about how fast and easy MVC is to develop with. I know the guys at Microsoft do a good job with their .NET coding, but I am really impressed by the forethought they put in to MVC. It builds on top of the standard ASP.NET package, but does it in such a way that makes it lean on top of the already feature-rich (read bloated) ASP.NET Page object. It really doesn’t feel like I have all that baggage anymore. ...

February 25, 2008 · 1 min · 165 words · Nick Berardi

Nick Berardi's Essential Software for 2008

Every developer has their favorite tool collection that they must have in order to survive while developing software. The list below is indispensable in my day-to-day activities and that is why I am sharing it with my readers. My list was inspired by Scott Hanselman’s own list of tools that he uses. However I would be really interested to see what Scott’s actual list is since it would be almost impossible to touch each and every tool once a week as he claims. Because many of them serve the same purpose. ...

February 24, 2008 · 7 min · 1410 words · Nick Berardi

LINQ Cheat Sheet

This cheat sheet was compiled by Milan Negovan at http://www.aspnetresources.com/. It is very handy and I recommend everybody download it and print it out. Download: LINQ Cheat Sheet Document

February 11, 2008 · 1 min · 29 words · Nick Berardi

How to use the .NET URL Rewriter and Reverse Proxy to run WordPress on IIS

First off I would like to say that many of my readers are very intelligent, they picked up on a one line sentence in my last post about my new design and Coder Journal switching from Linux to Windows. I also moved hosts from GoDaddy’s shared Linux hosting. To GoDaddy’s virtual dedicated hosting on Windows. This proved difficult since URL Rewriting isn’t currently built in to IIS 6.0 like it is in Apache. I will talk a little about this setup in a later post. ...

February 10, 2008 · 6 min · 1137 words · Nick Berardi