® WINDOWS AZURE AND ASP.NET MVC MIGRATION INTRODUCTION xiii ▶ PART I MIGRATION CHAPTER Migrating from ASP.NET to ASP.NET MVC CHAPTER Creating the ASP.NET MVC Project 25 ▶ PART II ENHANCING CHAPTER Understanding ASP.NET MVC Performance Optimization Techniques 71 CHAPTER Fine-tuning the ASP.NET MVC Project for Performance 83 ▶ PART III DEPLOYMENT CHAPTER Discussing ASP.NET MVC Windows Azure Deployment Techniques 119 CHAPTER Deploying an ASP.NET MVC Project to Windows Azure 144 ▶ PART IV MONITORING AND TROUBLESHOOTING CHAPTER Maintaining an ASP.NET MVC Deployment on Windows Azure 186 CHAPTER Monitoring and Supporting an ASP.NET MVC Project on Windows Azure 204 Windows Azure and ASP.NET MVC Migration ® Windows Azure and ASP.NET MVC Migration ® Benjamin Perkins Windows Azure ® and ASP.NET MVC Migration Published by John Wiley & Sons, Inc 10475 Crosspoint Boulevard Indianapolis, IN 46256 www.wiley.com Copyright © 2013 by John Wiley & Sons, Inc., Indianapolis, Indiana ISBN: 978-1-118-67858-9 (ebk) ISBN: 978-1-118-74987-6 (ebk) Manufactured in the United States of America 1R SDUW RI WKLV SXEOLFDWLRQ PD\ EH UHSURGXFHG VWRUHG LQ D UHWULHYDO V\VWHP RU WUDQVPL॔HG LQ DQ\ IRUP RU E\ DQ\ PHDQV HOHFWURQLF PHFKDQLFDO SKRWRFRS\LQJ UHFRUGLQJ VFDQQLQJ RU RWKHUZLVH H[FHSW DV SHUPL॔HG XQGHU 6HFWLRQV RU RI WKH 8QLWHG 6WDWHV &RS\ULJKW $FW ZLWKRXW HLWKHU WKH SULRU ZUL॔HQ SHUPLVVLRQ RI WKH 3XEOLVKHU RU DXWKRUL]DWLRQ WKURXJK payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600 Requests to the Publisher for permission should be addressed to the Permissions Department, -RKQ :LOH\b 6RQV ,QF 5LYHU 6WUHHW +RERNHQ 1- ID[ RU RQOLQH at http://www.wiley.com/go/permissions Limit of Liability/Disclaimer of Warranty: ॡH SXEOLVKHU DQG WKH DXWKRU PDNH QR UHSUHVHQWDWLRQV RU ZDUUDQWLHV ZLWK UHVSHFW WR WKH DFFXUDF\ RU FRPSOHWHQHVV RI WKH FRQWHQWV RI WKLV ZRUN DQG VSHFLਖ਼FDOO\ GLVFODLP DOO ZDUUDQWLHV LQFOXGLQJ ZLWKRXW OLPLWDWLRQ ZDUUDQWLHV RI ਖ਼WQHVV IRU D SDUWLFXODU SXUSRVH 1R ZDUUDQW\ PD\ EH FUHDWHG RU H[WHQGHG E\ VDOHV RU SURPRWLRQDO PDWHULDOV ॡH DGYLFH DQG VWUDWHJLHV FRQWDLQHG KHUHLQ PD\ QRW EH VXLWDEOH IRU HYHU\ VLWXDWLRQ ॡLV ZRUN LV VROG ZLWK WKH XQGHUVWDQGLQJ WKDW WKH publisher is not engaged in rendering legal, accounting, or other professional services If professional assistance is required, the services of a competent professional person should be sought Neither the publisher nor the author shall be liable for damages arisLQJ KHUHIURP ॡH IDFW WKDW DQ RUJDQL]DWLRQ RU :HE VLWH LV UHIHUUHG WR LQ WKLV ZRUN DV D FLWDWLRQ DQGRU D SRWHQWLDO VRXUFH RI IXUWKHU LQIRUPDWLRQ GRHV QRW PHDQ WKDW WKH DXWKRU RU WKH SXEOLVKHU HQGRUVHV WKH LQIRUPDWLRQ WKH RUJDQL]DWLRQ RU :HE VLWH PD\ SURYLGH RU recommendations it may make Further, readers should be aware that Internet Web sites listed in this work may have changed or GLVDSSHDUHG EHWZHHQ ZKHQ WKLV ZRUN ZDV ZUL॔HQ DQG ZKHQ LW LV UHDG For general information on our other products and services please contact our Customer Care Department within the United States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002 Trademarks: Wiley, Wrox, the Wrox logo, Wrox Programmer to Programmer, and related trade dress are trademarks or registered WUDGHPDUNV RI -RKQ :LOH\ 6RQV ,QF DQGRU LWV Dਜ਼OLDWHV LQ WKH 8QLWHG 6WDWHV DQG RWKHU FRXQWULHV DQG PD\ QRW EH XVHG ZLWKRXW ZUL॔HQ SHUPLVVLRQ :LQGRZV $]XUH LV D UHJLVWHUHG WUDGHPDUN RI 0LFURVR॑ &RUSRUDWLRQ $OO RWKHU WUDGHPDUNV DUH WKH SURSHUW\ RI their respective owners John Wiley & Sons, Inc., is not associated with any product or vendor mentioned in this book ACQUISITIONS EDITOR EDITORIAL MANAGER Mary James 0DU\ %HWK :DNHਖ਼HOG PROJEC T EDITOR FREEL ANCE EDITORIAL MANAGER VICE PRESIDENT AND EXECUTIVE GROUP PUBLISHER Richard Swadley Maureen Spears Rosemarie Graham TECHNICAL EDITOR VICE PRESIDENT AND EXECUTIVE PUBLISHER Jim Minatel Don Reamey A SSOCIATE DIREC TOR OF MARKETING PROOFREADER PRODUC TION EDITOR David Mayhew James Saturnio, Word One MARKETING MANAGER COVER DESIGNER Ashley Zurcher Ryan Sneed Daniel Scribner COPY EDITOR San Dee Phillips ABOUT THE AUTHOR %(1-$0Ζ1 3(5.Ζ16Ʉ 0%$ 0&6'1HW ,7,/ 0DQDJHPHQW LV FXUUHQWO\ HPSOR\HG DW 0LFURVR॑ LQ 0XQLFK *HUPDQ\ DV D VHQLRU VXSSRUW HVFDODWLRQ HQJLQHHU RQ WKH ,,6 DQG $631(7 WHDP +H KDV EHHQ ZRUNLQJ SURIHVVLRQDOO\ LQ WKH ,7 LQGXVWU\ IRU DOPRVW WZR GHFDGHV +H VWDUWHG FRPSXWHU SURJUDPPLQJ ZLWK 4%DVLF DW WKH DJH RI RQ DQ $WDUL ;/ GHVNWRS FRPSXWHU +H WDNHV SOHDVXUH LQ WKH FKDOOHQJHV WKDW WURXEOHVKRRWLQJ WHFKQLFDO LVVXHV KDYH WR RHU DQG VDYRUV LQ WKH UHZDUGV RI D ZHOOZUL॔HQ SURJUDP $॑HU FRPSOHWLQJ KLJK VFKRRO KH MRLQHG WKH 8QLWHG 6WDWHV $UP\ DQG VHUYHG DV DQ 0$ WDQN GULYHU LQ WKH *XOI :DU RI $॑HU VXFFHVVIXOO\ FRPSOHWLQJ KLV PLOLWDU\ VHUYLFH KH D॔HQGHG 7H[DV $ 8QLYHUVLW\ LQ &ROOHJH 6WDWLRQ 7H[DV ZKHUH KH UHFHLYHG D %DFKHORU RI Business Administration degree in management information systems +LV UROHV LQ WKH ,7 LQGXVWU\ KDYH VSDQQHG WKH HQWLUH VSHFWUXP IURP SURJUDPPHU WR V\VWHP architect, technical support engineer, to team leader and mid-level management While employed DW +HZOH॔3DFNDUG KH UHFHLYHG QXPHURXV DZDUGV GHJUHHV DQG FHUWLਖ਼FDWLRQV +H KDV D SDVVLRQ IRU technology and customer service, and looks forward to trouble shooting and writing more worldclass technical solutions “My approach is to write code with support in mind, and to write it once correctly and completely so we not have to come back to it again, except to enhance it.” Benjamin is married to Andrea and has two wonderful children, Lea and Noa ABOUT THE TECHNICAL EDITOR '21 5($0(