At the Columbia Windows 8 DevCamp this weekend, the topic of side-loading apps came up in a few different scenarios, but it was particularly appropriate during the app showcase. We had a number of developers working in the lab room, all competing to come up with the coolest app at the end of the day. During the showcase where developers pitch their apps to the audience, it works best to have all the apps on the same machine. Here’s the best way to do it without having to copy source code/solution files: From within Visual Studio, select Project > Store > Create App Packages: In one situation, where there happened to be multiple projects in the solution, these options were disabled. Why I’m not exactly sure, but you can also create the app packages by right clicking on the project in solution explorer, and selecting Create App Packages in a similar way: On the dialog windows that pops up, select No to build packages to upload to the store, as we’re not doing that: On the next screen, configure any path/build options (defaults are usually ok) and click Create: Once the packages are created, you’ll see the following folders: We can ignore the .appxupload files for now. For loading on another machine, we’ll need to copy either the x86 or ARM (or both) to the target machine (for the devcamps, we just pass around a USB key and have everyone copy the files there). On the machine you’d like to install the apps, run the PowerShell script (right click file, select Run with PowerShell). Of course, if you’re on a Surface or other ARM device, you’d need to run the PowerShell script from the ARM folder, otherwise use the x86: Once running, you may be prompted to install a certificate and need to accept a UAC prompt. You’ll then see the app install: Viola! The app should be installed on the Windows 8 Start Screen.

I’m happy to finally have the next update to Dark Skies in the Windows 8 store! In the initial release, I used Bing Maps to display light pollution data. In this version, I allow users to display and share favorite viewing spots, and spruced up the live tile with some cool info. The main page can display information about a pin on the map: Admittedly, there aren’t too many pins just yet, but it will grow over time. It’s not just favorite viewing locations – astronomy shops, user groups and clubs, and events can all be added. Also, the live tile now displays some useful moon info: The tile displays the current phase of the moon, as well as the rise and set times (if location services is enabled). The little + (or –) signs indicates the set or rise occurs on the next or previous day, so for me, the moon rises at 1:14 p.m. and sets tomorrow at 3:45 a.m. Technical Info This is a developer blog, after all. Everything in this release relies on Windows Azure Mobile Services (WAMS). The service for the live tiles is hosted in Windows Azure Web Sites, and Windows Azure Mobile Services does the authentication and single-sign on, and also serves notifications when new sites are added. For example, if there’s a new site added near any of the user’s home locations, a new tile with a Bing map is sent down as a notification, while the badge displays the total number of new nearby points since last run: It’s been a lot of fun to develop, and really, it would’ve been too much work without having WAMS to power everything. The bulk of the work was getting things to look just right, rather than fiddling with authentication code and developing a back end system. I’ve also been using TFS in the cloud to store source code, and do continuous integration with the Windows Azure Web Site (an ASP.NET MVC 4 controller that serves XML as tiles.)

