Hello 2017

As we embark on yet another trip around the sun, it’s time to say “goodbye” to 2016 and “hello” to 2017. Good old ‘016 will definitely not go down as the year of blogging. While an exciting year with many adventures, we’ll leave it to social media to document items worth noting.

Looking forward however I’m going to make an effort to get back to putting up more technical posts here again. Writing and presenting have always been great motivators to dig into topics even further. I’m looking forward to sharing some of the things I’ve been up to with Azure, Hololens, IoT, ASP.Net Core and even a little python for good health.


TRINUG Intro to XAML Layout Presentation

A big thanks to everybody that showed up to the TRINUG Intro to XAML presentation / hack night. It was a fun format to present some content while fully engaging and audience coding away. It was awesome to see everybody’s interest and enthusiasm.

There were definitely a few areas that I didn’t get to dig into as much as I would have liked to during the presentation with all the Q&A/Interactions, so I thought I would put together a quick video summary of the Xaml Layout portion of the discussion. I’ll hopefully record this a bit better as it’s a little rough but wanted to go ahead and share it out any. Enjoy!


ASP.NET MVC 4 Beta Released–ASP.NET Web API Basic Intro

In case you missed the news, the beta of ASP.NET MVC has been released. You can download
these latest bits MVC 4 Beta bits here
using the Web Platform Installer or you
can download
the complete stand alone setup package instead
. This installs side-by-side with
ASP.NET MVC 3 so you can started working with the latest in 4 without impacted your
existing MVC3 projects. Also important to note, this release includes a “Go-Live”
license so you truly can start using this release. (Note, that all standard caveats
apply, test your stuff, things may change before RTW)

The top features listed in this new release are:


  • Refreshed and modernized default project templates

  • New mobile project template

  • Many new features to support mobile apps

  • Recipes to customize code generation

  • Enhanced support for asynchronous methods

And much, much more!

One of the new and exciting additions mentioned in the list above is the ASP.NET Web
API. Originally know as the WCF Web API (Codeplex
) it has now be integrated tighter with ASP.NET. And why do you care? In this
day and age, almost anything worth connecting to on the web has some sort of API,
facilitating communication from a wide range of clients from browsers, to phones and
tablets. The ASP.NET Web API provides a “modern HTTP programming model.”

It’s easy to get started by selecting the “Web API” template after selecting an MVC
4 Project type.


The new project will contain a sample ValuesController class that shows how to get
things rolling.

public class ValuesController
: ApiController { // GET /api/values public IEnumerable<string>
Get() { return new string[]
{ "value1", "value2" }; } //
GET /api/values/5 public string Get(int id)
{ return "value"; } //
POST /api/values public void Post(string value)
{ } // PUT /api/values/5 public void Put(int id, string value)
{ } // DELETE /api/values/5 public void Delete(int id)
{ } }

Now if you’re familiar with both MVC and common Web API’s, the next step should come
as no surprise. Making a call to http://localhost:33214/api/values will
call the ValuesController, and execute the Get method. In a browser the result may
at first appear like this:


Here’s where you may be confused if you’re not familiar with web API’s. To understand
what’s going on I would encourage you to take a look at the browser’s request and
associated response returned using a tool such as the F12 Developer tools in IE9,
Fiddler, or Firebug or other developer tools in other browsers.

By enabling the F12 Developer tools, selecting the “Network” tab and clicking on Start
Capturing, you will be able to see details for the http traffic.


The key think to note is the Type, or mime type associated with the response. You
will see that it is “application/json” instead of the normal “text/html” that an HTML
page would normally return. If I go ahead and tell IE to open the file and look at
it in notepad we will see the json representation returned by the controller.


This result corresponds directly to the controller code:

 // GET /api/values public IEnumerable<string>
Get() { return new string[]
{ "value1", "value2" }; }

Simple, and extremely powerful. I’ll be posting more on the new ASP.NET Web API and
other ASP.NET MVC4 features in the days ahead.

Getting Back to Blogging

