The problem was that I was receiving the following error in the event log:
Forms authentication failed for the request. Reason: The ticket supplied was invalid.
but I had not looked at the event log.
Apparently it is a requirement of ASP.NET to set the cookie value to an encrypted ticket, as shown in this code sample. Despite what some of the documentation implies, you cannot just put anything you want in the forms authentication cookie.