Although SharePoint Form Libraries are the natural home for published InfoPath forms, they are not the only home. As long as the form is located in a routable location on a web server, we can directly link to them from an ASP.NET Web Form and populate them with user data.
The "accepted" way to do this is to create cryptic code that involves creating on-the-fly InfoPath DOM and application objects, linking schemas, and manually binding the controls. I took one look at the examples I found in MSDN, and immediately considered a career change. Regardless of not necessarily being difficult or confusing, it simply did not seem like much fun. So here is the way I implemented this, taking full advantage of my managed code.
Placing the code in the OnLoad method into a Try...Catch construct ensures us that if there are any problems, the form will load normally and set the control's values to their defaults. We could also add logic that only does this one time, so that forms that have workflow, for example, will only preload once.