Three are many details to creating a Silverlight Streaming application, but in this post I'm going to try to boil them down to a recipe for fast success.

For some reason this post inspired me to fix my Silverlight streaming CS module (code) as well as my WPF/E CS Module (code). This means that all my old posts with WPF/E and Streaming Silverlight should now be working again. I'm also going through my code samples to make sure they are working and trying to fix them if they aren't. Below is one of my old WPF/E samples now running as Silverlight.

Below is the application that Jesse create's in his demo (can we get some better screen shots in it?) hosted in using my silverlight cs module:

Note: This won't work when using a feed reader since the script creates an iframe and I don't believe this is supported in most feed readers. I'll need to add a separate view page like I have for my WPF/E module.

Update: Just updated the update. I added the separate link page for the feed view and created the aspx page for it. Should work now and should display the absolute url.

Webdatagen.exe is located in the directory \Program Files\Microsoft ASP.NET 3.5 Extensions. The tool takes an argument: the base URL to the data service for which types are to be generated. For example, if the Northwind service is running in the Visual Studio development server at http://localhost:1234/Northwind.svc, the command line to generate classes for it is:

The output from the command is a C# file (Visual Basic types can be generated using the /language:VB switch) that contains a class for each of the entity types in the data service.

So instead of creating all your own classes, simply use the webdatagen tool to generate them for you. There is one minor change you will need to make to the generated code: you will need to comment out the Serializable attribute on all the generated classes. Other than that it works like a charm.

I'll be speaking on this coming Sunday at the SoCal Code Camp at Cal State Fullerton.

My session is at 9:00 AM on Sunday and is titled Bridging the Desktop/Web Divide with WPF and Silverlight. I'm hoping to demo (still working on my code) a simple application I built in WPF and show how easy it is to port it to XBAP and Silverlight with a few potential extras (exporting to XPS and a very short demo of ADO.Net Data Services which is the data provider).

My fellow Avanaut Elmer Morales will also be presenting on Sunday afternoon on Building Stunning Sites with SharePoint 2007. Elmer has been building SharePoint 2007 sites well before the product was released and from what I've seen of his presentation so far it should be great.

I'll probably miss the Saturday presentations since I still have some work to do on my own :)

Ok, I've decided that I'm a Windows Mobile Junkie. Last Friday I received my latest mobile phone, the SMT5800 from Verizon (made by HTC). I really liked my last phone, the Samsung i760, but it was just a little to big and I'm not a fan of the Windows Mobile Professional SKU. The Standard SKU, in my opinion, is much cleaner and easier to use. Because there is no touch screen everything is geared toward the buttons on the phone, whereas the Professional SKU has multiple input methods which means that for a lot of things you have to pull out the stylus.

Below is a history of the devices I've had to date (except for the imate sp5 which I lost). From left to right: imate sp3i, HTC MTeoR, HTC Vox, Treo 700w, Samsung i760, and the SMT5800.

Same phones, but with the slide-out keyboards shown.

