Expect the Unexpected: The Phantom Menace

Posted by Ryan Baxter Fri, 24 Aug 2007 04:57:00 GMT

My Amazon Associates Order Report for August 2007 MTD is definitely a phantom menace.

Expect the Unexpected: THIS IS WAL-MART!

Posted by Ryan Baxter Tue, 07 Aug 2007 00:57:00 GMT

I purchased the Two-Disc Special Edition DVD of 300 from Wal-Mart this evening. Attached to the cover was a sticker that read “DOWNLOAD THIS MOVIE” and in small print, “Must reside in U.S. Windows Media Compatible Only. Not compatible with iPods.” Visiting walmart.com/300 in Firefox yielded the following:



It’s 2007. Why?

Expect the Unexpected: bool IsInRole(string role)

Posted by Ryan Baxter Tue, 10 Jul 2007 02:34:00 GMT

Running some tests yesterday, I was alarmed by an Exception that read, “The trust relationship between the primary domain and the trusted domain failed.” What?!? This code worked a few weeks ago! The method in question called Page.User.IsInRole(“DomainName\RoleName”) to determine if a user was assigned to an administrator’s role. bool IsAdministrator(). Simple and efficient. Why is this happening?!?

IsInRole

In short, the role that I was supplying Page.User.IsInRole with contained a typo. What is interesting is the results of my test case found below. Pay attention to the method signatures and their outcome.

Page.User.IsInRole(“DomainName\RoleName”) returns true
Page.User.IsInRole(“RoleName”) returns true

Page.User.IsInRole(“DomainName\TypoRoleName”) returns false

But…

Page.User.IsInRole(“TypoRoleName”) throws the Exception

Huh?

I haven’t had time to dig further into this, but I’d definitely be interested in hearing some opinions.

Older posts: 1 ... 3 4 5