Thursday, 19 February 2009

WebDD

I was pleased to see a tweet from Phil Winstanley yesterday announcing that there will be another WebDD this year. I went to the one in 2007 and had a fab time.

Once I've come up with some words about myself I'll be submitting my scalability in ASP.NET session. I'm also trying to write a session on scalability with Velocity - maybe this'll be the kick I need...

Friday, 23 January 2009

web.config Administration

This sucks :-(

I was deploying a new ASP.NET 3.5 application to our web servers this afternoon, which uses the AjaxControlToolkit. As part of this the web.config included a 'remove name="ScriptModule"' in the httpModules section. However there was no httpModule called ScriptModule in the parent web.config. When I fired up the application it threw a YSOD immediately. It seems that if you try to remove an entry that doesn't exist, the compiler throws an exception. This seems a little bonkers to me - if you're trying to remove an entry, why should it matter that it doesn't exist? It's easy to fix, obviously, just a bit annoying and I don't see what purpose it serves...

Tuesday, 9 December 2008

Saving Space From C:\Windows\Installer

My home PC has been getting critically short of space recently - medium-term I need to get another hard drive for it but I need to take the case off first to see if I have a SATA connection and it's just a hassle.

I deleted a load of old data last weekend but it hasn't made the dent I was hoping for. I noticed my C:\Windows\Installer folder was huge, like taking up nearly 30% of the used space. I had a look to see it was full of MSI and MSP files, which I didn't know for certain whether I could delete or not. However I Googled the folder path and discovered the existence of MsiZap, which will clean up old Installer files from C:\Windows\Installer. You have to install it and then run 'MsiZap G' from a command line. ZAP! 14Gb gone and a much healthier hard drive :-)

I also discovered Defraggler this week, which might be a better defragger then the Windows XP one or not, but even if it isn't it looks much better as you can see your data moving around the drive as it gets defragged.

Thursday, 4 December 2008

SQLExpress and Compressed Files

Another of those things I'm blogging for future reference...

A little while ago I ran the Windows Disk Cleanup utility to recover some space on my hard drive. One of the things it did was go through my filesystem and compress files that I hadn't used in a little while.

I went back to some of those files yesterday - a WinForms project that I started ages ago that uses a SQL Express database - but when I tried to run the project I got strange errors in my DAL. I fired up SQL Management Studio and attached to my SQL Express instance, where things got even stranger. I had two databases showing, one with the path to my database and one with just the name of the database, but no plus sign next to them to expand them. Couldn't detach them, couldn't delete them. I did a bit of Googling and I saw a comment that SQL Express doesn't work with compressed files. Almost instantly I figured out what had happened - I uncompressed all the files in the folder and everything started behaving itself again.

Tuesday, 2 December 2008

Removing Items From the OutputCache

Today's learning point from StackOverflow:

Whilst it's clear that using output caching is a Good Thing, it can be a little counter-productive sometimes if a user changes some detail that invalidates the cached version of the page e.g. changing the price of a product, adding a new comment to a blog post. But as I've now discovered you can programmatically remove the cached version of the page by calling this static method on the Response stream:
Call HttpResponse.RemoveOutputCacheItem(myCachedUrl)

Looking it up on MSDN I discovered that this method has been present since .NET 1.1 and I've never come across it before!

Sunday, 23 November 2008

DDD7 - ASP.NET Scalability

I'd like to thank the organisers and attendees for giving me the opportunity to present 'This One Goes Up To 11, or How To Write Scalable ASP.NET' yesterday at DDD7 at Microsoft in Reading. It was my first time presenting at DDD, and I really enjoyed it. My session seemed to go quite well, there were a couple of demos I need to go through again to figure out why they didn't work, but overall I felt it was quite well received. All the sessions were videoed for Channel 9 , which is both quite exciting and means I'll get to see the sessions I couldn't get into :-)

A session I did get into was Phil and Dave's ASP.NET 4.0 runthrough. A lot of things are still under wraps, but one of the most useful things they demoed was the ability to set a control's ID and not have it munged with the control's container name when the html hits the browser. Which is nice. I feel validated in being unsure about MVC now I've heard that Phil's not keen on. It'll be interesting to see the new provider-based caching model when it arrives, especially as this will fit really well with Velocity. I'm not, however, at all sure about the new WPF-based Studio.

Edit: My slides and code samples are now available at www.philippursglove.com/ScalableASPNET.