Last night a couple people asked where I got all the neat VS2010 desktop backgrounds. I couldn’t remember the URL off the top of my head last night, but the website is http://vs2010wallpapers.com/. There are a lot of great backgrounds. My favorite though is the ducky. 

Earlier this morning I got an email from John
Bristowe congratulating me on being selected to present a session for the local
flavours track at TechDays in Toronto!
This bumps
up my count to 2. Needless to say I am REALLY excited.
I was a little disappointed to find out there weren’t any sessions on the Windows
Identity Foundation, so that just meant I had to submit my own to the local flavours
track…and they accepted it! Here are the details:
October 27, 3:40 PM to 4:45 PM
Breakout | LFT330: Windows Identity Foundation Simplified: All the Scary Things
Made Un-Scary
The Windows Identity Foundation helps simplify user access for developers by externalizing
user access from applications via claims and reducing development effort with pre-built
security logic and integrated .NET tools. This presentation is an intimate discussion
on the basics of the Windows Identity Foundation and its claims model. In this session,
you’ll learn how to refactor an existing sample set of applications to use WIF, to
connect identities to the Cloud, and to remove the burden of managing multiple disparate
user stores.
Location: Metro Toronto Convention
Centre - South Building (255 Front Street West, Toronto)
Room: TBA
Rob Windsor and TVBUG are letting me present on
November 8th on Claims-Based Authentication and Identification. Here are the
details:
Location: Room 1, Library, 2nd floor, North York Public Library
Date: Monday, November 8, 2010
Time:
6:30 to 6:50 (Pizza - Meet and Greet)
6:50 to 7:00 (Group Business)
7:00 to 9:00 (Presentation)
Topic: Changing the Identity Game with the Windows Identity Foundation
Abstract: Identity is a tricky thing to manage. These days every application requires
some knowledge of the user, which inevitably requires users to log in and out of the
applications to prove they are who they are as well as keep a record of their accounts.
With the Windows Identity Foundation, there is a fundamental shift in the way we manage
these users and their accounts. In this presentation we will take a look at the why's
and dig into the how's of the Windows Identity Foundation by building an Identity
aware application from scratch.
Directions
All TVBUG meetings are held at the North York Public Library or North York
Memorial Hall. Both are located in the same building at Yonge Street and Park
Home Avenue (North of the 401 between Sheppard and Finch across from Empress Walk).
If you are taking the Subway get off at the North York Centre Station.
The library meeting rooms are on the 2nd Floor. Memorial Hall meeting rooms are on
the Concourse Level near the food court.
Sometime last week I sent out an email to quite a few people:
As is the way of things in the tech industry, jobs change. More specifically,
mine.
Sometime around October 1st this email will be turned off as I am starting
a new position with ObjectSharp working with some of the brightest minds in Toronto.
If you need to get in touch with me after that date you can do it through a few channels.
My personal email is steve@syfuhs.net, which
gets checked more often than it should, and my O# email will be ssyfuhs@objectsharp.com.
Cheers
Steve Syfuhs, MCP
Soon to be ex-Software Developer / Database Analyst
Woodbine Entertainment Group
416.675.3993 Ext 2592
While I really enjoyed my job here at Woodbine (even though I complained about it
from time to time), it’s time for change and to move on to new opportunities.
Barry Gervin offered me such an opportunity and I start with ObjectSharp on October
1st. Bonus for starting on a Friday.
My role has many functions. Some internal; some external. Some loud; some…notsomuch.
Some cryptic.
It sounds like it will be an amazing experience!
So… I leave you with this:
Earlier
this week Microsoft Canada put on an event for the Windows
Phone 7 RTM. Joey Devilla has an excellent
post on the event, but here is my take away.
Beautiful
First off, this interface is amazing. It is functional, beautiful, and FAST.
Hardware acceleration is a thing of beauty.
Developer Friendly
Developing on competing platforms can be an ugly thing. There are a number of
reasons, all valid, but when it comes right down to it, sometimes the development
environment just sucks. Notsomuch with #wp7dev.
Full Visual Studio and Expression Blend integration is another thing of beauty.
Silverlight development is a joy in these environments. Oh, and the phone is
ALL Silverlight. How COOL is that?
Start to finish, 10 hours to develop a simple application. That includes the
learning curve of the IDE and Silverlight.
The Community
Microsoft kind of dropped the ball on 5, 6, 6.1, and 6.5 for the Windows Phone.
The community was openly hostile to this. Not too many people liked those versions.
With the introduction of 7, the criticality of the community has been high, but they
have been extremely open to the possibilities this new UI brings with it. Microsoft
is touting this as a technology reset. The community tends to agree. Let’s
hope it meets expectations when it hits the stores.
What’s Next?
Get the tools. Try it out. Find a local event that has a device and try
and break your application. Chances are, you’ll have more fun than you expect.
Just a quick little collection of useful code snippets when dealing with certificates.
Some of these don’t really need to be in their own methods but it helps for clarification.
Namespaces for Everything
using System.Security.Cryptography.X509Certificates;
using System.Security;
Save Certificate to Store
// Nothing fancy here. Just a helper method to parse strings.
private StoreName parseStoreName(string name)
{
return (StoreName)Enum.Parse(typeof(StoreName), name);
}
// Same here
private StoreLocation parseStoreLocation(string location)
{
return (StoreLocation)Enum.Parse(typeof(StoreLocation), location);
}
private void saveCertToStore(X509Certificate2 x509Certificate2, StoreName storeName, StoreLocation storeLocation)
{
X509Store store = new X509Store(storeName, storeLocation);
store.Open(OpenFlags.ReadWrite);
store.Add(x509Certificate2);
store.Close();
}
Create Certificate from byte[] array
private X509Certificate2 CreateCertificateFromByteArray(byte[] certFile)
{
return new X509Certificate2(certFile);
// will throw exception if certificate has private key
}
The comment says that it will throw an exception if the certificate has a private
key because the private key has a password associated with it. If you don't pass the
password as a parameter it will throw a System.Security.Cryptography.CryptographicException
exception.
Get Certificate from Store by Thumbprint
private bool FindCertInStore(
string thumbprint,
StoreName storeName,
StoreLocation storeLocation,
out X509Certificate2 theCert)
{
theCert = null;
X509Store store = new X509Store(storeName, storeLocation);
try
{
store.Open(OpenFlags.ReadWrite);
string thumbprintFixed = thumbprint.Replace(" ", "").ToUpperInvariant();
foreach (var cert in store.Certificates)
{
if (cert.Thumbprint.ToUpperInvariant().Equals(thumbprintFixed))
{
theCert = cert;
return true;
}
}
return false;
}
finally
{
store.Close();
}
}
Have fun!
A few posts back I started talking about what it would take to create a new application
for the new Windows Phone 7. I’m not a fan of learning from trivial applications
that don’t touch on the same technologies that I would be using in the real world,
so I thought I would build a real application that someone can use.
Since this application uses a well known dataset I kind of get lucky because I already
have my database schema, which is in a reasonably well designed way. My first
step is to get it to the Phone, so I will use WCF Data Services and an Entity Model.
I created the model and just imported the necessary tables. I called this model
RaceInfoModel.edmx. The entities name is RaceInfoEntities This is ridiculously
simple to do.
The following step is to expose the model to the outside world through an XML format
in a Data Service. I created a WCF Data Service and made a few config changes:
using System.Data.Services;
using System.Data.Services.Common;
using System;
namespace RaceInfoDataService
{
public class RaceInfo : DataService
{ public static void InitializeService(DataServiceConfiguration config) { if (config
== null) throw new ArgumentNullException("config"); config.UseVerboseErrors
= true; config.SetEntitySetAccessRule("*", EntitySetRights.AllRead); //config.SetEntitySetPageSize("*",
25); config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;
} } }
This too is reasonably simple. Since it’s a web service, I can hit it from a
web browser and I get a list of available datasets:
This isn’t a complete list of available items, just a subset.
At this point I can package everything up and stick it on a web server. It could
technically be ready for production if you were satisfied with not having any Access
Control’s on reading the data. In this case, lets say for arguments sake that
I was able to convince the powers that be that everyone should be able to access it.
There isn’t anything confidential in the data, and we provide the data in other services
anyway, so all is well. Actually, that’s kind of how I would prefer it anyway. Give
me Data or Give me Death!
Now we create the Phone project. You need to install the latest build of the
dev tools, and you can get that here http://developer.windowsphone.com/windows-phone-7/.
Install it. Then create the project. You should see:
The next step is to make the Phone application actually able to use the data.
Here it gets tricky. Or really, here it gets stupid. (It better he fixed
by RTM or else *shakes fist*)
For some reason, the Visual Studio 2010 Phone 7 project type doesn’t allow you to
automatically import services. You have to generate the service class manually.
It’s not that big a deal since my service won’t be changing all that much, but nevertheless
it’s still a pain to regenerate it manually every time a change comes down the pipeline.
To generate the necessary class run this at a command prompt:
cd C:\Windows\Microsoft.NET\Framework\v4.0.30319
DataSvcutil.exe
/uri:http://localhost:60141/RaceInfo.svc/
/DataServiceCollection
/Version:2.0
/out:"PATH.TO.PROJECT\RaceInfoService.cs"
(Formatted to fit my site layout)
Include that file in the project and compile.
UPDATE: My bad, I had already installed the reference, so this won’t
compile for most people. The Windows Phone 7 runtime doesn’t have the System.Data
namespace available that we need. Therefore we need to install them… They
are still in development, so here is the CTP build http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=b251b247-70ca-4887-bab6-dccdec192f8d.
You should now have a compile-able project with service references that looks something
like:
We have just connected our phone application to our database! All told, it took
me 10 minutes to do this. Next up we start playing with the data.
One of the downsides to using a Blog Engine one wrote while in High School is that
you are using a blog engine that someone wrote while in High School.
I got tired of writing a new feature every time I wanted to do anything different.
The logical approach was to upgrade to a bigger and better system, and DasBlog was
the engine of choice.
With any luck I’ll stick with it, and won’t need to write any more code for this site
in the near future.
Holy crap this is cool:
Tonight at the IT Pro Toronto we did a pre-launch
of the Infrastructure 2010 project.
Have you ever been in a position where you just don’t have a clear grasp of a concept
or design? It’s not fun. As a result, CIPS
Toronto, IT Pro Toronto, and TorontoSQL banded
together to create a massive event to help make things a little more clear.
To give you a clearer understanding of how corporate networks work. Perhaps
to explain why some decisions are made, and why in retrospect, some are bad decisions.
Infrastructure 2010 is about teaching you everything there is to know about a state-of-the-art,
best practices compliant, corporate intranet. We will build, from the ground
up, an entire infrastructure. We will teach you how to build, from the ground
up, an entire infrastructure.
Sessions are minimum 300 level, and content-rich. Therefore:
Well, maybe. (P.S. if you work for Microsoft, pretend you didn’t see that picture)