Attention: We are retiring the ASP.NET Community Blogs. Learn more >

Dev Blog - Johan Danforth

I'm Johan Danforth and this is my dev blog - a mix of .NET, ASP.NET, Rest, Azure and some other random coding stuff.

  • [Refactoring] Tools for Refactoring VB.NET

    I've not been coding any VB.NET for a while now, but when looking into a pretty good sample of how to develop an Outlook style smart client (which is in VB.NET), the walkthrough recommended to use Refactor! for Visual Basic 2005. It's a free plugin from Developer Express inc, in partnership with Microsoft and it supports a bunch of the most common refactorings you need.

    The last 2 years I've used c# all of the time for my .NET projects, but VB.NET is pretty neat actually. I don't mind using VB for coding up presentation layer stuff, and keep using C# for the rest. VB can be somewhat faster to use, as you don't need to think of cases, semi colons and stuff, and you got these new namespaces which gives you fast track access to common functionality which is almost like cheating ;)

    If the link to the sample app is not working for you, try searching on MSDN for "RSS Reader Outlook look and feel" and you should find it. Also available on the VB Developer Center.

  • WinFX Renamed to .NET Framework 3.0

    Picked this up from Soma's blog:

    ...we have decided to rename WinFX to the .NET Framework 3.0.  .NET Framework 3.0 aptly identifies the technology for exactly what it is – the next version of our developer framework.

    What a pack of good stuff developers will get in that release indeed. The CLR will still be version 2.0 though. Jazon Sander posted some details around questions that followed directly after that announcement, like these:

    1.  What version of the compilers are being used?  .NET FX 3.0 is built on .NET FX 2.0 including the CLR and BCL.  This means you will be using the 2.0 C# and VB compilers from the redist when using .NET FX 3.0. 

    2.  Will .NET FX 3.0 contain LINQ support?  No.  LINQ support is in the Orcas product which is shipping after .NET FX 3.0 (which ships in Vista).

    I think I'll have to figure out a new tag taxonomy for my blog posts :)

  • [Vista] Getting Daemon Tools to Work in Vista Beta 2

    Try this at own risk (see below)

    If you like me use Daemon tools alot and want to get it to work in Vista Beta 2 - Try downloading an older version 3.02 from the D-tools archives. It worked for me.

    You may have to disable UAP to install the drivers though, which is done via the System Configuration tools (the Tools tab).

    One strange thing which happened just now though is that Vista tried to re-active again it seems, and it failed. I looked at "Welcome Center" and yep - my Vista is no longer activated and when I try to activate it fails with error code 0x8007000D Not sure if it was disabling of UAP or installing D-tools that made this thing happen...

  • [Vista] ATI Drivers for Vista Beta 2

    Found this news article (and downloading as I write):

    ATI today released a major update to its first beta generation Windows Vista graphics driver. The Catalyst Beta package fully supports the Vista Display Driver Model (VDDM) and should deliver greater stability than the previous version and allow a better look at Microsoft's AeroGlass user interface.

    The driver published is available in 32-bit and 64-bit versions and supports DirectX9-compatible graphics processors, including the desktop Radeon processors 9500 and higher, the Mobility Radeon 9550 and higher series, the chipsets Crossfire 3200 and Xpress 200 and 200m as well as the workstation cards FireGL V3100 and higher and FireMV 2200 PCIE and higher.

    EDIT: For some reason that I don't know, I cannot get any higher resolution than 1280 x 1024 on my 19' flat screen, which is no improvement over the drivers which were installed from start.

  • [Vista] Some Things Work - Others Don't

    I decided to be brave and installed Vista Beta 2 on my home computer. Because you have to format the C-drive, I made a huge, fresh backup of most of my files and went ahead with the install. Vista installed fine and started up OK with a few issues:

    My ATI Radeon X850 XT gets a maximum of 1280 x 1024 - I will look for new drivers and see if that helps.

    My Sound Blaster Audigy 2 zs refuse works...almost. I can use the front panel in- and output, but the output from the card on the back of the computer doesn't work at all. I'm currently running my sound via earphones from the front output... I have to investigate this further.

    None of the Daemon Tools versions I've tried so far seems to work properly, which is a disaster because I got most software and backups saved as Images. IsoBuster got me going, but it's not as good as Daemon Tools (which I just luuuuuv).

    I had some problems getting DNS lookups to work for some reasons. I could get to almost all webbsites except a few really important ones (like ms.com, google etc), which were pretty weird. I'm connected to the Internet via a router/firewall and have automatic IP configuration set up. I thought maybe it had something to do with IP6 or something so I just added my ISP DNS servers straight into the network settings and I've had no problems since then.

    When the computer goes into Sleep mode and I want to start from it, it seems to hang in startup and I have to power off  fully and press the power button again. When it starts up, it revovers from the hibernate mode, which seems to work well. Not sure why it cannot get going from Sleep mode but I'll have to investigate.

    Other than that - performance is great, file copying seems to be faster than in XP (!), but maybe that was because I used a really crappy AV software. Someone blogged about some AV which worked with Vista... Ah here it is, blogged by Kristan Kenney on DigitalFile.

    (All of a sudden the Media Player 11 stopped playing in a middle of a song... maybe it doesn't like David Bowie :o) I like the way Media Player 11 minimize to the system tray... I think. It takes up quite some space down there actually...

    What else is there to say... it will take some getting used to the new File Explorer though, but I think it will work out pretty well. The Windows Sidebar is something I will explore some more - I'm thinking of developing a couple of (hopefully) useful Gadgets just for fun if nothing else. The CPU/Mem meter is just beautiful, and the RSS feed viewer is pretty cool.

    Oh, and all these security allowance elevation dialog thingys which keeps poping up all the time you want to start/remove/change stuff will have to go. If you've decided to be local admin on your box you don't want to keep saying yes, Yes, YES, YAHHH DARNIT! all the time. Once should be enough :)

  • [Vista] What does Vista do when it Sleeps?

    I have to say the new "power button" which puts Vista into the new "Sleep" mode seems nice. My 2 Ghz laptop (which doesn't have much on it yet I must admit) goes to sleep in 1 second and starts up in pretty much the same time. Superfast - I like it.

    As I understand it, by default a laptop is put into sleep mode when the power button is pressed, then goes into hibernate (saves memory to disk) after a few hours or so, to save power. When resuming from hibernate it takes a bit longer for the box to get going, but that's understandable. It's possible to configure what happens when you press the power button or close the lid, also depending on if you're on battery or plugged in.

    You can read more of what Vista does when it's in sleep mode on the Microsoft Vista Performance pages.

  • [Ajax] GWT - Google Web Toolkit

    Related to what I wrote in my previous post about Script#, there is already GWT - Google Web Toolkit, which does something similar but with Java. You write your front end in the Java language, and the GWT compiler converts the code into JavaScript and HTML.
  • [Ajax] Check Out the Script# Prototype

    This should interest all of you who are into AJAX, Atlas and that kind of stuff no the ASP.NET platform - Nikhil (who is an architect on the Web Platform and Tools team at Microsoft) releases a prototype of a C# to Javascript/Ajax compiler and looks for feedback:

    Script# brings the C# developer experience (programming and tooling) to Javascript/Ajax world. This post shares a prototype project for enabling script authoring via C#...

    Check it out - Nikhil also got a video to explain how it works.

  • Stylish Quotes in Blog Posts

    I found a few CSS tips and tricks to format (in my view) prettier quotes in your blog posts. For example:

    This is a quote.


    For the above, I added this CSS:

    blockquote {
      background: transparent url(quoleft.png) left top no-repeat;
    }

    If you want to add a closing quote to it as well, add this:

    blockquote p {
      padding: 0 48px;
      background: transparent url(quoright.png) right bottom no-repeat;
    }

    If you use <P> inside the quote, you may get additional quote signs, so use a couple of <BR /> instead.

  • [Vista] Is Sami the Default Swedish Language?

    I had heard about this before, but someone had also said it was going to be fixed for beta 2. Looks like it wasn't because when I selected Sweden as my region, it defaulted to Sami, Lule (Sweden) as language :)

    There were actually 3 different Sami dialects available; Lule, Northern and Southern, which is amazing in itself. I had no idea we had all these different versions of the Sami language... I can't remember seeing Finnish in that list though, but it should be.

    Overall, the installation went really smooth, but I'm installing on the bare metal here, and not in VPC or Virtual Server. Graphic is stunning...