December 14, 2009

Workaround: Integrating Windows Identity Foundation and Sitefinity

Problem:

After adding an STS reference to your Sitefinity web site, you are able to get to the STS login, but after logging in, the website goes into an infinite refresh loop.

Reason:

Sitefinity takes over the ASP.NET pipeline at an inopportune moment for Windows Identify Foundation.

Solution:

Add a new ASP.NET page to your project called STS.aspx. The page can be blank. It's just there so that the ASP.NET pipeline will remain active at the proper time.

In your web.config, update your audienceUris and realm in the windows.identity section to point to [domain]/STS.aspx instead of just [domain].

Comment out the WSFederationAuthenticationModule httpModule and add this one in its place:
<add name="SitefinityWSFederationAuthenticationModule" type="SitefinityWSFederationAuthenticationModule, App_Code" />


Add a new class to your App_Code folder called SitefinityWSFederationAuthenticationModule.cs with this code:


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Microsoft.IdentityModel.Web;
using Telerik;

public class SitefinityWSFederationAuthenticationModule : WSFederationAuthenticationModule
{

protected override void OnRedirectingToIdentityProvider(RedirectingToIdentityProviderEventArgs e)
{
UriBuilder ub = new UriBuilder(HttpContext.Current.Request.Url);
ub.Path = "/STS.aspx";
ub.Query = String.Empty;
e.SignInRequestMessage.Realm = ub.Uri.ToString();
base.OnRedirectingToIdentityProvider(e);
}

}

November 11, 2009

Pharyngula Gets Comforted

You have to love keyword-sensitive ads. PZ Myers' popular science/atheism blog Pharyngula, due to the constant run of Ray Comfort "Banana Man" jokes, has the funniest ad ever right now when taken in context.

October 26, 2009

FW: FW: FW: No "God" On Dollar Coin?

My wife just sent me this massive FW: FW: FW: designed to throw Christians and those who believe that the United States is a Christian nation into fits of religious paroxysm by claiming that the new gold dollar coins don't have "In God We Trust" on them.

Never mind the history behind this vacuous motto being placed on our currency, but the accusation being levied just isn't true.

Pick up any of the new gold dollar coins and look at the edge. You'll notice two mottos embossed around the outside. One is "In God We Trust." The other is the original motto of the United States of America: "E Pluribus Unum," or "Out of Many, One."

I also love how the E-mail claims that they checked Snopes.com...when it's obvious they didn't. The article on Snopes.com even has pictures to show how full of it they are.

If you are going to forward something thinking you are doing some good or advancing a cause, please do at least the bare amount of research necessary to see if what you are forwarding is actually true. Go to Snopes.com. Go to Bing or Google the main keywords from what you are going to forward and at least check into it. Either you'll find out you are justified, or you'll learn something new. In either case, all of our inboxes will be better for it.

September 11, 2009

WORKAROUND: Catalyst 9 Drivers Blue Screen Windows 7 On Install

Symptoms:

When you try to install the Catalyst 9.x drivers for your ATI Radeon video card on Windows 7 RTM on a machine with an Intel ICH9 chipset, the installation blue screens at the device detection phase.

Cause:

You have a USB device plugged in that isn't compatible with the Catalyst device detection routines.

Workaround:

Unplug every USB device except for your keyboard and mouse. If your system has a Windows SideShow device on it, you may have to disable it in the BIOS.

After doing this, reboot your machine.

Install the drivers.

After a successful install, reboot your machine.

Plug everything back in.

September 3, 2009

Silverlight's Trojan Horse

Microsoft found the perfect way to get Silverlight out to more people...by getting the Java guys to bundle it with their runtime.





Yes, the Bing Toolbar is powered by Silverlight. Personally, I think this is a great idea. After spending over a year learning Java, I realize exactly how much better the .NET Framework is for everyday development. With more penetration, perhaps more developers will see it as well.