Tuesday, 9 December 2008
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
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
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:
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
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.
Wednesday, 5 November 2008
I did my first professional coding on Win3.11 in 1997, using VB4.0 (ugh) for the client and Access 2.0 for the database (double ugh). Fortunately I didn't keep a copy of the code, although I think about reworking it occasionally as a web app with all I've learned since then.
I confess I had no idea MS still sold licenses for it as an embedded OS, though I guess it makes sense as a solid OS and if you have no need for a display etc it probably worked quite well.
Monday, 3 November 2008
First thoughts are that they've done a lot of work since CTP1.
I installed this CTP tonight and ran up a super-quick demo, and it worked perfectly first time. And by perfectly I mean once I'd fixed my code. And by first time, I mean once I'd updated my web.config. This is good as it means all the problems were on my end, not theirs! (Same old story)
I'm going to have a bit more of a play today/tomorrow and will post some more details then. I've also got the PDC videos to watch.
Friday, 10 October 2008
Suddenly I'm rather nervous and wondering if I can actually pull this off...
Thursday, 2 October 2008
I converted one of our Web Application projects the other day from Visual Studio 2005 to Visual Studio 2008. It all built on my machine without any problem, but when one of my colleagues opened the updated project in 2008 on his machine it opened as a Website.
Eventually I compared folders between my machine and his, and I spotted a ProjectName.vbproj.webinfo file. I had a quick look at it in Notepad, the contents all looked correct but I had a sneaking suspicion that this was the culprit. I moved the file up a folder, and then re-opened the project in VS, just to see what happened. And it opened as a Web Application.
Thursday, 4 September 2008
Friday, 29 August 2008
I couldn't work out how to adjust the security enough to make our menus work in our own application, and also our intranet menus weren't working either. Looks like I'll have to have a look at the UserAgent string to fix that.
So I'm back on IE7, which I love.
Thursday, 28 August 2008
I installed it today - haven't given it much of a workout yet but here are some first thoughts.
Standards mode by default is interesting, I think I'm going to see some odd result over the next few weeks.
I love that items in the Address Bar history can now be individually removed, the drawback with this is where they've put the button. It'sright on the right-hand edge of the dropdown area, which means if you drop it down from the arrow, it's then far too easy to click on a url and delete it instead of going to it. More usability research required here Microsoft!
Looks like security has been bumped up a bit again, which as a general concept I approve of. However it looks like it's broken our scriptlet-based menu and I haven't found how to turn the security down enough to resurrect it yet :-(
Friday, 22 August 2008
- You do not stop the Sharepoint Central Admin service.
- You DO NOT stop the Sharepoint Central Admin service.
To get it back, you need to run the Sharepoint Products and Technologies Configuration Wizard. If you've already created a site, you'll be asked if you want to overwrite it, create a new site, or not to create a site. I chose not to create a site as I didn't want to screw up previous work. The wizard then ran through and at the end of it I had a working admin site again.
I tried some playing around with the STSADM command-line tool with the -createadminvs option, which looks like it ought to create a new admin website for you (I'm assuming the vs bit is short for Virtual Site) but I couldn't make this work and I couldn't find any discussion of this through Google to suggest what I was missing.
Friday, 15 August 2008
We're looking at redoing the menu ystem for our application which means we're getting into all the yummy provider goodness that shipped with ASP.NET 2.0.
Except there's a provider missing and it's one we could really do with. Although we can use the XmlSiteMapProvider to generate a menu, it doesn't stop a user typing a URL directly into the address bar. We can stop this by setting up each URL with a
Thursday, 7 August 2008
Am I going? Certainly not on the strength of this discount on it's own.
Now that an agenda's been published, I'm considering it. I'd be interested to see ScottGu's (all hail, we're not worthy etc) session on ASP.NET MVC, but right now that's about the only must-see. Hopefully it'll all be videoed so I can watch at my leisure later.
I've been having trouble getting the security patch KB948109 installed on my laptop - SMS has tried installing the patch about six times now, it seems like my SQL Server instance is patched but my SQL Express instance refuses to take it even if I stop the SQL Express service :-(
One of the things I tried last week manually going to Windows Update to install it. While I was there I noticed Windows Search 4.0 and thought I'd install that too. Big mistake.
Immediately after I installed Search, any use of the Google Toolbar crashed the toolbar and then IE. It took me a day and a half to get back to some kind of working configuration, even using Windows Restore didn't solve the problem. I don't have a proper resolution now, I can't use the Google Toolbar and using the IE Search box with Google has ... interesting effects.
Tuesday, 5 August 2008
But I got to thinking about it last night and it occurred to me that Velocity does more or less the same things i.e. allows you to perform CRUD operations on data in a non-relational store, is suited to cloud computing etc.
Except Velocity works on Windows, and Drizzle doesn't. Which really is a courageous decision - love it or hate it, it's the most widely used OS. As a Microsoft developer, if I can't use something on Windows I'm not going to use it at all, so it's difficult to see Drizzle taking off. Maybe Microsoft should make a publicly-available Velocity store available in the cloud and position it as a competitor to Drizzle. Now that would be a Live/Mesh/Whatever service I'd like to use.
Wednesday, 23 July 2008
Slightly annoyed that I've seen no mention of these on the Velocity team blog!
Monday, 21 July 2008
I used Firefox a lot last week on my BizTalk course at DevelopMentor, and the installation of FireFox on the machines had a couple of really nice FF plug-ins that I hadn't come across before.
- FasterFox - which shows you how long a page takes to download. This is really nice, the only thing I don't like is having to register with Mozilla before it would let me install it.
- FoxClocks - which puts clocks for different time zones on the FireFox status bar.
And now I'm missing these features in IE :-(
I was sat at Starbucks at Liverpool St on Friday afternoon waiting to get a train back to East Anglia, and browsing on my N95. T-Mobile offered me 'Cool Applications' - how could I not follow the link! Which led to me installing Opera Mini on my phone. I had a little play with it, so far I'm not overly impressed (there's no pointer!) BUT this may be a case of me just being used to the Symbian web browser....
Friday, 11 July 2008
I'm pretty sure I'm doing the right things, I suspect it's a configuration issue. The exception I'm getting (having modified my code slightly to throw CacheExceptions rather than just Exceptions) is 'Could not connect to cache service'. I'm slightly gratified to see Christian Weyer gets the same problem - if someone like that gets it, what chance do I have! ;-)
For now, I've removed the extra instances so I'm back to a single host. I thought briefly that it was due to not having set up 'Everyone' to have read/write access but that didn't fix it. Worth remembering as a setup action though.
I'm going to review all my .config files to see if I've missed something - if I don't find anything then I guess it's for the Velocity team.
Thursday, 10 July 2008
I've used some of the attributes Craig talks about before - I'm a fan of DebuggerStepthrough for code like property getter/setters where I'm pretty sure they're bulletproof bits of code. I think it's worth noting that you can still set breakpoints in code with DebuggerStepthrough on it and your code will break there if you still need to debug it.
Haven't come across Tess Ferrandez' blog before but it looks like she may well deal with some hardcore ASP.NET debugging situations. I love her Yoda-like 'if it is broken, fix it you should'! Subscribed.
I saw John Robbins speak at DevWeek a few years ago - the man's a legend! I love the concept of a developer who used to be in Special Forces. And it reminds me that I must go back and read some more of his 'Debugging .NET 2.0 Applications'.
Tuesday, 8 July 2008
I was poking around in the Object Browser at the System.Data.Caching namespace and I discovered that the context-sensitive help for each method is probably more helpful than the helpfile.
But more interesting than that, the help for Cache.Add(key As String, value As Object) suggests that if you call this particular overload, the item gets cached in the default region of the cache. Which raises all kinds of questions: if there is a region created by, well, default, which host is it tied to? Does the default region span hosts (in which case regions suddenly become a lot more appealing to me)? Can I use the default region everywhere?
Now I've got multiple instances, I can do a bit more experimentation with regions and see if they start to be a bit more useful, but I suspect my next course of action is to run ClientLibrary through Reflector and have a look at what Cache.Add actually does.
Friday, 4 July 2008
You use the CacheFactory to create an instance of a Cache. So far, so good - I like the Factory pattern. What I'm not so keen on here is that the CacheFactory's methods all have to be called on an instance e.g. instead of:
Dim cache As Cache
cache = CacheFactory.GetCache("MyCache")
you have to write:
Dim factory As CacheFactory
Dim cache As Cache
factory = New CacheFactory
cache = factory.GetCache("MyCache")
[EDIT: It came back to me at the weekend that these are called static methods, or Shared in the one true language of VB]
It's a small annoyance, but I'm a small person sometimes.
I'm going to come right out and say it: I don't get Regions. I'm completely sold on the concept of a single cross-machine cache - it solves the major issue with the ASP.NET Cache (which runs per-machine). So why then require Regions to live on a single machine? It's like they're saying "here, do this to be fault-tolerant, but to get the most out of it you have to do things that aren't fault tolerant".
It's doubly frustrating when you discover that if you want to add an item to a Velocity cache with an expiry time, you have to add it to a Region. The Cache on its' own just allows you to add an item that's there forever.
I really think dependencies are the biggest missing element in the first CTP of Velocity. The SqlCacheDependency in .NET 2.0 was the biggest enabler for caching as it meant you could run multiple web servers and keep their caches in sync with database changes without much effort. You can't do this in CTP1.
I'm interested to see Barry has proposed a session on Velocity for DDD7. That's good 'cos it means I can pick his brain for suggestions to solve some of these things!
A bit of Googling suggests that the problem is between Management Studio and Intellipoint. I started hunting through Microsoft's support pages looking for someone to pin this on but it seems the SQL Server team are aware of this but said they aren't going to fix it (though this report is marked as Active at time of writing). Anyway I ended up on the Hardware Support pages where I discovered that I get two free support calls with my Wireless Presenter Mouse. So I've logged the problem with them but with the Intellipoint team, not the SQL Server team. Hopefully the Intellipoint team can either come up with a hotfix or alternatively make the SQL Server team come up with a hotfix. Either way I'm hoping we can get a permanent resolution to the problem.
Update: I've had a first contact from Microsoft. Didn't get to talk to them as I'd already left for the day but I'm hopeful this means they've accepted the issue!
Update 2: Looks like my contact at Microsoft is now trying to pass this off to the Windows team.
Thursday, 3 July 2008
Monday, 30 June 2008
Haven't tried coding against it yet but I had a bit of a play with the command-line admin console and read some of the help.
The most obvious missing element right now is a CacheDependency object (+ subclasses viz. SqlCacheDependency) - I've been trying to think of a way to chain this and the ASP.NET Cache together to retain the ability to have dependencies butI haven't come up with one yet :-(
I'm intrigued by the idea that you can lock and unlock cached objects, though since in the finished version it should run across multiple servers I guess this is a way to avoid race conditions.
Edit: Something else missing I just discovered is that the service out of the box doesn't survive a restart i.e. you have to go into the Admin console and issue a new 'START CLUSTER' command. I've now marked the Windows service as 'Automatic', not 'Manual'.
Thursday, 26 June 2008
I installed the MS OpenXML SDK this morning (from http://www.microsoft.com/downloads/details.aspx?FamilyId=AD0B72FB-4A1D-4C52-BDB5-7DD7E816D046&displaylang=en) after reading about it in Woody's Office Watch. I was hoping it would have classes to let you generate Office documents on a server without having Office itself installed (been bitten by this before). Unfortunately, it doesn't. Or at least not that I can see from looking at the Class Reference in the Help.
BTW Microsoft, what's with shipping the help file as a CHM? I thought all DevDiv products now shipped with MSDN-style help (don't know the technical name for that one). The helpfile is also slightly unpolished - all the 'How Do I' topics are suffixed with '... using the OpenXML API' - isn't that slightly obvious in the OpenXML API Help!
Wednesday, 25 June 2008
For Each item in Collection.items
it's quite feasible to get an error which says you can't edit the collection you're iterating over while you're iterating over it. Which kind of makes sense.
The trick to doing it is to iterate over it backwards e.g.
Dim i As Integer
For i = Collection.Count To 0 Step -1
item = Collection.Item(i)
This way, you remove the items from the end of the collection, not the middle, which allows the .NET Runtime to keep track of the collection correctly.
(This might seem obvious to some but it held up some coding for me for about a month until a colleague made chance remark about it!)
Tuesday, 24 June 2008
However when I tried to create the first form subclassing my base form, I got an 'Ambiguous match found' error in the Visual Studio designer. Couldn't find any obvious solution from Googling (partly why I'm blogging it here), but the solution was to rename the button on the base form to 'MyCancelButton' (or, I suspect, anything but CancelButton). It seems that even if my CancelButton was marked as Shadows, the VB.NET compiler isn't quite cute enough to figure out what's supposed to happen.