Integrated Windows Authentication: Getting FireFox to Play Nice

If you protect your web applications using Integrated Windows Authentication (IWA), typical with company Intranets, FireFox will prompt users to provide their network credentials (i.e. their Username and Password) when they try to access the site.

You can side step this by making minor changes to FireFox so that it will negotiate with the web server behind the scenes, effectively performing a “silent login” like Internet Explorer does automatically when accessing IWA protected apps.

 

IMPORTANT: Your IIS node needs to allow fall back to NTLM Authentication for this to work.

Using the Metabase Manager, part of the IIS Resource Toolkit that is available from Microsoft, will showNegotiate, NTLM under Authentication. If you removed NTLM than this tutorial is a waste of your time

Step 1:

Open FireFox, in the Address Bar type about:config, you will be prompted with a warning like the following.

FF-Intranet-Support1

Step 2:

Click the “I’ll be careful, I promise!” button. In the “Filter” textbox type network.automatic

FF-Intranet-Support2

Step 3:

Select the 2nd option named network.automatic-ntlm-auth.trusted-uris. Enter the values of your Intranet sites, separating them with a comma, and click OK

FF-Intranet-Support3

FireFox will then negotiate your login silently, eliminating the need for the Server Login prompt.

Silverlight Navigation Framework: The NavigationContext and QueryString Parameters

In the Silverlight Navigation Framework moving between pages is pretty straight forward, however you can run into some odd errors that will throw you for a loop if your not careful. As with Asynchronous development as a whole, timing is everything, and the NavigationContext is no exception.

Following the typical scenario in Silverlight, when we want to navigate to a page and pass some information across the QueryString, we do something like the this:

Then in MyPage.xaml we would look at the NavigationContext to see if a QueryString namedMyQueryStringParam existed, and if found then we would access it’s value like so:

 

However, a problem will arise if you attempt to access the NavigationContext to early in the page life cycle, resulting in it being NULL at the time you attempt to access the it or any of its properties, such as QueryString parameter.

The solution to this problem is to overload the Loaded event for the Silverlight page by placing a statement like the following in the page Constructor:

 

Then from inside the overloaded Loaded event you will access the NavigationContext like the following:

 

This ensures that the NavigationContext object has had time to be initialized, providing access to its properties in order to extract any of the QueryString values that you need.

Where Do Good Ideas Come From: Just Ask Steven Johnson

We all have good idea’s, at least we would like to think so. But have you ever really thought of “how” you get a good idea? I mean really really thought about it?

Maybe “good” ideas are cultivated over time as each of our unique experiences, both past and present, come together in a connected manner to bring meaning to things we care about and are interested in.

In this intriguing and insightful talk, given by Steven Johnson at TED 2010 in England, this exact question is raised. It’s well worth the 18 minutes of your life you will spent watching his talk.

Silverlight Error: Element is already the child of another element

Often we have objects that we manipulate in code and need to add/remove from the visual surface of a Silverlight interface. One issue that may arise is the dreaded “Element is already the child of another element” error. In Silverlight you cannot add the same object to more then one parent container (or add the same object multiple times to the same parent, a.k.a. duplicate the control).

To check and see if your object currently has a parent you can use the

If this comparison yields NULL than you know you can safely add the object to an element on the page (like adding it as a Child to a <Grid> via the .Children.Add(<child object goes here>) call). Hope this helps.

Two Chefs in the Kitchen: The future of Silverlight with HTML 5

I have heard, and participated in, the HTML 5 vs. Silverlight argument. Often the dialog begins with something like “Silverlight is on deaths door, HTML 5 has fatally wounded Silverlight and it will officially become a corpse in the very near future”. I could not disagree more.

I do not see HTML 5 as a competitor to Silverlight. While they share some of the same abilities, to me they seem more like two chefs in a single kitchen: both can produce glorious meals simultaneously in different (or the same) ways, both can choose to work together to create a single unified experience or choose to do their own thing, merely existing within the same space at the same time.

Today the Silverlight Team blogged about The Future of Silverlight and how HTML 5 will play a role in that future

On the web, the purpose of Silverlight has never been to replace HTML; it’s to do the things that HTML (and other technologies) couldn’t in a way that was easy for developers to tap into. Microsoft remains committed to using Silverlight to extend the web by enabling scenarios that HTML doesn’t cover. From simple “islands of richness” in HTML pages to full desktop-like applications in the browser and beyond, Silverlight enables applications that deliver the kinds of rich experiences users want. We group these into three broad categories: premium media experiences, consumer apps and games, and business/enterprise apps.

I encourage you to Read the Entire Article and Subscribe to the Silverlight Team Blog. In my opinion Silverlight is here to stay, its a solid viable technology, and I am committed to continuing to use it to solve real world problems as I build software.

In this discussion of the future of Silverlight, there’s a critical point that is sometimes overlooked as Silverlight is still often referred to—even by Microsoft—as a browser plug-in. The web is evolving and Silverlight is evolving, too. Although applications running inside a web browser remain a focus for us, two years ago we began showing how Silverlight is much more than a browser technology.