Steve Smith's Blog

Musings on Software and the Developer Community

Archives - June 2010

Budding Versus Festering Code

This is in response to Michael Feathers’ recent post on Festering Code Bases and Budding Code Bases . Certainly the default tooling in the Visual Studio space has, until recently, made it dramatically easier to add code to an existing class than to create a new class.  However, tools like ReSharper...

Budding Versus Festering Code →

Posted on Tuesday, June 29 2010         No Comments

Disable Hibernation on Servers

Here’s a quick tip if you should find several GB of your system drive taken up with hiberfil.sys on a production server machine (as I recently did with a virtual server with a very small C partition) – Disable Hibernation. Disable Hibernation 1. Open a command prompt as administrator 2. Run this command...

Disable Hibernation on Servers →

Posted on Monday, June 28 2010         4 Comments

Default Encoding of Strings in ASP.NET MVC 2

If you have ASP.NET MVC 1 code you are moving to ASP.NET MVC 2 (and ASP.NET 4) you are likely to encounter a problem in which your application starts displaying encoded HTML on the page rather than the actual results of that HTML (e.g. you see <a href … /> instead of a hyperlink). One of the greatest...

Default Encoding of Strings in ASP.NET MVC 2 →

Posted on Thursday, June 24 2010         8 Comments

Tagging Releases in Source Control

A best practice when you’re using source control is to tag your releases.  What does this mean, exactly?  If you’re following the relatively standard non-distributed source control repository folder structure of having root folders for: branches tags trunk then it means simply making a copy...

Tagging Releases in Source Control →

Posted on Wednesday, June 23 2010         2 Comments

Great Uses of Using Statement in C#

In my last post about testing emails in .NET , I noted the use of the using statement to ensure safe usage of the IDisposable SmtpClient and MailMessage objects.  This is the typical usage of the using statement, but you can take advantage of this statement’s behavior for other scenarios as well...

Great Uses of Using Statement in C# →

Posted on Monday, June 21 2010         14 Comments

Moving a Certificate Between Web Servers

I’m in the process of moving Lake Quincy Media’s web site from one server to another, and since it uses SSL to secure users’ data, I had to move the certificate to the new server as part of the server move.  Fortunately, this process is quite painless.  First, you need to export the certificate...

Moving a Certificate Between Web Servers →

Posted on Saturday, June 19 2010         1 Comment

SQL Server Error User Group or Role Already Exists in the Current Database

If you restore a database and then try to login to it, you’re likely to run into this wonderful SQL Error: User, group, or role ‘whatever’ already exists in the current database (Microsoft SQL Server, Error: 15023). Unfortunately, using Sql Management Studio alone doesn’t seem up to the task of correcting...

SQL Server Error User Group or Role Already Exists in the Current Database →

Posted on Saturday, June 19 2010         No Comments

Testing Email Sending

Recently I learned a couple of interesting things related to sending emails.  One doesn’t relate to .NET at all, so if you’re a developer and you want to easily be able to test whether or not emails are working correctly in your application without actually sending them and/or installing a real...

Testing Email Sending →

Posted on Friday, June 18 2010         5 Comments

DevConnections Spring 2010 Speaker Evals and Tips

As a conference speaker, I always look forward to hearing from attendees whether they felt my sessions were valuable and worth their time.  It’s always gratifying  get a high score, but of course it’s the (preferably constructive) criticism that’s key to continued improvement.  I’m by...

DevConnections Spring 2010 Speaker Evals and Tips →

Posted on Thursday, June 17 2010         No Comments