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.
When you install an instance of Active Directory Federation Services v2, amongst other
things it will create a website within IIS to use as it’s Secure Token Service.
This is sort of fundamental to the whole design. There are some interesting
things to note about the situation though.
When Microsoft (or any ISV really) releases a new application or server that has a
website attached to it, they usually deliver it in a precompiled form, so all we do
is point IIS to the binaries and config files and we go from there. This serves
a number of purposes usually along the lines of performance, Intellectual Property
protection, defense in depth protection, etc. Interestingly though, when the
installer creates the application for us in IIS, it drops source code instead of a
bunch of assemblies.
There is a valid reason for this.
It gives us the opportunity to do a couple things. First, we can inspect the
code. Second, we can easily modify the code. Annoyingly, they don’t give
us a Visual Studio project to do so. Let’s create one then.
First off, lets take a look at what was created by the installer. By default
it drops the files in c:\inetpub\adfs\ls. We are given a few files and folders:
There isn’t much to it. These files only contain a few lines of code.
Next we create the actual project.
DISCLAIMER: I will not be held responsible if things break
or the server steals your soul. Please do NOT (I REPEAT) do NOT do this with
production servers please! (Notice I said please twice?)
Since we want to create a Visual Studio project, and since ADFS cannot be installed
on a workstation, we have two options:
Install Visual Studio on the server running ADFS
Copy the files to your local machine
Each options have their tradeoffs. The first requires a bit of a major overhaul
of your development environment. It’s very similar to SharePoint 2007 development.
The second option makes developing a lot easier, but testing is a pain because the
thing won’t actually work properly without the Windows Services running. You
would need to deploy the code to a test server with ADFS installed.
Since I have little interest in rebuilding my development box, I went with the second
Okay, back to Visual Studio. The assemblies referenced were all built on Framework
3.5, so for the sake of simplicity lets create a 3.5 Web Application:
I haven’t tested 4.0 yet.
Since this is a Web Application and not a Web Site within Visual Studio, we need to
generate the *.designer.cs files for all the *.aspx pages. Right-click your
project and select Convert to Web Application:
At this point if you tried to compile the application it wouldn’t work. We are
missing a few assembly references. First, add Microsoft.IdentityModel.
This should be in the GAC or the Reference Assemblies folder in Program Files.
Next, go back to the ADFS server and navigate to C:\Program Files\Active Directory
Federation Services 2.0 and copy the following files:
Add these assemblies as references. The web application should compile successfully.
Next we need to sign the web application’s assemblies. If you have internal
policies on assembly signing, follow those. Otherwise double-click the properties
section in Solution Explorer and navigate to Signing:
Choose a key file or create a new one. Rebuild the web application.
So far we haven’t touched a line of code. This is all general deployment stuff.
You can deploy the web application back to the ADFS server and it should work as if
nothing had changed. You have a few options for this. The Publishing Features
in Visual Studio 2010 are awesome. Right click the project and Publish it:
Since I set up a test box for ADFS development, I’m just going to overwrite the files
on the server:
Pro Tip: If you do something terrible and need to revert back to original code (what
part of don’t do this on a production box didn’t make sense? )
you can access the original files from C:\Program Files\Active Directory Federation
At this point we haven’t done much, but we now have a stepping point to modify the
default behavior of ADFS. This could range from simple theme changes to better
suit corporate policy, or to completely redefine the authentication workflow.
This also gives us the ability to better protect our code in the event that IIS craps
out and shows contents of files, not to mention the (albeit minor) performance boost
we get because the website doesn’t need to be recompiled.
Unfortunately I will be unable to attend the ALM presentation later this afternoon,
but luckily I was able to catch it in Montreal last week.
When I think of ALM, I think of the development lifecycle of an application – whether
it be agile or waterfall or whatever floats your boat – that encompasses all parts
of the process. We’ve had tools over the years that help us manage each section
or iteration of the process, but there was some obvious pieces missing. What
about the SQL? Databases are essential to pretty much all applications that
get developed nowadays, yet for a long time we didn’t have much in the way to help
streamline and manage the processes of developing database pieces.
Enter ALM for SQL Server. DBA’s are now given all the tools and resources developers
have had for a while. It’s now easier to manage Packaging and Deployment of
Databases, better source control of SQL scripts, and something really cool: Database
I have a story: Sometime over the last couple years, a developer wrote a small little
application that monitors changes to database schemas through triggers, and then sync’ed
the changes with SVN. This was pretty cool. It allowed us to watch what
changed when things went south. Problem was, it wasn’t necessarily reliable,
it relied on some internal pieces to be added to the database manually, and made finding
changes through SVN tricky.
With ALM, versioning of databases happens before deployment. Changes are stored
in TFS, and its possible to rollback certain changes fairly easily. Certain changes.
That’s pretty cool.
A few months ago some friends of mine at Microsoft told me about a step-up promotion
that was going on for the release of Visual Studio 2010. If you purchased a
license for Visual Studio 2008 through Volume Licensing, it would translate into the
next version up for the 2010 version. Seems fairly straightforward but here
is the actual process:
So we upgraded our licenses to benefit from the step up. Problem was, we couldn’t
access any of the applications we were licensed to use (after RTM, obviously).
After a week or so of back and forth with Microsoft we finally got it squared away.
A lot of manual cajoling in the MSDN Sales system, I suspect, took place. It
turns out a lot of people were running into this issue.
Someone told me this issue got elevated to Steve B (not our specific issue, but the
step-up issue in general). I’m curious where things actually went wrong.
I suspect the workflow that was in place at the business level wasn’t in place at
the technical level, so everything ended up becoming a manual process. However,
that is purely speculative. Talk with Steve if you have questions.
In the end, everything worked out. I got Visual Studio 2010 installed (which
fricken rocks, btw), and my productivity will go up immensely once we get TFS deployed.
After of course, it has the necessary drop while I’m downloading and playing with
the new MSDN subscription.
For those that are interested in the promotion, it’s still valid until the end of
April. Contact your account rep’s if you are interested.
There is a bug in Visual Studio 2008 that causes some projects that are upgraded via the /Upgrade command line switch to not properly upgrade. In order to fix it you need to modify the project file's XML as specified in the forum post, otherwise when it is opened in VS2008 it will prompt again for conversion (which will succeed this time as you are doing it via the UI rather than the command line!). This is going to be fixed in VS2008 SP1.
Massive trap for young players....
As the title says, it is released on MSDN Subscriptions. Go get it everyone!
Visual Studio Team System 2008 Team Foundation Server Trial (x86 and x64 WoW) - DVD (English)
Visual Studio Team System 2008 Team Suite Trial (x86 and x64 WoW) - DVD (English)
Visual Studio Team System 2008 Test Load Agent Trial (x86 and x64 WoW) - CD (English)
Visual Studio 2008 Standard Edition (x86 and x64 WoW) - DVD (English)
Visual Studio 2008 Express Editions (x86 and x64 WoW) - DVD (English)
Visual Studio 2008 Professional Edition (x86 and x64 WoW) - DVD (English)
MSDN Library for Visual Studio 2008 (x86 and x64 WoW) - DVD (English)
Here are some nice keybinding posters from Microsoft Downloads.
Visual Basic 2008 Keybinding Poster
Printable wall poster containing list of useful keyboard shortcuts for Visual Basic 2008 developers
Visual C++ 2008 Keybinding Poster
List of keybidings for Visual C++ language within Visual Studio and Visual C++ Express 2008
Visual C# 2008 Poster
Wall chart showing useful keyboard shortcuts for Visual C# programming language
NET Namespaces Poster
The .NET Framework 3.5 Common Namespaces and Types Poster