Wow, I wish I had asked on my previous CX flights. I know it is ultimately up to the captain and some may say no. Still, I hesitate to ask in our post hypersensitive 9/11 world. Would be a dream come true to be able to sit up front on takeoff or landing.
I did ask the FA on a QF 747 flight recently from LAX to JFK for a visit while still on the ground in LAX. I was seated on the upper deck and boarding had just begun. All of a sudden, she got all serious, asked what I did for a living and asked for my passport and took it to the cockpit. She came back and said if there is time after we land in JFK, I could go up. At the end of the flight, the FA invited me up front to the flight deck after all the other upper deck pax had left. The captain was very friendly and it was cool to see a 747 cockpit up close. The other time I asked was on after arriving in LHR on an AA 777. The FAs weren't thrilled as I was one of the last to get off the plane but the captain was more than happy to welcome me to the cockpit and even took my picture sitting in his seat.