Feed Icon  

Contact

  • Bryant Likes
  • Send mail to the author(s) E-mail
  • twitter
  • View Bryant Likes's profile on LinkedIn
  • del.icio.us
Get Microsoft Silverlight
by clicking "Install Microsoft Silverlight" you accept the
Silverlight license agreement

Hosting By

Hot Topics

Tags

Open Source Projects

Archives

Ads

Silverlight and WPF/E CS Modules Updated

Posted in at Monday, January 28, 2008 8:13 AM Pacific Standard Time

Saw that Jesse Liberty (via WynApse) has a nice post on creating Silverlight streaming applications in minutes:

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.

Consuming Astoria from Silverlight

Posted in Silverlight at Monday, January 28, 2008 2:28 AM Pacific Standard Time

Michael Sync wrote a great tutorial on how to consume ADO.Net Data Services (Astoria) from Silverlight. I just demoed Silverlight on top of Astoria at code camp and wanted to add one comment to Michael's post:

Create the class like below. (Note: The class name should be the same as your table name. The fields should be the same as your table structure.)

  1. public class Customer {  
  2. public int CustomerID { get; set; }  
  3. public string CustomerName { get; set; }  
public class Customer {
public int CustomerID { get; set; }
public string CustomerName { get; set; }
}

I don’t like to create that class in Silverlight project but this is by-design issues so that I have no choice. I hope Astoria Team will do something about it.

Actually you do have a choice, and it is much simpler. If you read the ADO.NET Data Services Quickstart on the .NET Client Library, about a quarter of the way down there is a section on using the Webdatagen tool:

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:

\Program Files\Microsoft ASP.NET 3.5 Extensions\WebDataGen.exe"  /mode:ClientClassGeneration /outobjectlayer:northwind.cs /uri:http://localhost:1234/Northwind.svc

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.

Links and Code from my Code Camp Session

Posted in WPF | Silverlight | Astoria at Monday, January 28, 2008 2:26 AM Pacific Standard Time

 

Thanks to everyone who came to my session, hope you enjoyed it.

First off, instead of slides I used WPF based on the example by Beatriz Costa:

Next I demoed exporting the Xaml created by the WPF application to XPS. Here is a good link that covers that topic:

After that we published our WPF application as an XBAP. Here are some links related to that:

I also ran through a quick demo of the service that I was using which was based on the project astoria code:

Finally I went through the Silverlight version of the application. I mentioned a few relevant posts on that topic:

Last but not least, here is the link to the sample code. If you need help getting it started let me know and I'll try to help out.

 

Technorati Tags: ,,,

Speaking at SoCal Code Camp this Weekend

Posted in SharePoint | WPF | Silverlight at Friday, January 25, 2008 4:11 AM Pacific Standard Time

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 :)

So see you at Code Camp!

 

Another New Phone - Verizon SMT5800

Posted in Gadgets | Windows Mobile at Tuesday, January 22, 2008 5:00 AM Pacific Standard Time

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.

DSC00094

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

DSC00095

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).

So I'll probably stick with this phone for awhile, or at least until the Touch comes out on Verizon. :)

Technorati Tags: ,

.NET 3.5 Beta Exams Extended

Posted in at Monday, January 14, 2008 5:14 AM Pacific Standard Time

From the Booth Babe's blog:

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.

· 71-502:  TS: Microsoft .NET Framework 3.5 - Windows Presentation Foundation

· 71-503: TS: Microsoft .NET Framework 3.5 - Windows Communication Foundation

· 71-504: TS: Microsoft .NET Framework 3.5 – Windows Workflow Foundation

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.

Update (1/24): Gerry just posted that the exams have been extended yet again.

Technorati Tags: ,,,,

Setting Up Hyper-V Virtual Networking

Posted in at Wednesday, January 9, 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.

  1. In the Hyper-V Manager, under Actions (right panel), click the Virtual Network Manager.
  2. In the Virtual Network Manager in the Create virtual network panel, select Internal and click the Add button.
  3. In the Virtual Network Properties change the Name to something useful (I've named mine Local Network as shown below).

image

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:

  1. Click on the network icon in the tray of your host machine and select Network and Sharing Center.
  2. From there click Manage network connections.
  3. 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.
  4. In the properties dialog select the Sharing tab.
  5. 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).

image

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.

 Update: Ben (the Virtual PC Guy) just posted a great explanation of Networking in Hyper-V which gives you more of what is actually going on.

Update[2]: Ok so Ben just posted again but explains how to use your wireless connection with Hyper-V. He probably does a better job of explaining it so if my post leaves you confused go read his. :)

Technorati Tags: ,

Switching to Windows Server 2008 on my Laptop

Posted in at Monday, January 7, 2008 10:33 AM Pacific Standard Time

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.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. Update[2]: Turn off IE Enhanced Security using this tech recipe.

image

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

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.

Technorati Tags: ,

Remote File Sync using WCF and MSF

Posted in WCF | .NET | Sync Framework at Thursday, January 3, 2008 3:41 AM Pacific Standard Time

 

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.

You can download a working sample of the code here.

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.

 

Happy New Year!

Posted in General at Wednesday, January 2, 2008 1:41 AM Pacific Standard Time

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.

  1. 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.
  2. 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.
  3. 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.

So I commit to you, my readers, to do these three things this year.

Happy 2008!