What’s this? Another Windows Azure Mobile Services (WAMS) post?! In the next version of my app, I keep a record of the user’s Channel in order to send down notifications. The built in todo list example does this or something very similar. My table in WAMS looks like: Not shown are a couple of fields, but of particular interest is the device Id. I realized that one user might have multiple devices, so the channel then is tied to the device Id. I still haven’t found a perfect way to do this yet – right now, I’m using a random GUID on first run. In my WAMS script, if the point that is submitted is “within range” of another user, we’ll send a notification down to update the tile. I go into this part in my blog post: Best Practices on Sending Live Tiles. But what do you do if the channel is expired? This comes up a lot in testing, because the app is removed/reinstalled many times. I stumbled on this page, Push Notification Service Request and Response Headers, on MSDN. There is a lot of great info on that page. While I should have more robust solution for handling all these conditions, the one in particular I’m interested in is the Channel Expired response, highlighted below: HTTP response code Description Recommended action 200 OK The notification was accepted by WNS. None required. 400 Bad Request One or more headers were specified incorrectly or conflict with another header. Log the details of your request. Inspect your request and compare against this documentation. 401 Unauthorized The cloud service did not present a valid authentication ticket. The OAuth ticket may be invalid. Request a valid access token by authenticating your cloud service using the access token request. 403 Forbidden The cloud service is not authorized to send a notification to this URI even though they are authenticated. The access token provided in the request does not match the credentials of the app that requested the channel URI. Ensure that your package name in your app's manifest matches the cloud service credentials given to your app in the Dashboard. 404 Not Found The channel URI is not valid or is not recognized by WNS. Log the details of your request. Do not send further notifications to this channel; notifications to this address will fail. 405 Method Not Allowed Invalid method (GET, DELETE, CREATE); only POST is allowed. Log the details of your request. Switch to using HTTP POST. 406 Not Acceptable The cloud service exceeded its throttle limit. Log the details of your request. Reduce the rate at which you are sending notifications. 410 Gone The channel expired. Log the details of your request. Do not send further notifications to this channel. Have your app request a new channel URI. 413 Request Entity Too Large The notification payload exceeds the 5000 byte size limit. Log the details of your request. Inspect the payload to ensure it is within the size limitations. 500 Internal Server Error An internal failure caused notification delivery to fail. Log the details of your request. Report this issue through the developer forums. 503 Service Unavailable The server is currently unavailable. Log the details of your request. Report this issue through the developer forums. Obviously getting a new channel URI is ideal, but the app has to do that on the client (and will) next time the user runs the app. In the mean time, I want to delete this channel because it’s useless. In my script which sends the notifications, we’ll examine the result on the callback and either delete the channel if expired, or, if success, send a badge update because that’s needed, too. (Future todo task: try to combine Live Tile and badges in one update.) push.wns.send(channelUri, payload, 'wns/tile',
{
client_id: 'ms-app://<my app id>',
client_secret: 'my client secret',
headers: { 'X-WNS-Tag' : 'SomeTag' }
},
function (error, result) {
if (error)
{
//if the channel has expired, delete from channel table
if (error.statusCode == 410){
removeExpiredChannel(channelUri)
}
}
else
{
//notification sent
updateBadge(channelUri);
}
}
);
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
Removing expired channels can be done with something like:
function removeExpiredChannel(channelUri)
{
var sql = "delete from myapp.Channel where ChannelUri = ?";
var params = [channelUri];
mssql.query(sql, params,
{
success: function(results) {
console.log('Removed Expired Channel: ' + channelUri)
}
});
}
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
On my todo list is to add more robust support for different response codes – for example, in addition to a 410 response, a 404 would also want to delete the channel record in the table.

