Installing the latest Zune 4.0 Software on Windows Server 2008

Step 1: Download the latest Zune software from http://www.zune.net/en-US/products/software/download/default.htm (which should be the single file ZuneSetupPkg.exe).

If you just run ZuneSetupPkg.exe you will get this lovely message:

image_2

I can only assume Windows Server 2008 is not supported to save on QA time yet the software is running fine for me.

Step 2: Start-up a cmd.exe prompt with Administrator rights.image_4

Step 3: Navigate to the downloaded package and extract all the files it contains by typing ZuneSetupPkg.exe /x

image_6

which will ask for a destination directory

 

Step 4: CD to the x64 folder (I have to assume if you are running Windows Server 2008 you are using the 64 bit version) and then the packages folder.image_8

Your command prompt should look similar to

image_15

 

Step 5: Install the zune-x64.msi using msiexec.  Type: msiexec /i zune-x64.msi

image_10

 

Step 6: Run the Zune.exe software from the start menu and enjoy.

IMHO, the Zune software is MUCH better than iTunes!  I wish I had switched sooner (and I might have if it was easier to install).

Live Writer HTML Source tab reminds me of old school WordPerfect reveal codes

I made an error with formatting in a blog posting after inserting a code snippet into Live Writer using Paste from Visual Studio.

Like in Microsoft Word, I found it near impossible to correct my error from the Edit tab of Live Writer.  Luckily Live Writer provides a Source tab making it possible (although tedious) to fix up my incorrect HTML.  When fixing the HTML I couldn’t help but recall the reveal codes in the DOS WordPerfect software–a very useful and missed feature of most current software.  A key factor in the popularity of the simplistic XML/HTML documents is the ability to “human read” the information.  WordPerfect had that right back in the 1980s.

Never forget the primary key (PK) on a table!

Want to kill an hour?  Forget to include a primary key constraint on a SQL table and use the Visual Studio auto-generated dataset.

You will get this error when issuing the Update() command on an adapter:

“Update requires a valid UpdateCommand when passed DataRow collection with modified rows.”

If you look at the code in yourdataset.Designer.cs file for

private void InitAdapter()

it will not include the necessary INSERT INTO, DELETE FROM and UPDATE commands—it will only include the INSERT INTO. Of course it makes sense that MSDataSetGenerator would not know how to generate proper SQL code without a primary key… But all the code behind code makes debugging difficult!

WCF Service Library IIS 7 deployment—where does the .dll go?

After you have built your release WCF Service Library .dll in VS 2010, when deploying to IIS 7, the .dll file(s) should go under the bin folder of the application root of the web site.  This must be common knowledge, but it took me a few “bings” to find the answer from this link:

… As a precompiled .dll file located in the global assembly cache (GAC) or in the application’s \bin directory. Precompiled binaries are not updated until a new version of the class library is deployed.

IIS 7 / WCF / .Net 4 configuration update

To make sure IIS 7 is setup to work with the latest WCF and .Net 4 framework, use these two utilities: aspnet_regiis.exe and ServiceModelReg.exe.

On an x64 machines, both of these utilities can be found in the folder: C:\Windows\Microsoft.NET\Framework64\v4.0.30319

From a command prompt launched with “Run as administrator” rights run aspnet_regiis –i –enable

Per MSDN, this

Installs the version of ASP.NET that is associated with Aspnet_regiis.exe and updates the script maps at the IIS metabase root and below.

Only the script maps for applications that use an earlier version of ASP.NET are updated. Applications that use a later version are not affected.

According to MSDN, ServiceModelReg manages the registration of a ServiceModel.  Basically, as I understand it, this makes sure that .svc files use the proper .Net framework (in this case .Net 4).  Run the following command: ServiceModelReg –ia

Your IIS 7 configuration should now be set to properly use WCF with the .Net 4 Framework.

To confirm, verify that the Application Pools .Net Framework Version shows v4.0 as shown below.IISConfig_2

 

DebuggerDisplayAttribute or ToString() to help debugging

[DebuggerDisplay("Customer={CustomerName} Phone={CustomerPhone}")]
class WEOTestClass
{
    public WEOTestClass(string _name, string _phone)
    {
        CustomerName = _name;
        CustomerPhone = _phone;
    }

    public string CustomerName { get; set; } 
    public string CustomerPhone { get; set; }

    public override string ToString()
    {
        return( "Customer: " + CustomerName + " Phone: " + CustomerPhone );
    }
}

For viewing classes when debugging in the Visual Studio IDE, both DebuggerDisplay and a ToString() work well.  While ToString() is more typing, it has the added benefit when logging to files or other output (besides the debugger).

Love & Hate with Microsoft Development Tools (VS 2010 & .Net 4.0)

For about an hour, all I wanted to do was use a WebGet attribute by adding this line of code to a test WCF application I was creating:

using System.ServiceModel.Web;

I went to the Add Reference dialog and looked for the assembly…  But as you can see below, for this project, it wasn’t available.image_2

 

The eventual solution amazed me.  My Target framework was set to .Net Framework 4 Client Profile (as the Add Reference dialog above showed with Filtered to: .Net Framework 4 Client Profile).  For some reason this is the default for newly created console applications.

image_4

Changing the Target framework to .Net Framework 4 solved my mystery.

image_6

These kinds of awkward behaviors are huge time killers.  While I believe Microsoft is trying to hide complexity for developers—to make it “easy”—I would rather see everything happening under the covers rather than try to figure it out after the fact.  Developing software is hard enough with out the tools making assumptions.

And a special thanks Patrick Cauldwell for saving me even more time searching for a solution.

A couple more web application desktops—both in Silverlight

myOSity.com reminds me of the original Microsoft Windows 3 Program Manager—an icon based launching pad to windowed applications (several of which are from various authors from around the web).  Interestingly, according the the creator’s blog the project will be going open source onto CodePlex.

And for a very clever twist, check out Wiki-OS.  The concept is to bring wiki-like editing to applications.  The overall program (or perhaps I should call it a WebOS) is exceptionally well done.  The company behind Wiki-OS is Userware.