September 2006
18 articles published in September 2006
-
Little Helper – a true Web 2.0 application
Little Helper , the interactive help system for Headlight is now live and almost finished. It is build much like a Wiki so Headlight users can contribute and ask questions. I like to call it a good mix of a blog and an...
-
Wildcard search for domains in C#
At work, we had to do wildcard searches using regular expressions to match allowed domain names. For instance, this expression “*.madskristensen.dk” should match “www.madskristensen.dk”. So, my boss Jimmi wrote a method...
-
Convert a date to the RFC822 standard for use in RSS feeds
Today I wrote a new dynamic RSS feed for a little project called Little Helper . It all works fine, but when I tried to validate it using FeedValidator , the pubDate was invalid. The validator told me that the date was...
-
Firefox and IE read file names differently
In a recent web project I suddenly got an unexpected exception when I was uploading a file using a standard <asp:FileUpload /> control in ASP.NET 2.0. I’ve only been testing the website in Firefox at that point and...
-
Retrieve the subdomain from a URL in C#
Yesterday I had to come up with a method that retrieved the subdomain from the current web request on an ASP.NET website. I thought that the System.Uri class contained that information in an easy retrievable way, but no...
-
Find the number of string occurrences in another string
In C# 2.0 Microsoft introduces some new methods on the String class, one of them being Contains. The Contains method checks if a string in contained within another string in a case-sensitive way. It is very easy to use...
-
Keep security as simple as possible
When building a new application, be it Windows Form or ASP.NET, security is an important factor to consider from the very beginning. There are hundreds of books and thousands of websites helping you to secure your...
-
Validate strong passwords in C# and ASP.NET
It’s always a good idea to have a password policy when creating new applications. A password policy can vary from project to project, but the important part is just to have one to begin with. It is very difficult to...
-
Clean up your music library and other folders
I have a normal sized MP3 collection on my computer and I let Windows Media Player take care of arranging the MP3 and WMA files in the folders based on the media information in the ID3 tags. In my music folder, there is...
-
Update: Stronger password encryption
Yesterday, I wrote how to encrypt a password using a one-way MD5 hash , but as some of the comments point out, the MD5 algorithm is not strong enough. I listened and wrote a new encryption method that uses SHA256 instead...
-
Simple and efficient password encryption in .NET
Four years ago, I was working as a developer in a company that made custom content management systems. We offered back-ups of the databases to our customers on a monthly basis, but in those databases we stored all the...
-
Read file and directory attributes
I’ve just finished a small application that does some IO work on files and directories. The application moves directories to new locations, but every time a folder or file was marked read-only it would of course throw an...
-
Add the correct currency symbol in .NET
You cannot always rely on the browser language as a valid indicator for what currency your visitors use, and sometimes it doesn’t matter because your web application let’s them decide the currency themselves. You then...
-
Get flying with Isolated Storage in C#
Isolated Storage is a place on the disk where your .NET application always has write permissions. That makes it ideal for applications that need to store information such as settings or XML without first asking for...
-
Add your blog to IE7’s search providers
Internet Explorer 7 comes with build in web search from the toolbar, just like Firefox have had for years now. The cool thing about it is that you can offer your visitors to add your blog search to the different...
-
Performance optimization of an if/else-statement
Have you ever considered how well a regular if/else-statement performs? I haven’t, but after watching this Channel9 video I wanted to test it. In the video, Brian Beckman explains that the order of the statements is...
-
Add Windows Live Alerts to your blog
Some of my readers have been asking me how I’ve added the Windows Live Alerts functionality to this blog. I simply love this feature and I hope that it will spread to some of the blogs I read daily. It allows me to get...
-
A smart base class for business objects
As you may know by now, I’m a big fan of Rockford Lhotka’s CSLA.NET framework and base classes. It’s packed with all sorts of cool functionality and I’ve used it for several years in various projects, but often I’ve...