Tuesday, November 28, 2006

To support Web Farms (multiple machines) or Web Gardens (multiple processors), changes to the ASP.NET configuration will need to be made. Thankfully this is just configuration; no code changes would need to be made.

The main thing to be aware of when setting up for a farm/garden is that a user's request can hit any processor or server. As such, the user's session needs to be available across the entire farm/garden and so session state cannot be held locally in memory, which is the default configuration.

The following links give further details on what can be involved:

Session-State modes: http://msdn2.microsoft.com/en-us/library/ms178586.aspx
Web Garden Model: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/dngrfTheASPNETHTTPRuntime.asp

posted on 11/28/2006 7:23:57 PM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]
 Friday, November 24, 2006

I was forwarded the following link to a pretty comprehensive list of online generators.

http://www.smashingmagazine.com/2006/11/09/online-generators/

It seems there’s one for any occasion. I particularly like the ColorBlender.com which will give you a colour matching palette based on a preferred starting color. Perfect for those of us not trained in Graphical Arts to produce something aesthetically pleasing!

ColorBlender.com screenshot
posted on 11/24/2006 6:18:42 PM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]
 Tuesday, November 21, 2006

It's not an error message that you see often when working with ASP.NET, but if you’re deploying to a new, clean machine, it can happen quite easily.

Failed to access IIS metabase screenshot

The problem comes around due to the order that components were installed on the machine, namely that The .NET Framework was installed before IIS. As a result, ASP.NET is not correctly configured to run. The easiest way to rectify this is to re-install ASP.NET with IIS.

aspnet_regiis –i

If you only require default settings then this is the easiest option. The Microsoft KB specified in the error message suggests the –ga switch, but that requires a little more knowledge of the Windows system as it requires you to specify the Windows User Account to run under (which is different between Windows 2000, XP, 2003, etc). Easier to simply use the –i switch!

posted on 11/21/2006 5:46:12 AM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]
 Monday, November 20, 2006

I’ve been using NMock 1.0 as part of my normal TDD (Test Driven Development) routine for a while now. I’d heard that there was a new version available a couple of months ago, but I saw no benefit in making the switch. For a start, the syntax was radically different and I was reluctant to invest time in seeing how to use it.

 

Well, I finally got around to using NMock 2.0 and after much searching, found a link to the site: http://nmock.sourceforge.net.

 

That link was surprisingly difficult to track down I can tell you … numerous dead-links and empty websites all over the place! I had to cheat in the end and ask a friend for it (thanks Neil)!

 

The new syntax has grown on me after an initial distaste for it. It may look more complicated and cumbersome than previously, but it is actually more usable once you get into it. The only issue I have with it is that the failure messages are very verbose, which can make it a little difficult to see what is going on, but I guess you get used to that too.

posted on 11/20/2006 5:54:22 AM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]
 Friday, November 17, 2006

When you're developing and testing your system, you'll want to test that any emails sent are actually being sent to the SMTP server correctly: the html format is all ok; email from and email to are correct; etc.

 

An easy way to do this is by configuring .NET to drop the emails you send to a specific folder. As long as you’re sending your emails via SmtpClient and are configuring it via the web.config file (if not, why not?), the following configuration section will set up the email folder:

<system.net>
   <mailSettings>
      <smtp deliveryMethod="SpecifiedPickupDirectory">
         <specifiedPickupDirectory pickupDirectoryLocation="C:\Temp\EmailPickupFolder"/>
      </smtp>
   </mailSettings>
</system.net>

If you then browse to the folder, you’ll see files like below. When opened in notepad, you’ll see the email in it’s raw format, or if you need to check any Html formatting, you can open it in Outlook Express.

 

Notepad View

Outlook Express View

posted on 11/17/2006 12:04:22 PM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]