Rick van den Bosch - Blog

... on .NET, software architecture, software development and whatnot

Recent Posts

Tags

News

  • Live space

    Photo blog

    Follow me at twitter

    Rick  van den Bosch

    LinkedIn profile

    Add to Technorati Favorites

    Disclaimer
    The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Community

Email Notifications

Blogs I read

Interesting links

Archives

April 2008 - Posts

Live Mesh, a first look

This morning I found a mail in my inbox telling me I was invited to Live Mesh. That's a nice start of the weekend, so thanks Jan! The Live Desktop user interface looks pretty cool, and it almost feels like a real desktop. But that part of Live Mesh is pretty much like Live SkyDrive: a big online disk for you to put stuff on. Lots of stuff. 5 Gigabytes worth of stuf... ;)

I immediately went to the installer for my machine, because that would make Mesh stand out from an online storage service like SkyDrive. But I was kinda surprised to get this message: 'Product does not support running under elevated administrator account or with UAC disabled'.

mesh_uac

Say what? So Windows Vista enables me to disable User Account Control, but the Live Mesh notifier* will not install on a machine that has UAC disabled? That's just wrong in my book, especially because the intial help info doesn't explan why it should be enabled. But OK, it's a preview. This might be modified before it goes all the way live ;)
After some searching and digging through the help, I think I found the explanation of why UAC should be enabled. In short: The remote desktop functionality (!) of Live Mesh won't work (correctly) without UAC enabled. Although the help suggests you can still use the Live Mesh notifier without having UAC enabled, you can't install it. I've tried livemesh -help which is supposed to display command line options, but that doesn't seem to work. Maybe because AUC is disabled...?

A cool thing over there is this nice little developers movie. It explains how Live Mesh works behind the scenes and how developers can make applications that benefit from the possibilities Live Mesh has to offer. Nice...

Besides that, channel 10 has a post that asks 'Do you really get Live Mesh'? Because it has so many possibilities, you can't explain it in an 'elevator pitch'. They suggest watching this great movie, that sheds a light on what Live Mesh has to offer.

Just wanted to add this screenshot: Live Mesh stops showing updates (and wasting bandwith) when you haven't used the window for ten minutes. That's kind smart, right ;)
stop_updating

Conclusion:
I can't really conclude, because I haven't enabled UAC to test adding my device. At least, not yet... Watching all the movies, both provided by the Live Mesh team and by others, gives a pretty good idea though. I think Live Mesh might help change the way we use computers, the internet and data. The strong developer approach (there are already SDK's available with Visual Studio code snippets and howto's!) will drive the number of Mesh-enabled applications, which is probably one of the most important factors in the success of Live Mesh. Undoubtetly to be continued ...

* The Live Mesh notifier is the gateway to the folders, devices, and news in your mesh. You can open the notifier by clicking the Live Mesh icon Live Mesh icon that appears in the notification area of your Windows taskbar on your device or in the lower right-hand corner of your Live Desktop (The online location where your Live Mesh folders are stored, so you can access them from the web.)

Technorati tags: ,,,
Rick van den Bosch .net - part II

It's been a while because I've been so busy lately, but the next (technical) step for my personal  website is now online. When browsing to http://rickvandenbosch.net/blog/, the content of my blog here is displayed sort of mirrored over there. I used an OpenSource RSS component to read my private rss feed from blogging about, and display it from there.

There's still a lot of work to be done (like styling!), but I'll get there. Eventually.... ;)

If you're interested on the how and the what: I'll post the source code online as soon as the entire website is 'ready'. At this rate, it might take a while, so if you can't wait: contact me


Technorati tags: ,,,
Backing up and restoring Visual Studio settings

When roaming the MSDN forums for unanswered questions for me to answer, I come across a lot of questions about any of the following:

  • Intellisense acting weird
  • Intellisense not showing up at all
  • Menu items that are all garbled up
  • Missing buttons on toolbars
  • Complete toolbars missing
  • Keyboard shortcuts acting weird
  • Keyboard shortcuts not working at all
  • ...

In most cases, resetting the Visual Studio settings to the default settings using devenv /resetsettings solves any problems that are in that list. But I can imagine you don't want to go through the hassle of setting up Visual Studio exactly the way you want it again (and again, and...). There's a solution to that: define your own settings file to restore settings from.

