PROFESSIONAL DNN7

INTRODUCTION ...... xli

CHAPTER 1 An Inside Look at the Evolution of DNN ...... 1 CHAPTER 2 Installing DNN Version 7 ...... 103 CHAPTER 3 DNN Platform Overview ...... 119 CHAPTER 4 Site Administration ...... 131 CHAPTER 5 Host Administration ...... 201 CHAPTER 6 Modules ...... 243 CHAPTER 7 System Architecture...... 257 CHAPTER 8 Core DNN ...... 275 CHAPTER 9 Membership Security ...... 291 CHAPTER 10 Localization...... 307 CHAPTER 11 Search ...... 329 CHAPTER 12 URL Management ...... 367 CHAPTER 13 Beginning Module Development ...... 401 CHAPTER 14 Developing Modules: User Interfaces ...... 455 CHAPTER 15 Developing Modules: Business Logic ...... 473 CHAPTER 16 Developing Modules: Best Practices and Moving Forward ...... 495 CHAPTER 17 Skinning ...... 505 CHAPTER 18 Packaging and Distribution ...... 561 CHAPTER 19 Commercial Philosophy ...... 587 CHAPTER 20 Evoq Content ...... 593 CHAPTER 21 Evoq Engage ...... 601 CHAPTER 22 The DNN Store ...... 615 CHAPTER 23 DNN on Azure ...... 643 APPENDIX A Resources ...... 691 APPENDIX B System Message Tokens ...... 697

INDEX ...... 701

ffi rs.indd 04/22/2015 Page i

PROFESSIONAL DNN7

ffi rs.indd 04/22/2015 Page iii

PROFESSIONAL DNN7 OPEN SOURCE .NET CMS PLATFORM

Shaun Walker Ashish Prosad Bruce Chapman Nathan Rover Cathal Connolly Will Strohl Peter Donker Erik van Ballegoij Israel Martinez Scott Willhite Charles Nurse Ralph Williams Chris Paterra Mitchel Sellers Clinton Bland Dennis Shiao

ffi rs.indd 04/22/2015 Page v Professional DNN7: Open Source .NET CMS Platform Published by John Wiley & Sons, Inc. 10475 Crosspoint Boulevard Indianapolis, IN 46256 www.wiley.com Copyright © 2015 by John Wiley & Sons, Inc., Indianapolis, Indiana Published simultaneously in Canada ISBN: 978-1-118-85084-8 ISBN: 978-1-118-85079-4 (ebk) ISBN: 978-1-118-85086-2 (ebk) Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 No part of this publication may be reproduced, stored in a retrieval system or transmitted in any or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through 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, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions. Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifi cally disclaim all warranties, including without limitation warranties of fi tness for a particular purpose. No warranty may be created or extended by sales or pro- motional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the 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 pub- lisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Web site may provide or recommendations it may make. Further, readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this work was written and when it is read. 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. Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included with stan- dard print versions of this book may not be included in e-books or in print-on-demand. If this book refers to media such as a CD or DVD that is not included in the version you purchased, you may download this material at http://book- support.wiley.com. For more information about Wiley products, visit www.wiley.com. Library of Congress Control Number: 2015930543 Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, to Programmer, and related trade dress are trade- marks or registered trademarks of John Wiley & Sons, Inc. and/or its affi liates, in the United States and other countries, and may not be used without written permission. All other trademarks are the property of their respective owners. John Wiley & Sons, Inc., is not associated with any product or vendor mentioned in this book.

ffi rs.indd 04/22/2015 Page vi For the Microsoft open source community.

ffi rs.indd 04/22/2015 Page vii ffi rs.indd 04/22/2015 Page viii ABOUT THE AUTHORS

SHAUN WALKER has 20+ years professional experience in architecting and implementing large-scale software solutions for private and public organizations. Shaun is the original creator of DNN, a web content management system for ASP.NET that has cultivated the largest and most successful open source community project native to the Microsoft platform. Based on his signifi cant commu- nity contributions, Shaun has been recognized as a Microsoft Most Valuable Professional (MVP) since 2004 and an ASPInsider since 2005. He was recognized by Business in Vancouver in 2011 as a leading entrepreneur in their Forty Under 40 business awards.

BRUCE CHAPMAN has been an IT professional for 20 years across multiple industries, working with a range of technologies. He has been involved in the DNN community for the past eight years as a contributor, commercial vendor, blogger, and frequent presenter at DNN conferences and commu- nity events. Bruce joined DNN Corporation in 2012 after the acquisition of the well-known URL Master software for inclusion within the DNN Platform and works as a product manager with a current focus on distributing DNN on platforms.

CATHAL CONNOLLY has worked with DNN since its earliest days. He works as a senior engineer at DNN Corporation, focusing primarily on the Platform project, as well as heading up the Security team. He’s been a Microsoft MVP for 10 years, starting out in VB.NET before migrating to C# and fi nally to ASP.NET.

