JavaScript appears to be disabled. We recommend you enable JavaScript while visiting this site.

(All original content on this site is licensed under the Creative Commons License Attribution-Noncommercial-No Derivative Works 3.0.)

Windows Phone 7: Taking and restoring a SQL database

As I develop my first Windows Phone 7 application, My Video Game Tracker, I want to make sure that the many games I've added won't accidentally be lost (as I'm deploying test versions to my physical phone).

The below assumes you're using Windows PowerShell, but they should run on the standard command line.

Taking screenshots of the application's data

When you install the Windows Phone SDK the Isolated Storage Explorer Tool is also installed. This tooll allows you to easily explore isolated storage on both emulated devices and any plugged in devices.

First you'll want to go to the directory where the tool is installed.

cd "C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.1\Tools\IsolatedStorageExplorerTool"

You can now enumerate devices if you want, but there's two parameters that you can tend to rely upon.

.\isetool.exe enumeratedevices

To continue, you'll need to have the guid of the application, which can be found in the WMAppManifest.xml file, and it's the ProductID attribute in the App element.

First, make sure that the application has been started, and any necessary data items have been setup.

Next get a directory listing, so you have an idea of what it looks like.

.\isetool.exe dir xd 00000000-0000-0000-0000-000000000000

This would return something like the following.

       131,072 AppData.sdf
<DIR>          Shared

Now you can take a screenshot to any directory you like. For example, to grab it from your phone (de = physical device):

.\isetool.exe ts de 00000000-0000-0000-0000-000000000000 D:\projects\JamesRSkemp\WindowsPhone\isolatedstorage

When you run this command you'll have a directory created in the above called IsolatedStore. This will mimic what the dir command above returns.

To take a screenshot of the default emulated device (512 MB emulator), run the above except with xd instead of de.

.\isetool.exe ts xd 00000000-0000-0000-0000-000000000000 D:\projects\JamesRSkemp\WindowsPhone\isolatedstorage

Restoring screenshots of the application's data

Now if you want to restore the screenshot you want to make sure you append IsolatedStorage to the end of the directory path.

.\isetool.exe rs xd 00000000-0000-0000-0000-000000000000 D:\projects\JamesRSkemp\WindowsPhone\isolatedstorage\IsolatedStore

Depending upon what you're storing, if you want to move data from one device to another, you can take a screenshot, replace the necessary file(s), and then restore the modified screenshot/directory.

Possible errors

As I've been developing I've run into two errors. The message and resolution are below.

Error: The process cannot access the file because it is being used by another process.

To resolve this error you need to close the application (back button from the home screen).

Error: Failed to connect to the device. Ensure that the device is completely booted and is connected to the PC.

To resolve this error you need to make sure Zune is running and the device is connected, and unlocked.

(All original content on this site is licensed under the Creative Commons License Attribution-Noncommercial-No Derivative Works 3.0.)

Migration from CollabNet Subversion to VisualSVN Server

Since it doesn't seem CollabNet is really going to keep their non-Edge Subversion application, I've decided to migrate to VisualSVN Server. Roughly, here are the steps I went through to migrate, which also includes a 1.6.x upgrade.

VisualSVN migration

  1. Installed VisualSVN. Repositories saved to C:\Repositories
  2. Setup existing users.
  3. Import existing repositories.
  4. Should already be upgraded, but upgrade to 1.5, just in case.
  5. Upgrade TortoiseSVN.
  6. Upgrade working copies to 1.7.

(All original content on this site is licensed under the Creative Commons License Attribution-Noncommercial-No Derivative Works 3.0.)

On Web sites that feature Facebook Comments

Over the past few months a number of sites have switched over to Facebook-powered comments. For the most part those sites are ones that I've never commented one, nor will comment on. However, I recently discovered that a former co-worker, Rob Lumley, switched his site over to Facebook, and recently wrote an article about it titled Add Facebook Comments to WordPress. Since I don't use Facebook comments, I figured I'd post the response I had written and tried to post anonymously, here instead.

Rob's question

For those of you who use or read this site, what do you think about Facebook comments? Does it increase or decrease your chances of commenting? Do you like not having to log in or create another user account? Or do you wish to stay anonymous?

My response

Decreases.

With all the security issues I stopped staying logged into Facebook at least a year ago. I also post very specific things to Facebook, and want very tight control over what's posted. And I quite frankly don't trust Facebook as a company.

I personally haven't left an anonymous comment in the last five years, if not more (a quick search returned comments I had left as far back as 2003, and I'm sure you can find more even further). However, there are some who would prefer not to be associated with an unpopular stance, and I suppose their ability to be able to leave comments that are not associated with their real name. After all, if they really want to leave it in a completely non-anonymous setting, they could always create a dummy account.

I've personally found DISQUS to offer a nice alternative, and plan on moving all my sites to that (when I finally get around to it - I think it's just a checkbox to enable in my platform). You can import (and export) existing comments, anonymous comments are allowed, a large variety of authentication sources are allowed, and more.

I've been using it for Log Parser Plus, and while I don't get comments (not too surprising based on the content), there has been some interaction.

Tags:

Categories: Internet, technology