I somehow missed this one, but just yesterday ASP.NET MVC made it to Beta status. Justifying its own download page on the MSDN. I haven’t had a chance to read the release notes to see what all is new, as I am currently in process of uninstall Preview 5 to make way for this new release.
Month: October 2008
A Generic Error Occurred in GDI+
You know you’re doing good when your application crashes with an exception as detailed as “a generic error occurred in gdi+”. That is about as, well generic, as it gets :- )
In my particular case I was constructing an Image down in my DAO using the FromStream method, like so:
Image result; using (FileStream file = File.OpenRead(filename)) { result = Image.FromStream(file); file.Close(); } return result;
I was doing this so that I could know for a fact that the file was being disposed of properly. I didn’t want to have any orphaned file references locking up the file in case I later needed to delete it.
The problem was that up in my UI I was attempting to call the Save method on Image to dump its contents out to the ASP.NET response stream, like so:
img.Save(HttpContext.Response.OutputStream, ImageFormat.Jpeg);
Silverlight Progress Bar
Silverlight 2 provides an attractive platform for creating Rich Internet Applications, however when first getting started both the oddities of the layout model and the strange absence of certain controls and class and be puzzling.
One such puzzling absence from the Silverlight tool chest is a progress bar control. WPF has a progress bar, WinForms has a progress bar, but not Silverlight. Fortunately implementing one is not that hard and provided a great introduction to Silverlight’s layout model.
Silverlight and layers
Unlike ASP.NET, and many other forms technologies, Silverlight uses a multiple layer positioning system. The Canvas control is especially useful for allowing multiple controls to be layered.
Take for example this simple block of XAML:
<Canvas x:Name="LayoutRoot" Background="WhiteSmoke"> <Rectangle Width="60" Height="60" Fill="Green" /> <Rectangle Width="60" Height="60" Fill="Gray" /> <Rectangle Width="60" Height="60" Fill="LightBlue" /> </Canvas>
Silverlight MessageBox
Silverlight oddly enough lacks a MessageBox class. Fortunately Silverlight’s HTML Bridge exposes the JavaScript Alert method, which is functionally the same thing.
Vista Can’t Read CDs
I recently encountered a strange problem on my Vista (Home Premium x64) machine, in which Vista seemingly forgot how to read CDs. I would place a factory printed CD in my DVD-RW drive and Windows reacted as if it was a blank DVD-RW by asking me to supply a volume name.
Hyper-V Server: First Impressions
Microsoft’s latest offering, Hyper-V Server, is a special edition of Windows Server 2008 in Server Core mode whose only available role is Hyper-V. While this itself is nothing to write home about, the kicker is that its free! Microsoft has decided to release Hyper-V Server as a free product, no registration or activation needed.
Community Coding Contest
Developing an open source project is a very rewarding experience. But sadly (as an open source developer that is) open source projects rarely get the feedback they deserve. Often the developers only hear feedback from their users when their software is broken, because of this it is often difficult to know when an author’s work is truly appreciated.
Point Release
Just a quick update, a new version of aspNETserve has been release. Version 1.3.1 represents a point release containing general bug fixes, and is recommended for all users.