I’ve been blogging for quite a while now, and I’ve been amazed how my posting here
have introduced me to many great people, helped others, and resulting in some really
interesting opportunities for me. Over the last year and a bit, with the rapid flow
of information through twitter and other online resources I’ve slipped out of the
habit of frequent blog posts that I’ve previously done and enjoyed.

Starting today I plan to change that.

Now don’t worry, I’m not going to try and make up for lost time with a landslide of
new posts today, but I do plan to return to a more consistent routine of posts. If
you’re still reading this, thanks for sticking around.

Azure Blob Storage and Hosting Cross-Domain Silverlight Applications

Recently I ran into a situation where I wanted to host an ASP.NET MVC web application
and Silverlight application in Windows Azure. The ASP.NET application provides all
of the backend services for the Silverlight application. This was all well and good
until I decided to move the Silverlight XAP file from the ClientBin directory of the
web application over to Blob Storage so that I could update the XAP file without the
need to redeploy the entire site.

That’s when it broke.

When moving a XAP file to a different “site of origin” than the website, there are
a number of cross domain issues that are potentially introduced. Tim Heuer has and
excellent blog post “Hosting
cross-domain Silverlight Applications”
in which he details the main concerns and
how to address the issues. In my case, it was the “XAP MIME Type” issue causing the
problem. When Windows Azure Blob Storage was serving up the XAP file, it was not correctly
indicating the “application/x-silverlight-app” MIME type. For security reasons Silverlight
checks to see that the content is a valid Silverlight type, in my case not allowing
the XAP file to run.

