Apress Foundation ASP.NET for Flash (2006).pdf

(10203 KB) Pobierz
Foundation ASP.NET for Flash
443959517.002.png
Foundation ASP.NET for Flash
Ryan Moore
443959517.003.png
Foundation ASP.NET for Flash
Copyright © 2006 by Ryan Moore
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system,
without the prior written permission of the copyright owner and the publisher.
ISBN (pbk): 1-59059-517-3
Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1
Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor, New York, NY 10013.
Phone 1-800-SPRINGER, fax 201-348-4505, e-mail orders-ny@springer-sbm.com , or visit www.springeronline.com .
For information on translations, please contact Apress directly at 2560 Ninth Street, Suite 219, Berkeley, CA 94710.
Phone 510-549-5930, fax 510-549-5939, e-mail info@apress.com , or visit www.apress.com .
The information in this book is distributed on an “as is” basis, without warranty. Although every precaution has been taken in the
preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or
damage caused or alleged to be caused directly or indirectly by the information contained in this work.
The source code for this book is freely available to readers at www.friendsofed.com in the Downloads section.
Credits
Lead Editors
Chris Mills and Matthew Moodie
Assistant Production Director
Kari Brooks-Copony
Technical Reviewer
Joshua Bloom
Production Editor
Ellie Fountain
Editorial Board
Steve Anglin, Dan Appleman,
Ewan Buckingham, Gary Cornell,
Tony Davis, Jason Gilmore,
Jonathan Hassell, Chris Mills,
Dominic Shakeshaft, Jim Sumser
Compositor and Artist
Katy Freer
Proofreader
April Eddy
Project Manager
Beth Christmas
Indexer
Broccoli Information Management
Copy Edit Manager
Nicole LeClerc
Cover Image Designer
Corné van Dooren
Copy Editor
Liz Welch
Interior and Cover Designer
Kurt Krames
Manufacturing Director
Tom Debolski
443959517.004.png
To my Mom, Dad, and Melissa, and Celeste.
To Lindsay.
443959517.005.png
CONTENTS
About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
About the Technical Reviewer . . . . . . . . . . . . . . . . . . . . xiii
About the Cover Image Designer . . . . . . . . . . . . . . . . . . xiv
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi
Chapter 1: Priming the Pump . . . . . . . . . . . . . . . . . . . . . 1
Static web pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Dynamically generated HTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
ASP.NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Flash/ASP.NET communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Methods of communicating between Flash and ASP.NET . . . . . . . . . . . . . . . . 9
FlashVars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
LoadVars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
XML object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Web services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Flash Remoting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Three-tier architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
C# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Similarities between C# and ActionScript 2.0 . . . . . . . . . . . . . . . . . . . . . . . . 15
The .NET Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
The common language runtime (CLR) . . . . . . . . . . . . . . . . . . . . . . . . . . 17
The Framework Class Library (FCL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Installing the .NET Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Setting up Internet Information Services (IIS) . . . . . . . . . . . . . . . . . . . . . . . . 20
Installing IIS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Testing your IIS/ASP.NET installation . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Installing SQL 2005 Express Edition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
v
443959517.001.png
Zgłoś jeśli naruszono regulamin