To create a file with your settings, first install Visual Studio (if you hadn't done so already) and adjust all settings to accomodate your needs. Next, select 'Tools' and 'Import and export settings'. This pops up an import export wizard, where you can choose the 'Export selected environment settings' option to create your own settings file. On the next screen, select the settings you want to be able to reset later on. After pressing next, enter a filename to store the settings in and click finish. That's it!
Restoring your settings is as easy as exporting is: open up the wizard, choose if you want to backup the current settings, select the settingsfile you want to import, select the settings to restore and click finish.

Besides using the import export wizard, you can also use the /resetsettings command line switch to reset to a specific set of settings in a file by specifying that file like so:
Devenv.exe /ResetSettings "C:\My Files\MySettings.vssettings"

Technorati tags: ,
Selecting all the controls of a specific type, the (built in!) LINQ way

We probably all worked with dynamically generated controls on forms, ASP.NET pages or (user) controls. And I guess we've all written for-each statements to loop through the ControlCollection and filter out all the controls of a specific type, right? I wanted to do the same today, so I started by trying to use LINQ for this:
linq_OfType_1 
This, as you can see, generated a compile time error:
Could not find an implementation of the query pattern for source type 'System.Web.UI.ControlCollection'.  'Where' not found.  Consider explicitly specifying the type of the range variable 'control'.

As the error states, this is easily solved by explicitly specifying the type of the control variable. Because a ControlCollection can contain so many types, it is not strange the compiler asks you to be a bit more precise on the type you will be querying. That looks something like this:
linq_OfType_2

But when I added the System.Linq namespace to my using section, I saw an extra method on the ControlCollection, called OfType<>. This method is one of the extension methods that can be applied to a collection that has a non-parameterized type like a ControlCollection or an ArrayList, because OfType<> extends the type IEnumerable.
Another one of those nice 'native' Linq extension methods is the Cast<> method, which pretty much does the same but throws an exception if there are any objects in the collection that cannot be cast to the specified type. And yes, exceptions are sometimes wanted ;)

For more info on the OfType<> method, see: Enumerable.OfType<TResult> Generic Method
For more info on the Cast<> method, see: Enumerable.Cast<TResult> Generic Method


Technorati tags: ,,
'EntLib Extensions To WSSF' released to CodePlex

Some of my (Dutch!) Avanade colleagues recently released 'Entlib Extensions To WSSF' to CodePlex. Quite a cool addition to the already rich Enterprise Library.

Entlib Extensions to WSSF (Web Service Software Factory) is an extension that enables WSSF to easily integrate with Enterprise Library. This extension allows you to very easily handle cross cutting concerns in WCF services like Validation, Exception Handling and Logging without much programming. The extension accomplishes this by using the policy injection application block of enterprise library.

Have a look at it over at the CodePlex page: EntLib Extensions To WSSF

Other info:
Web Service Software Factory
Enterprise Library 3.1

Blu-Ray coming to the Xbox 360?

I'm not entirely sure about the article on Digitimes. One of the reasons is because it was posted on April first. Another reason is the way it is written. But if it turns out to be true, I'm going to have to get a Blu-Ray player for my Xbox 360... ;)

A quote from the article:

Lite-On IT is developing built-in Blu-ray Disc-(BD) ROM drives for the Microsoft Xbox 360 game console, according to industry sources. Lite-On declined to comment, citing client confidentiality.
Lite-On's shipments of the BD ROMs to Microsoft will start in the second half of 2008, the sources added. Lite-On is currently one of the suppliers of Xbox 360-use internal DVD-ROM drives.

Read the entire article over here (you be the judge...): Lite-On developing BD-ROM drives for Xbox 360, sources say

Update:
Microsoft has denied that Lite-On is developing blu-ray drives for the Xbox. And I guess that makes the Digitimes article just another rumour about blu-ray and Xbox 360. But... they are not denying they're coming with a blu-ray drive ;)

The article starts out with:
Microsoft has insisted that Lite-on will not be making Blu-ray drives for its Xbox 360, despite widespread internet rumours to the contrary.

Read the full article at TechRadar: Microsoft: Lite-On NOT making Blu-ray drive.

LinkButton inside UpdatePanel results in full postback, UpdatePanel not triggered

When you dynamically generate a LinkButton in code that will be placed inside an UpdatePanel, you'll experience that the Click event for the LinkButton results in a full postback in stead of the UpdatePanel being triggered. There's a rather simpel solution to this problem...

First, let's take a look at the scenario. Consider this HTML:
HTML_markup
There's a literal control outside of the UpdatePanel. There's a second literal control inside the UpdatePanel. Besides that, there is a PlaceHolder inside the UpdatePanel, where the generated LinkButton will be placed. The parent control doesn't have to be a PlaceHolder, it can also be a repeater or something like that.

Next, consider this code:
linkbutton_code
As you can see, a LinkButton is generated and added to the PlaceHolder in every PageLoad. In the same PageLoad, the literal outside of the UpdatePanel is updated. The literal inside the UpdatePanel is only updated when the LinkButton is clicked. This makes for something like this for the first time the page loads:
first_load 
and something like this after the LinkButton is clicked:
lbclicked_load 
Because the LinkButton is inside the UpdatePanel, you would think hitting it would trigger the UpdatePanel so only the literal control inside the UpdatePanel gets updated. The fact that the two literals have the same time on it in the 'after LinkButton clicked' image, shows that the entire page was posted back.
The problem here is in the fact that the ID for the LinkButton is not set in the code. Weird thing is that when you change the code to generate a normal ASP.NET Button (with or without an ID), the problem doesn't occur. This has something to do with the fact that both the input rendered for the button and the link rendered for the linkbutton have no ID, but the input control does have a name that can be used to relate events/postbacks to. The link doesn't have that either, so I'm guessing it has something to do with that.

So the solution is rather simple. Add a line in code where the ID for the control is set (like linkButton.ID = "TestLinkButton";) After clicking the linkbutton in my example, only the literal in the UpdatePanel is updated. Hooray! ;)
lbclicked2_load 


kick it on DotNetKicks.com

Technorati tags: ,,