I think the SMT5800 might be the perfect phone for me. It is the Standard SKU, has very fast network speeds thanks to EV-DO, is supposed to work as a modem (haven't tried this yet), and fits nicely in my pocket. The Vox was almost the perfect phone, but the slow network speeds and slow processor bogged it down. In addition to the EV-DO for fast network access, the SMT5800 also has a 400 MHz processor making it faster than the Vox (although it still lags a little).

The dates for the following three betas have been extended and you are welcome to spread the word. taking a beta exam is free. If you pass it, you have passed that exam (and earned the related certification, if applicable)--you do not need to take the live version of the exam. if you've never taken a beta exam before, read this. If you have questions, check out Gerry's Blog, I'm sure he'll be posting this info too and he knows more about it than YT.

I actually took all three of these exams (you know me, Mr. Certification) and found them to be pretty good exams. As always, they are beta exams so expect lots of questions on some of the obscure topics since Microsoft is trying to figure out the best way to ask those questions. I've no idea if I passed any of them, but it was a good experience.

BTW - Trika's blog is a great source for certification information, be sure to check it out.

Posted in at Wednesday, January 09, 2008 2:57 AM Pacific Standard Time

In my last post about setting up Windows Server 2008 I mentioned that one issue I had was that you couldn't bind Hyper-V machines to the 802.11 wireless network connection. Today I spent a little time working on this and figured out a nice solution that seems to work well for me.

The solution is to setup an internal virtual network (much like you might do with Virtual Server). Setting this up is actually pretty easy.

In the Hyper-V Manager, under Actions (right panel), click the Virtual Network Manager.

In the Virtual Network Manager in the Create virtual network panel, select Internal and click the Add button.

In the Virtual Network Properties change the Name to something useful (I've named mine Local Network as shown below).

At this point you should now have a new network adapter on your host machine. Note: I recommend you rename this new network adapter to something more meaningful than Local Network Adapter X. I've renamed mine to Virtual Local Network.

Now you can add this network to each of your virtual machines, but at this point, unless you assign an IP address in each connection, you won't be able to do much. This is where ICS comes in. To enable ICS follow these steps:

Click on the network icon in the tray of your host machine and select Network and Sharing Center.

From there click Manage network connections.

Select the network adapter that you use to access the Internet. In my case this is my wireless network adapter. Right click it and select Properties.

In the properties dialog select the Sharing tab.

On this tab check the box that says "Allow other network users..." and then set the Home networking connection to be the network adapter that was created above (now you see why I said to rename it to something useful).

Windows will prompt you that it will set the IP address to 192.168.0.1 which should be fine. Now your virtual machines that have this network connection will automatically get an IP address and will be able to connect to the Internet (provided your wireless connection is working).

Because each adapter also gets an automatic you can now share files and folders between your host and your virtual machines which is important since you can't just drag-and-drop files like you can with Virtual PC.

So there you have it. You now have your virtual network setup and can access the Internet via your wireless connection with Hyper-V virtualization.

Since I do all of my development work using virtual machines, I have been very interested in the new Hyper-V feature found in Windows Server 2008. A few of the new features I was interested in were:

New and improved architecture: New 64-bit micro-kernelized hypervisor architecture enables Hyper-V to provide a broad array of device support and improved performance and security.

Broad OS support: Broad support for simultaneously running different types of operating systems, including 32-bit and 64-bit systems across different server platforms, such as Windows and Linux.

SMP support: Ability to support up to 4 multiple processors (SMP) in a virtual machine environment to enable you to take full advantage of multi-threaded applications in a virtual machine.

Virtual machine snapshot: Hyper-V provides the ability to take snapshots of a running virtual machine so you can easily revert to a previous state and improve the overall backup and recoverability solution.

So now I can run 64 bit virtual machines and my virtual machines will have access to the multiple cores on my laptop. The only thing I wasn't sure about was whether I wanted to give up the nice UI in Vista. However, I saw on Stuart Maxwell's blog that you can enable Windows Aero with a couple of extra steps (and you can enable you WiFi connection). So downloaded and installed Windows Server 2008 with the Hyper-V beta (on a spare drive so I can swap back if things go wrong) using the steps from the Virtual PC Guy's blog. I was able to use all the same drivers that I had used from my 64-bit Vista install that I was previously running. Besides the ~2 minute boot up, my laptop is performing pretty well.

Here are a few tricks and tips if you're thinking about trying this out yourself.

Buy a new laptop hard drive if you don't already have a spare to install it on. This means you can always go back if you can't get things working correctly.

Most applications that I installed (this is a host-only install for me, no Visual Studio or other dev tools) with the exception of the Windows Live applications:

Windows Live Messenger - Download the stand-alone installer here. This installs fine using this installer.

Windows Live Writer - Just zip up the Writer folder from your Vista 64 bit install and then unzip it on the Server install.

The Hyper-V integration services (equivalent of Virtual Machine additions) will only install on Windows Server 2003 with service pack 2 installed. So before shutting down your other OS make sure you uninstall the virtual machine additions and then install SP2.

Windows Search service is not enabled by default and it isn't obvious how to turn this on. Olav Tollefsen's blog has the details on how to do this.

In Vista you can hold shift and then right click a directory to get the "Command Prompt Here" functionality. This is missing from Server 2008, but if you run the registry script from RandyRants you get both a Command Prompt Here and an Elevated Command Prompt here which is great.

There are a few things that so far I don't like, one of which might be a deal breaker.

Virtual machines running in Hyper-V cannot use the 802.11 network connection, it only supports 802.3. This might be a real issue if I'm at a location with wireless only and I need to get access to something on my virtual. Update[4]: You can get around this by setting up a virtual network and sharing your Internet connection. See my post here on how to do this.

It would be nice if there was better integration between Virtual PC, Virtual Server, and Hyper-V so that they would all play nice together. But this probably isn't a huge deal.

There is no run-as Windows Vista so that I can fool programs into thinking they are talking to Windows Vista. I was able to get around the Windows Live applications issue with this, but I'm sure there will be some other application down the road that I won't be able to install.

Update[1]: One issue that bugs me is I can't figure out how to disable the shutdown event tracker. This doesn't seem to have the same fix as Windows Server 2003.

Update[3]: When I click on the power icon in the tray I can see all the power options, but they are all grayed out so I cannot change it here. Instead I have to click More Power Options, then Change settings that are currently unavailable, then the UAC dialog, and then I can change the settings. I'm sure there is some way to make this work like Vista where you can just change it in the original dialog, but I'll have to dig around to figure it out.

Other than that I'm liking my new OS. I keep this post up to date if anything else comes up.

One of the things I've been looking into in my free time is the Microsoft Sync Framework (MSF) (currently in CTP mode). The MSF is:

[A] comprehensive synchronization platform enabling collaboration and offline for applications, services and devices with support for any data type, any data store, any transfer protocol, and network topology.

Included with the SDK is a sample called the Managed NTFS Sample which demonstrates how to create your own file sync provider for local files. This works pretty well for local files, but what I really want to do is a remote file sync over the Internet. The reason is that I built a family photo sharing website for my family and I use FolderShare to copy the files from each family member's computer up to my server. However, FolderShare only supports a limited number of shares and only supports 10,000 files per share. So with the idea of creating a custom FolderShare type of service I started to customize the sample.

The remote file sync sample I created is still pretty rough around the edges since my goal was to just get it working. The sample is also only a one-way sync meaning file changes are only sent to the server and not back to the client (which is what I wanted). The service is a WCF service exposed via a website and right now the client is just a console application.

I still have more to do on it and if there is enough interest I'll create a project on CodePlex for it. One of the first enhancements I'd like to make is to use ASP.Net membership to handle security and then create folders for each user instead of passing the root path in the sync service. There is lots of room for improvement.

Last year I made a new years resolution to start exercising and get back in shape. Knowing myself fairly well I new that I needed to take a phased approach where I would start with working out one day a week and doing one bike ride per week and then each month add one more day. That approach worked great and I stayed in shape most of the year until around October where projects and weather got me out of the habit.

For this year I decided on three resolutions which I think will help me.

Exercise three days a week. I'm generally happier and feel better when I'm in the habit of exercising. However, I think that trying to exercise six days a week is too difficult so I'm going to try for exercising three days a week.

Write at least one blog post per week. I really enjoy Harry Pierson's Morning Coffee posts but I don't think my schedule would allow for a daily blog post. So I'm going to shoot for at least one post per week.

Improve my time management skills. This resolution is not as specific as I'd like it to be, but it will have to do. I really need to learn better time management skills in order to stay on top of all the things going on at work and in life in general.

Administration

About

The posts on this weblog are provided "as is" with no warranties and confer no rights. The opinions expressed herin are the personal opinions of the individual authors and do not represent the views of Avanade in any way.

This blog theme was designed and copyrighted 2009, by Alexander Groß and is used with his explicit permission.