PETER DONKER is the founder and owner of Bring2mind, makers of Document Exchange: a docu- ment management module for the DNN platform since 2004. He has been a DNN core team member (now DNN MVP) since 2007 and spends a signifi cant amount of his time writing open source extensions or improving the platform itself. In 2008 he founded the DNN community inter- nationalization team that acts as a group of consultants to the DNN development team concerning the use of DNN outside the English-speaking world. He currently still works on this team and the architecture team that evaluates contributions made to the platform through GitHub. He also is a member of the DNN Steering committee that provides oversight for the DNN platform roadmap and community relations. In addition to his work on these teams, he is a cofounder and the current president of DNN Connect, an association of DNN community members that aims to defend the interests of the DNN community and acts as a platform for community activities such as organizing DNN events and coordinating the development of specifi c DNN extensions.

ISRAEL MARTINEZ was part of the Product Management Team at DNN Corporation for almost fi ve years. He was part of the evolution of the product from being a platform to providing business solutions such as Evoq Content 8. He holds a bachelor’s of mechanical engineering, a master’s of e-business, and a master’s of software systems. He has spoken at various DNN conferences, includ- ing DNNWorld 2013 and the Southern Fried DNN. Israel has a strong passion for business solu- tions, effi ciency, and research, and he uses these skills on a daily basis.

ffi rs.indd 04/22/2015 Page ix CHARLES NURSE is the chief architect at DNN Corporation, responsible for the overall architecture of the DNN Platform and Evoq products. He has been a Microsoft MVP in ASP.NET for eight years and an ASPInsider for seven. He has spoken at many major conferences including DevConnections (www.devconnections.com), DevTeach (www.devteach.com), VSLive (www.vslive.com), Microsoft Tech Days, and DevReach (www.DevReach.com). In addition, he is a frequent speaker at user groups and code camps, including VBUG, .NET BC, VanTUG, SeaDUG, and Vancouver Tech Fest. He has created two video courses on DNN for Pluralsight — DotNetNuke Fundamentals and DotNetNuke Module Development.

CHRIS PATERRA is the senior product manager of the Evoq line of products at DNN Corporation. Originally a part of the initial DotNetNuke project, Chris has over a decade of experience using and developing DNN products.

CLINTON BLAND is the sales engineer and training manager at DNN Corporation where he pro- vides technical support and product demonstrations for the sales team as well as both internal and external product training. He is a very active member of the DNN community as he is the vice president and evangelist for the Charlotte, NC, based DNN user group and he frequently blogs on DNNSoftware.com. He has helped organize two DNN Community Conferences (Charlotte Day of DNN and Southern Fried DNN) and regularly speaks at DNN conferences, user groups, and universities. In the fall of 2012 he won both DNN Superfan and DNN MVP awards. He was also an assistant baker for the fi rst-ever DNN cake!

ASHISH PRASAD is the senior manager of development at DNN Corporation, primarily responsible for the development process in DNN’s Evoq products. He has been developing and architecting soft- ware for more than 18 years, with over 6 years creating commercial solutions using DNN as a plat- form. Ashish frequently blogs at dnnsoftware.com. Some of his direct contribution in DNN includes the areas of social, messaging and notifi cation, gamifi cation, mobile, and most notably search. Ashish has had senior engineering positions in both Fortune 500 companies and startups, with verticals ranging from banking, insurance, manufacturing, digital marketing, healthcare, and retail. Ashish holds a bachelor of technology in chemical engineering from the esteemed IIT, Varanasi, India, and an MBA in technology management from the University of . He also holds a CISSP (Certifi ed Information Systems Security Professional) designation. He is on Twitter at @ashishprasad.

NATHAN ROVER is an experienced developer with more than 17 years in the Internet industry. He has been working with the DNN Platform for more than 9 years and has been working for DNN Corporation as the principal ecommerce engineer since January 2011. During that time he has been the lead developer for the main corporate site (www.dnnsoftware.com), The Store (store.dnnsoft- ware.com), and Extension Verifi cation Service (eve.dnnsoftware.com).

WILL STROHL is an author and technologist in the San Francisco area, specializing in DNN and the Microsoft.Net stack. Will has held positions ranging from help desk technician to being the director of technology and is a former employee of DNN Corporation, having run the evangeli- cal, sales engineering, and education programs. Today, Will is the director of product management and co-owner at a very exciting e-commerce software company, Hotcakes Commerce (www.HotcakesCommerce.com). He is also the co-host of the monthly DNN Hangout video podcast. In his spare time, Will maintains nearly 30 open source projects, speaks at various user groups and code camps, mentors others in leadership and personal branding, plays Call of Duty, and enjoys out- door activities and running.

