Scott Hanselman

Free WiFi at Portland International Airport (PDX)

February 17, '05 Comments [2] Posted in
Sponsored By

PDXWirelessAccessI usually travel a LOT, but lately, not so much. We've been working on the Voyager SDK 2.0, the Messaging Platform for our Voyager product.

However, I'm sitting here in PDX Airport at the B Gates and I noticed "Free Wi-Fi" signs up all over. I'm used to paying T-Mobile by the minute when I'm in airports.

I'm always interested in how folks implement their Free WiFi. Often it's a captive portal, meaning your first HTTP Request is redirected to an internal site that provides you info and requires you to "sign" a disclaimer, then you're free to surf.

Take a look at the image to the right (click on it). The captive portal that PDX used is NICE. You get all the standard stuff, but also a map of where you are connected, as well as details about the airport and airport services.

We may be a second-tier city, but I have to give PDX Airport "big ups" for their implementation of features like this. It really is a world class airport.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Building your own Windows Media Center Edition 2005 Home Theater PC System

February 16, '05 Comments [21] Posted in Programming
Sponsored By

My co-worker Krishnan is truly the gadgeteer. He has more techie stuff than anyone I've ever known, including myself. He is also an expert on all things HD and Media-y. So, I asked him "should I buy a Media Center PC or build?" I had picked out a lovely $2500 system.

UPDATE - June 2005: Make sure your motherboard and case match. If you click on the D6 link below, be aware that depending on stock on hand Newegg.com may offer you a "similar" motherboard. For one reader they recommended an ATX mobo and Micro-ATX and that's not cool. Also, while note that the Ahanix D6 is not the 601. I currently recommend the LARGER standard ATX Ahanix 601. Make sure you measure as some of these cases are pretty deep.

He said that he just built one from scratch for around $1500. Here's what he did:

This system is totally HD ready, and Krishnan said he taped 11 hours of 1080i SuperBowl content into about 43gigs without a hitch. He's using it as his primary PVR now.

Does anyone know if you can somehow "coerce" or upgrade (laterally?) Windows XP Pro into being a Media Center machine? Perhaps my existing main machine (with specs better than these) could do double duty, without reinstalling, etc.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

More great "Effective Presentation Tips"

February 15, '05 Comments [3] Posted in Musings
Sponsored By

My buddy Venk (Venkatarangan, the RD from Chennai) has posted his tips for effective presentations and they're excellent, surpassing my own attempt from a few years back.

He's even seen fit to make his tips available via PDF. I highly recommend you check them out if you give presentations, or have any coming up.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

ASP.NET HotFix 887219/MS05-004 may break and confuse IIS and ASP.NET (404s)

February 11, '05 Comments [4] Posted in ASP.NET
Sponsored By

Here's an interesting one from Jeff Berkowitz and Phil Hochstetler:

Phil has discovered that MS hotfix 887219 / MS05-004 (http://www.microsoft.com/technet/security/Bulletin/MS05-004.mspx), released last Wednesday, completely breaks our site.  At least on one test machine--happily we caught it before it reached Production.  With the hotfix installed, all our virtual roots (three of them, one containing a web application and two containing collections of web service pages) return 404s exclusively.  Backing out just this one hotfix solves the problem.

The fix was found by Phil on Google Groups: Go to IIS Admin, open Properties on Web Site, Home directory tab, Local Path text box: make sure there is no trailing slash.

 

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

ViewStateUserKey and "Invalid_Viewstate" when posting back during Forms Authentication

February 9, '05 Comments [7] Posted in ASP.NET | ViewState
Sponsored By

From my point of view, I like ASP.NET because it's at least consistent. Anytime some crazy crap happens, at least it makes sense once the dust clears.

We've got a "Workflow" ASP.NET Server Control that i s very snazzy. It's a templated user control that handles all the state transitions one has to deal with when showing and hiding different panels during a Wizard-style operation.

So, you can setup Next and Previous or whatever buttons you like, hook each up to any WorkflowStep and there you go. It's a simpler thing that the UIP. Anyway, as with all ASP.NET 1.1 Postback-like things, it postsback to the current page.

Today someone who was creating an Enrollment and Signon workflow got this Exception during a PostBack:

Exception: System.Web.HttpException
Message: Invalid_Viewstate
Source: System.Web
   at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
   at System.Web.UI.Page.LoadPageViewState()
   at System.Web.UI.Page.ProcessRequestMain()

When you get this exception the standard list of things to check are:

  • If this is a cluster, edit <machineKey> configuration so all servers use the same validationKey and validation algorithm.  AutoGenerate cannot be used in a cluster. 
  • Viewstate can only be posted back to the same page. 
  • The viewstate for this page might be corrupted.

However, this isn't an error that you'd likely see on a single development ox, so something had to be up. The only interesting and different thing about this situation was that the user, in step 4 of this 7-step process, gets logged into Forms Authentication. When I say "gets logged in" I mean, a cookie is sent to them.

Here's the flow of what happened and why it's a problem:

  1. Un-Forms-Authenticated Client (no cookies) does a GET and receives some standard ViewState.
  2. Client fills out form, POSTs back. ViewState is decoded, life goes on.
  3. During Page processing, user is "logged on" and a Forms Authentication cookie is set out (queued up more like it).
  4. Additionally more ViewState is sent back, not encrypted.
  5. Now Forms-Authenticated Client (cookies) fills out form, POSTs back. ViewState from step 4 is returned to the server.
  6. In Global.AuthenticateRequest(), the cookie from this client is cracked open and a valid SecurityPrincipal is put on the current Thread. Now, User.Identity.IsAuthenticated is true, and User.Identity.Name is set to some string.
  7. In the Page.Init() this line executes, which I've mentioned before. This adds another layer of protection to the User's ViewState.:
    if (User.Identity.IsAuthenticated){ViewStateUserKey = User.Identity.Name;}
  8. Then, after Page.Init() but before Page.Load(), the internal method LoadViewStateFromPersistanceMedium() starts to open up the ViewState that was passed to us. This was the non-protected non-encrypted viewstate from step #4.
  9. Exception occurs, because we now are trying to decrypt ViewState with a key that wasn't present when the ViewState was originally generated.

Moral: Don't change ViewStateUserKey when there is pending ViewState that hasn't been posted back and cracked open yet.

However, you can ONLY change Page.ViewStateUserKey in Page.OnInit, so we do a Response.Redirect after the Forms Authentication Cookie is sent out. This avoids any potential trouble with logging a user in on a postback, and cleans up the workflow considerably.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.