The worst best part about being the Microsoft guru when a new OS ships is configuring PCs for family members. In Windows 8, it’s a big relief that the new start screen makes things inherently more secure and less worrisome, but in desktop mode and since I have family members who haven’t upgraded yet, I get asked about pop ups and pop “under” windows all the time, and configuring family safety settings. The challenge is striking a balance between stopping annoying popups while allowing desirable popups to be allowed through. It’s a little bit like a smoke detector in a house: you want to work when there’s a fire, but not go off every time you snuff out a candle or burn the toast. The first thing I do when setting up a new PC is that I configure all popups to open in a new tab. This makes it easy to manage where a popup came from to keep things grouped, but also prevents popups from constantly getting above/under your space. To do this, open the settings in IE: And on the Internet Options page, click Tabs: On the Tabs window, be sure to select “Always open pop-ups in new tab”: This way, even if you disable all pop up behavior, it’s still manageable. For power users, the pop up settings page allows quite a bit of configuration: The default setting is medium, which works well in most situations however a few pop ups are occasionally possible – in particular, when the user clicks a link, and this is how many pop up/under windows are opened. This setting allows pop up windows from sites in the trusted sites or local intranet zone. The high setting disables all pop ups, but can be overridden by holding CTRL+ALT when clicking a link. This is great for power users, but too prohibitive for most casual users. The low setting is similar to the medium setting, except it allows all pop ups from secure SSL (https://) sites without requiring an explicit entry in the allowed sites section. An entry into the allowed sites allows pop ups from those sites, regardless of the blocking level. Although I haven’t seen a document specific to Windows 8, for the true geek, there’s some good info on this MSDN page on the security zone templates. Family Safety The next most important thing, particularly for kids, is to configure family safety settings. Seriously. Don’t do this later, do it right now. This can be done on earlier versions of Windows, but I’ll focus on Windows 8 here. From either the control panel, search for family safety: Or, just start typing family safety on the start screen and select ‘settings’ on the search results: When configuring family safety, there are a ton of great options to balance exactly what the child is allowed to do: Most of these are pretty self explanatory, but the web filtering is likely most important: Out of the box, this is a great first step to making sure the content they see is not inappropriate. When my daughter logs in and opens a web browser, she’ll see: Now, if I try to go to my blog, the content by default is blocked: If it’s a local account only, the parent must be present at the PC to give permission to view a site. Otherwise, all of the accounts and permissions can be handled online – this is great for situations where I might not be around and can approve requests remotely. The other great part about this is the reporting and time limit features. My daughter is fairly possessive of her PC, but I can monitor everything remotely without being too invasive, and set a curfew or other time limits. So, there you have it. Lots of configurability, but the most important aspect is allowing her to own her own PC without me worrying about inappropriate content. It does take a small amount of setup, but it’s worth it.

I’m going to talk about one of my favorite Windows 8 features – it’s one that everyone will love, but no one really knows much about. In fact, it’s one that is so good, you’d think it’s a problem. (Like, if you hit the power button and your machine _instantly_ slept, you’d think there is a problem, wouldn’t you?) I’ve got 2 disclaimers. Obviously I work for MSFT so I’m biased, but the second one is, to Joe’s disgust, I actually have an iPad in house. The excuse is that I have a large Sonos installation, and the iPad is currently the best and one of the cheapest controllers for it. Much like buying a PS3 as a cheap blu ray player back in the day, it made the most sense. But the real reason: I love technology. I love all of it. So let’s get it to it. The feature is incremental app updates. If we look at the anatomy of an application in the Windows Store, it’s an .appx package file that contains all of the assets and declarations for the app, including a BlockMap. The BlockMap contains hashes of all files within the package. The user downloads the entire appx, of course, when installing the application. But when there is an application update, the beauty is that the system automatically can compare the BlockMap and delivery only the blocks that have changed. This includes partial changes to a large file, like in the following diagram from this talk at //build: The reason why this is so awesome is that applications often contain embedded resources that often don’t change. A publisher makes a minor code fix, perhaps to the design, a typo, or game logic, and you’ll only receive the changes that have been actually made, not the entire package. Let’s look at a real time example as I write this: I picked an app that needed to be updated and had a little bit of size to it. I know Scott who developed this app – HeavenWord Bible Study Toolkit and it weighs in at 139 MB. I remember talking with Scott about this, because the issue of including data (and how much data) within the app is sometimes a tricky decision. I had the app updated and I see Scott published an update: It installed so fast, you’d think there was a problem. Monitoring my internet bandwidth usage, the update showed up as a little blip (and for those wondering, this isn’t scientific. There are other devices on the network that might contribute usage, but to my knowledge, nothing was actively streaming/running at the time). This accrued a couple hundred KB and the entire graph covers a 10 minute window (time at right side of graph: 12:46pm). More details in other screen clippings about the graph, but note the first step on the x-axis measures 122kb/s and the update barely touched that. So, I open the iPad and notice a whopping number of updates that I haven’t checked in a few weeks. Paper by FiftyThree weighs in at ~50MB, so let’s give that a try. After the update, the scale on my bandwidth usage chart got blown up so much, you can hardly see the Win8 update – the first step on the x-axis went from ~122kb/s to ~3000kb/s, a nearly 25x increase (time at right side of graph was 12:48pm, I happen to have the mouse hovered near the upper left of the graph when grabbing it, hence the 12:39pm time written on the x-axis line): This result isn’t surprising but it’s painful to look at visually. It had to download the entire 50MB app. Is this a huge deal? Isolated and on an unlimited, high bandwidth connection … no. But on 3G/4G, a hotel WiFi, or metered connection … Absolutely! And if you have multiple devices, and are on the road as much as I am, this not only wastes bandwidth but time, as well. Looking in my app list, there’s another big one in there. Magic 2013: 1.15 GB? Yikes. (I feel like Doc Brown … one point fifteen gigabytes?! ) Got multiple devices and/or travelling? This becomes a real issue. While it’s not a strictly fair comparison, seeing headlines like this one illustrates the inefficiency of the system. I went ahead and hit Update All on the iPad, including Magic, just to watch my internet usage. Not surprisingly, the original Win8 update is invisible, the Paper app (in the middle) looks less foreboding compared to what continues over the next few minutes… Looking at it a day later before I hit publish on this post, we can see this update is quite the spike on my usage (pointing out a Netflix movie in the evening): Finally, here’s my daily usage over the past couple of days – bearing in mind these numbers include all traffic in my home. Work, VOIP, Netflix, etc.: Needless to say, updating a large number of apps on iOS becomes time and bandwidth consuming. Win8 can do it right, Android via Smart App Updates (though I haven’t tested it) can do it, but that it’s _still_ absent in iOS6 is a bit surprising.

Don’t forget – we have our weekly Windows 8 DevCamp in Charlotte tomorrow, 10/12! In this week's DevCamp, we'll dive into Sharing, Settings, and Roaming. We will also cover some tips and tricks for developing Windows 8 applications using HTML, JavaScript, and CSS. Finally, we'll also spend a few hours going hands on to ensure the best experience for your app! For more information and to register, visit http://developersguild.org/.

Microsoft RD Jim Duffy and I are hosting a series of events, kicking off with a Windows 8 DevCamp in Raleigh on Sept 25th! I’m the brains, Jim is the talent, so don’t miss it. Sign up here! (Just kidding about Jim being the talent ) http://takenotewin8.eventbrite.com/ The DevCamp is designed to not only introduce you to developing on the platform, but also take active steps through the design, development, and submission phases to get your app into the marketplace. Here’s the rundown: October 26th is right around the corner! Time is ticking away and the time to act is now! Microsoft Developer Evangelist Brian Hitney and Jim Duffy want to help you get your app in the store in time for the October 26 Windows 8 launch. Come join us on Tuesday, September 25, at 9:00 AM in the Microsoft RTP offices to learn how simple it can be to construct a world class Windows 8 application. Don't think you can be ready to join the Windows 8 launch? Come anyway. You might be surprised. Don't have any idea what kind of app to build? Come anyway. They're are plenty of places to look for inspiration. Either way you can learn what it takes to create or tune an app for Windows 8 and publish it in the Windows App Store. (Registration opens at 8:30 AM.) Windows 8 Overview and the Windows Store Haven't seen Windows 8 or know what it takes to get an app in the Windows Store? We'll cover that here. Drink your coffee because this first session will dive quickly into Windows 8, the platform, the changes, and the Windows Store, allowing you to monetize applications in a number of ways from in app purchases to subscriptions to trials. Cookbook I: Design Templates and Style In this session, we'll talk about the design principles for Windows Store applications – controls, color, typography, and general guidelines to follow to deliver the best user experiences. We'll also dive into the development choices and tooling support available. We'll begin with the built in templates and show how we can quickly scaffold a data-driven application called the Contoso Cookbook. Cookbook II: Data, Contracts, and Settings You've seen the Cookbook. But, how do we leverage data? How do we expose our data to allow users to search and share from the app? We'll explore these options in this session, from storing data, retrieving data via a web service using an in app purchase, to implementing search and sharing contracts, we'll look at the code that makes this possible. We'll also show how to store data locally, as well as roam preferences that can follow a user automatically as they log in to different devices. Cookbook III: Application Bar, Tiles and Notifications We've got the Cookbook well under way; now it's time to add some polish. We'll look at using the app bar for common tasks, and spend time talking about leveraging "live tiles" to create an up-to-date, engaging tile for your application. We'll also look at using Notifications, and how applications can run either background agents for various tasks, or be notified from a remote service using the Windows Notification Service. Hands On: [Your App Here] Now it's your time. Fire up your laptop with Windows 8 Release Preview (or RTM) and VS Express 2012 loaded on it and get ready to code!

I have a Canon MP830 USB printer hooked up to my always on workstation at home, and this is shared so that anyone in the house can use it to print. I haven’t had any issues until trying to add the printer in Windows 8. When I tried to add the network printer:
It looks like the printer is being added ok, but then I would be given the dreaded 0x00000002 error:
This is a driver issue. But what I couldn’t quite understand is why. The drivers were all 64 bit, it’s USB … and I’ve added other printers (since I travel around) without problem. The first thing I tried to do is see if I could get the printer to work locally. I plugged the USB cable into the Windows 8 laptop, and it worked right away:
So, the driver is working locally. I tried again to add it as a network printer, thinking maybe it would use the correct driver or somehow missing the correct the driver to use, but it failed again.
The way I solved this was like so … and note, if the printer still won’t work when connected locally, this method won’t help:
Navigate to the Control Panel –> Hardware –> Devices and Printers, and select Add a Printer.
On the dialog that appears, select “The printer that I want isn’t listed” option:
And then “Add a local printer or network printer with manual settings” option:
Add a new local port:
And in the dialog that pops up, enter the network path to the printer (host name, plus the printer share name):
Now you’ll get to specify the driver to use. Windows has already installed driver because I tested the printer locally first, so I can select it right away. Otherwise, you’ll need a driver disk or can attempt to have Windows Update find it for you:
And boom, printer added:
So, why is this problem happening? I received the same error on two different machines. Fortunately because this was easily solved, I didn’t spend much time diving in. But if I had to guess, I suspect the Win8 machine asks the server for a compatible driver, and an error occurs trying to negotiate. Using this method essentially allows us to manually select the driver.

This coming Saturday, 9/8/12, we’re putting together a 1 day Windows 8 DevCamp! Check out the details here: http://developersguild.org
What we decided to do is put the best content from ou
Technorati Tags: windows 8,development,charlotte,microsoft
r other Win8 DevCamps (typically 2 day), and create an essential, what-you-need-to-know day of content to help you get an app up and running quickly. In addition, we decided to build the entire content around the Contoso Cookbook sample app, allowing us to focus on a single solution implementing the best practices.
Here’s an overview of the event:
We want your app in the store in time for the October 26 Windows 8 launch. Join us Saturday, September 8, at 9:00 AM in the Mt. Kilimanjaro/Mt. Everest rooms of the Charlotte Microsoft Campus to understand how simple it can be to construct a world class Windows 8 application. Don't think you can be ready to join the Windows 8 launch? Come anyway. You might be surprised. Either way you can learn what it takes to create or tune an app for Windows 8 and publish it in the Windows App Store. (Registration opens at 8:30 AM.)
Windows 8 Overview and the Windows Store
Haven't seen Windows 8 or know what it takes to get an app in the Windows Store? We'll cover that here. Drink your coffee because this first session will dive quickly into Windows 8, the platform, the changes, and the Windows Store, allowing you to monetize applications in a number of ways from in app purchases to subscriptions to trials.
Cookbook I: Design Templates and Style
In this session, we'll talk about the design principles for Windows Store applications – controls, color, typography, and general guidelines to follow to deliver the best user experiences. We'll also dive into the development choices and tooling support available. We'll begin with the built in templates and show how we can quickly scaffold a data-driven application called the Contoso Cookbook.
Cookbook II: Data, Contacts, and Settings
You've seen the Cookbook. But, how do we leverage data? How do we expose our data to allow users to search and share from the app? We'll explore these options in this session, from storing data, retrieving data via a web service using an in app purchase, to implementing search and sharing contracts, we'll look at the code that makes this possible. We'll also show how to store data locally, as well as roam preferences that can follow a user automatically as they log in to different devices.
Cookbook III: Application Bar, Tiles and Notifications
We've got the Cookbook well under way; now it's time to add some polish. We'll look at using the app bar for common tasks, and spend time talking about leveraging "live tiles" to create an up-to-date, engaging tile for your application. We'll also look at using Notifications, and how applications can run either background agents for various tasks, or be notified from a remote service using the Windows Notification Service.
Hands On: [Your App Here]
Now it's your time. We'll work in breakouts and 1:1 as necessary to get the tools and environment set up and provide guidance for building out your app. Have an app already underway? We can test, review and provide feedback against store certification requirements. As time permits, we'll cover additional features, and talk further about the certification process. And if your app isn't quite ready yet, that's fine! We're here to give you the kickstart to building your app, and we'll be here to make sure it's done by October 26th