ffi rs.indd 04/22/2015 Page x ERIK VAN BALLEGOIJ is a senior .NET consultant and DNN expert. He is currently working for Arrow Consulting and Design, a gold-level DNN partner. He is also a DNN MVP and is very active in the DNN community. Until September 2014 he was senior developer at DNN Corporation, based in the European offi ce in Amsterdam, The Netherlands. As a member of the engineering team, his activities focused on localization, ranging from feature design and implementation to coordination of translations. Apart from that, he was also the main resource for the DNN Developer Support program, a service available to customers and partners. Erik is a longtime member of the DNN community, drawn to it in the late days of DNN 2. Localization has always been an area of interest, resulting in the translation of DNN 3 and 4 in Dutch and the development of various popular localization products. He joined the core team in 2007 and was also awarded Microsoft MVP in that same year, the fi rst of a total of fi ve. In 2011 Erik joined DNN Corporation as a sales engineer/support representative. The customer interaction experience has been invaluable in his role as senior developer. Erik is board member of the Dutch DNN user group and founding member of the European DNN professionals network.

SCOTT WILLHITE is cofounder of the DotNetNuke open source project and DNN Corporation. A technologist by trade, he studied computer science and information systems management at Baylor University and honed those skills with Accenture into enterprise architecture expertise for the likes of USAA, Bank of America, and American Express and in fi elds ranging from health- care to consumer products. He has co-authored three previous books including DotNetNuke for Dummies, has been recognized with Microsoft’s MVP award on multiple occasions, and has spo- ken at several major and minor conferences including DevConnections, DNNWorld, and various DNN user group events. Scott is an avid supporter of DNN’s “abundance mentality” with more than a decade of experience in community development, volunteer coordination, and relationship counseling. He is most gratifi ed when his love of people and technology collide to improve the quality of life.

RALPH WILLIAMS, JR., is the web developer manager at Arrow Consulting and Design as well as a user experience and graphic designer. He leads a team of front-end developers who specialize in building large DNN websites. He has been involved in the DNN community for nearly 10 years, speaking at several DNN conferences including DNN World, code camps, and DNNCon (formerly Day of DotNetNuke). He combines his front-end development and ux design knowledge to create usable experiences for enterprise-level web applications.

MITCHEL SELLERS is CEO/director of development at IowaComputerGurus, Inc., responsible for day-to-day business operations, software architecture, and training needs. He has been a Microsoft MVP in C# for six years and DNN MVP since the inception of the program. He has given more than 150 talks at user groups, code camps, and conferences large and small across the world. He previously authored Professional DotNetNuke Module Programming, co-authored Visual Studio 2010 Six-In-One, and has served as a technical editor on numerous other titles. For more informa- tion on Mitchel and his hobbies, visit his website http://www.mitchelsellers.com.

DENNIS SHIAO is the director of content marketing at DNN Corporation. Responsible for a program that generates leads and drives revenue, Dennis himself is a content machine, personally creating or overseeing all corporate blog posts, white papers, data sheets, and presentations available on the DNN website and SlideShare. A prolifi c writer, he is also the author of the book Generate Sales Leads with Virtual Events and is a contributing author to the book 42 Rules of Product Marketing.

ffi rs.indd 04/22/2015 Page xi ffi rs.indd 04/22/2015 Page xii ABOUT THE TECHNICAL EDITORS

SEBASTIAN LEUPOLD earned a degree in business engineering from Karlsruhe University and in 1997 founded the corporation gamma concept - Gesellschaft für Aktuelle Management- Anwendungen mbH. The company focuses on software solutions for PCs and the Internet, espe- cially on web applications based on the DNN open source platform. gamma concept took part in several national and international research projects regarding IT applications in SME including multilingual solutions. Since 2007 Sebastian has been a member of the DNN Core Team and co- founder of the German DNN User Group as well as the European Network of DNN Professionals. Besides supporting the community with nearly 50,000 forum posts, he presented at various confer- ences in Europe and North America. A couple of features and improvements for the DNN Platform were contributed by him. His free Turbo SQL scripts improve the performance of DNN signifi - cantly. Sebastian was awarded as a Microsoft Most Valuable Professional since 2007.

BRIAN DUKES has been working with Engage professionally since 2006, but he has been writing code since around 1998. Brian is very passionate about writing code that is easily maintainable and helping others to do the same. He has been a leader in the DNN community and can often be found speaking at conferences and helping others on Twitter, GitHub, and StackOverfl ow. DNN recog- nized his community efforts by naming him as a DNN MVP starting in 2012. Outside of work, Brian spends time with his family, serves Jesus at City Lights Church, and supports social justice, fair trade, local, seasonable food, and international adoption.

ffi rs.indd 04/22/2015 Page xiii