I had tried using a couple of utilities to copy my content into blog storage, which
had seemed to work fine for image and video files, but not the XAP file and did not
allow me to set the content types manually. [UPDATE: Azure Explorer will allow you
to update MIME Types: http://azurestorageexplorer.codeplex.com/ ]
To resolve the problem, I needed to upload a file to storage and set it’s mime type
to “application/x-silverlight-app”. In the end, this is pretty simple to do so I crafted
a little utility to properly deploy my XAP file using the following code.

var account = new CloudStorageAccount(storageKeys, true);
var container = account.CreateCloudBlobClient().GetContainerReference("clientbin");
container.CreateIfNotExist(); container.SetPermissions(new BlobContainerPermissions
{ PublicAccess = BlobContainerPublicAccessType.Blob }); var blob = container.GetBlobReference(System.IO.Path.GetFileName(fileName));
blob.Properties.ContentType = "application/x-silverlight-app";

Windows Azure Training–A Great FREE Gift for the Holidays!

If you’re looking at getting up to speed with some Windows Azure training , here are
some webcast dates for you to mark down and register for, including the upcoming Firestarter

12/09: MSDN Simulcast Event: Windows
Azure Firestarter

11/29: MSDN
Webcast: Azure Boot Camp: Introduction to Cloud Computing and Windows Azure

12/06: MSDN
Webcast: Azure Boot Camp: Windows Azure and Web Roles

12/13: MSDN
Webcast: Azure Boot Camp: Worker Roles

01/03: MSDN
Webcast: Azure Boot Camp: Working with Messaging and Queues

01/10: MSDN
Webcast: Azure Boot Camp: Using Windows Azure Table

01/17: MSDN
Webcast: Azure Boot Camp: Diving into BLOB Storage

01/24: MSDN
Webcast: Azure Boot Camp: Diagnostics and Service Management

01/31: MSDN
Webcast: Azure Boot Camp: SQL Azure

02/07: MSDN
Webcast: Azure Boot Camp: Connecting with AppFabric

02/14: MSDN
Webcast: Azure Boot Camp: Cloud Computing Scenarios

ASP.NET Web Platform Firestarter–Raleigh 12/10/2010

Friday, December 10, 2010 9:00 AM

North Carolina State University – Jane S. McKimmon Conference & Training Cntr
1101 Gorman St
Raleigh North Carolina 27606
United States



Event Overview

Join your Microsoft Developer Evangelists for this free, all-day event that will get
you up to speed with ASP.NET web development, going from zero to sixty in one day.

Whether you’re just starting out or are already on the web and looking for the latest
developments, join us for this full day of technical content as we take you through
a progression of sessions, all focused on developing with the Microsoft Web Platform.

By the end of the day, you’ll be familiar with latest advances and have a solid understanding
of ASP.NET web development options.


· 8:30 – Registration

· 9:00 –  To the Web with ASP.NET 4 Web Forms

o The tried-and-true approach for creating effective and robust websites, ASP.NET
4 Web Forms offers powerful abstractions and rapid application development features. 
Add in recent advances in ASP.NET 4 and Visual Studio 2010 and you’ll be crafting
amazing sites in no time.

· 10:30 – Looking at ASP.NET MVC

o ASP.NET MVC (Model View Controller) is a relatively new option, offering a variety
of potential benefits such as separation of concerns, flexibility, control, and testability. 
In this session, you’ll learn the essentials, along with the latest advances, so you
can get started right away.

· 12:00 –The Web Platform Smorgasbord

o Grab a bite to eat and join us for this relaxed but rapid-fire lunchtime look at
a variety of web topics, including tools and tech that you’ll surely find appetizing.

· 12:45 – Introducing WebMatrix

o WebMatrix is a new option that provides a simple but powerful way to create web
applications.  You can create sites based on existing open-source applications,
or dive right in and create from scratch.  From code and testing to data and
deployment, we’ll introduce WebMatrix and show you how it can make your life easier.

· 1:40 – Evaluating Your Web Options

o You’re up to speed with the latest in ASP.NET MVC, Web Forms, and WebMatrix, but
you may be wondering how and when to choose between them.  The great news is
you don’t always have to choose just one.  In this session we’ll talk about factors
to consider, options for adoption/migration, and ways to combine ASP.NET Web Forms
and MVC in the same web application.

· 2:40 – Creating Effective Websites with ASP.NET

o Knowing how to create websites with ASP.NET is important, but making them effective
is the key.  This final session dives into additional options and techniques
that apply to both Web Forms and ASP.NET MVC applications.  From scripting with
jQuery and AJAX, design with CSS, markup and validation techniques, and tools for
testing, you’ll learn how to set your sites (and skills) apart from the rest.

· 4:00 – Wrap-up, Evals, and Giveaways

PDC 2010 Followup–Thoughts on Silverlight

When PDC 2010 was first announced, it was largely positioned as a cloud computing
event. Soon other topics such as Windows Phone 7 and IE 9 were added to the mix, as
well as as a framework track. The marketing message at the event was clearly focused
on Azure and supporting HTML 5 through IE9. The event included some exciting announcements
about new Azure features that are just around the corner, a new release of IE9, and
some exciting asynchronous support for languages. There were some other gems, but
not quite the volume of big, wide reaching news that we have become accustomed to
at PDC.

There were a lot of products and technologies that were not discussed. From the very
beginning, the event was very specifically positioned around Azure and cloud. 
Now because of some of the tech media coverage of certain statements made by Microsoft
management, a lot has been read into what was said and what was not shown, especially
around Silverlight. I wish many aspects of what was said was handled differently,
but if you take a step back I think it’s pretty easy to see the bigger picture.

HTML 5 will no doubt play a major role in the future of browsing the web, and it’s
something we need to put on our radar. The reality today however is that HTML 5 is
still a spec being defined, it’s level of support is far ranging, and there are many
things that HTML simply will not do. As always, need to too choose the best tool for
the job at the right time, knowing that eventually there may be new technologies that
we use to do some things. Long before this announcement we were all making choices
about when to use html for websites and Silverlight for more advanced application

Personally, I’m extremely confident in my learning investment in Silverlight and it’s
capabilities to provide long lasting solutions, and extremely excited about using
it in the future!

Here are some other voices from the community to consider:






RDU Code Camp 2010–Developer Training Event

It’s that time of year again when the local Microsoft Developer community works together
to put on a free day of training known as Code Camp.  This mini-conference attracts
a wide variety of speaker from near and far, offering 30+ topics on a variety of topics.
The event is free, and provides a great opportunity to learn network with the local
software development community. The event is scheduled this fall for Saturday November

For complete details and registration please visit http://www.codecamp.org