Migrating from ASP.NET 1.1 to ASP.NET 2.0 Scott Guthrie Web Platform and Tools Team Microsoft Corporation

Slides:



Advertisements
Similar presentations
11 Getting Started with ASP.NET Beginning ASP.NET 4.0 in C# 2010 Chapters 5 and 6.
Advertisements

FIRST LOOK AT “ORCAS” Scott Guthrie General Manager.NET Developer Platform.
DEV392: Extending SharePoint Products And Technologies Through Web Parts And ASP.NET Clint Covington, Program Manager Data And Developer Services - Office.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 5: Managing File Access.
64bit Development Overview March 28 Microsoft. Objectives Learn about the current 64-bit platforms from a hardware, software and tools perspective Review.
Chapter 11 ASP.NET JavaScript, Third Edition. 2 Objectives Learn about client/server architecture Study server-side scripting Create ASP.NET applications.
Best Practices for UI with ASP.NET 2.0 Jeff King Program Manager Web Platform and Tools Microsoft Corporation.
 Visual Studio has great support for building ASP.NET web applications  Real web application development involves more than just copying the files created.
Creating Multi-lingual Applications and Websites with Microsoft Visual Studio 2005 Achim Ruopp International Program Manager Microsoft Corporation.
.NET On A Shoe String By: Patrick Brannen Lead Developer iDevCo, Inc.
Enterprise Reporting with Reporting Services SQL Server 2005 Donald Farmer Group Program Manager Microsoft Corporation.
WEB329 ASP.NET: A Lap Around the New Enhancements for Web Developers in Microsoft Visual Studio 2005 Omar Khan Lead Program Manager Web Platform and Tools.
Introduction to.Net and ASP.Net Course Introduction Build Your Own ASP.Net Website: Chapter 1 Microsoft ASP.Net Walkthrough: Creating a Basic Web Forms.
Preview of ASP.NET 2.0 in Delphi Course #3182 Jim Tierney Principal Engineer - Borland.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Deployment of web Site. Preparing the web site for deployment you now have two versions of web site 1 -one running in the production environment 2-one.
ASP.NET + Ajax Jesper Tørresø ITNET2 F08. Ajax Ajax (Asynchronous JavaScript and XML) A group of interrelated web development techniques used for creating.
Understanding Code Compilation and Deployment Lesson 4.
Beginning Web Site Development Module 1 – Dynamic Web Site Development Fundamentals of building dynamic Web sites with ASP.NET 2.0 and C# Version.
Developing Workflows with SharePoint Designer David Coe Application Development Consultant Microsoft Corporation.
The ASP.NET Server Model Martin Parry Developer and Platform Evangelism Group Microsoft
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 5: Managing File Access.
Ken Casada Developer Evangelist Microsoft Switzerland WebMatrix: Your Web Made.
ASP.NET Web Application and Development Digital Media Department Unit Credit Value : 4 Essential Learning time : 120 hours Digital.
Migrating from the.NET Framework Version 1.1 to 2.0 Ken Casada Developer Evangelist Developer & Platform Evangelism Microsoft Switzerland.
Installing Windows Vista Lesson 2. Skills Matrix Technology SkillObjective DomainObjective # Performing a Clean Installation Set up Windows Vista as the.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
11 Web Services. 22 Objectives You will be able to Say what a web service is. Write and deploy a simple web service. Test a simple web service. Write.
ASP.NET application. Roadmap ASP.NET file types Bin directory Application updates Simple application from start to finish using a virtual directory Behind.
The Web Architecture and ASP.NET. Slide 2 Review of the Web (1) It began with HTTP and HTML, which delivers static Web pages to browsers which would render.
Murach’s ASP.NET 4.0/VB, C1© 2006, Mike Murach & Associates, Inc.Slide 1.
10 – 12 APRIL 2005 Riyadh, Saudi Arabia. Building multi-lingual ASP.Net application that handle western languages and Arabic with a single code base.
Upgrading Projects to Visual Studio 2010 Upgrading Projects to SharePoint 2010 Integrating with SharePoint 2010.
Introducing ASP.NET 2.0. Internet Technologies WWW Architecture Web Server Client Server Request Response Network HTTP TCP/IP PC/Mac/Unix + Browser (IE,
Reset and Recycle IIS Reset Application Pool Management Error Codes New HTTP Sub-status codes Custom/Detailed Errors Tracing in IIS7 and.
Microsoft Dynamics NAV 2009 and Architecture Overview Name Title Microsoft Corporation.
Active Server Pages (ASP), also known as Classic ASP or ASP Classic, was Microsoft's first server-side script engine for dynamically generated web pages.
Name Microsoft Student Partner Overview of the Visual Studio 2005 Express Products.
Module 2: Using Microsoft Visual Studio.NET. Overview Overview of Visual Studio.NET Creating an ASP.NET Web Application Project.
WEB320 Migrating ASP.NET 1.x Applications to ASP.NET 2.0 Stefan Schackow Program Manager Web Platform and Tools Team Microsoft Corporation.
Windows Role-Based Access Control Longhorn Update
DEV303 ASP.NET: Leveraging Visual Studio.NET For Web Projects Tony Goodhew Product Manager Microsoft Corp.
This is the main tracing and diagnostics presentation. Very important that this be practical and useful information. IT Pro audience is very.
WCL303 Business Desktop Deployment (BDD) 2007: Part 2, Deploying the 2007 Office system Michael Niehaus Systems Design Engineer Microsoft
Connect with life Vedant Kulshreshtha Technology Solutions Professional – SharePoint | Microsoft India
WEB322 ASP.NET Internals: Under the Covers – Exploring Internals, Page Lifecycle and the Compilation Model Simon Calvert Program Manager Web Platform and.
PROGRAMMING IN VISUAL BASIC.NET CREATING YOUR FIRST WEB APPLICATION Bilal Munir Mughal 1 Chapter-3.
Configuring and Deploying Web Applications Lesson 7.
Building Custom Controls with ASP.NET and the Microsoft ®.NET Framework Rames Gantanant Microsoft Regional Director, Thailand
The 2007 Microsoft Office System Servers Enterprise Content Management, Workflow and Forms Martin Parry Developer and Platform Group, Microsoft Ltd
Migrating from ASP.NET 1.1 to ASP.NET 2.0 Scott Guthrie Web Platform and Tools Team Microsoft Corporation
Internet Explorer 7 Updated Advice for the NHS 04 February 2008 Version 1.3.
Tips and Tricks for Debugging ASP.NET Web Applications and Services Habib Heydarian TLNL05 Program Manager Microsoft Corporation.
Workflow in Microsoft Office SharePoint Server Jessica Gruber Consultant Microsoft Corporation.
Building Complete Web Application Using ASP.NET 3.5 & Visual Studio 2008 Omar Khan Group Program Manager Visual Studio.
A S P. Outline  The introduction of ASP  Why we choose ASP  How ASP works  Basic syntax rule of ASP  ASP’S object model  Limitations of ASP  Summary.
Vinod Unny Enterprise InfoTech Microsoft Regional Director, North India
ASP.NET 2.0 Mohammed Abdelhadi Developer.NET Evangelist Microsoft Corporation.
ClickOnce Deployment (One-click Deployment)
Migrating from the .NET Framework Version 1.1 to 2.0
Introduction to ASP.NET 2.0
The Modern ASP.NET Tech Stack!
Jon Galloway | Tech Evangelist Christopher Harrison | Head Geek
Application Infrastructure
ASP.NET 2.0 Overview Created By: Ajay Bahoriya.
ClickOnce Deployment (One-click Deployment)
Introduction to ASP.NET Parts 1 & 2
Mark Quirk Head of Technology Developer & Platform Group
Visual Studio 2005 IDE Features
MS Confidential : SharePoint 2010 Developer Workshop (Beta1)
Presentation transcript:

Migrating from ASP.NET 1.1 to ASP.NET 2.0 Scott Guthrie Web Platform and Tools Team Microsoft Corporation

Agenda Migrating from ASP.NET 1.X to ASP.NET 2.0 Visual Studio 2003 to Visual Studio 2005 Conversion

Migrating from ASP.NET 1.X to ASP.NET 2.0

ASP.NET 1.X to ASP.NET 2.0 Goal: Easy to upgrade from V1.1 to V2.0 –We have minimized breaking changes –No OS upgrade required Runs on Windows 2000 & IIS 5.0 Runs on Windows XP & IIS 5.1 Runs on Windows Server 2003 & IIS 6.0 Please Let us know if you find issues with Beta2

ASP.NET 1.X to ASP.NET 2.0 ASP.NET 1.1 & 2.0 can be installed on same machine –Application versions run side-by-side under IIS –Version used identified by IIS vroot ISAPI script-mappings Installing v2.0 on v1.1 server preserves existing v1.1 application mappings –V1.1 applications do not automatically get updated to use V2.0 –Administrator must manually update application using IIS Admin Tool Existing ASP.NET v1.1 applications should run fine using ASP.NET v2.0 –But always test application prior to deployment to verify

Issue Tracker – V1.1 Issue Tracker – V1.1 version running on top of ASP.NET 2.0

ASP.NET 1.X to ASP.NET 2.0 It is possible to upgrade parts of a site to ASP.NET V2.0 while leaving the rest of it to run under ASP.NET V1.1 – on V2.0 and on V1.1http://foo.mysite.comhttp:// – on V2.0 and on V1.1http:// Forms Authentication can work across both ASP.NET versions –To enable in ASP.NET 2.0 you must explicitly set decryption attribute in the machineKey section to 3DES ASP.NET 2.0 encryption default of AES is not compatible with 1.1 Tickets issued in 1.1 are then consumable by ASP.NET 2.0 Tickets issued by ASP.NET 2.0 are then consumable by 1.1 app

Sharing forms authentication tickets

ASP.NET 1.X to ASP.NET 2.0 New ASP.NET reserved directory names (App_) –New naming convention for protecting directories –Avoid naming directories with this prefix ASP.NET Reserved directories –/Bin – Reserved for assemblies. Same as 1.0 and 1.1 –/App_Code – Reserved for code –/App_Data – Reserved for data storage (*.mdf,.xml, etc.) –/App_Themes – Reserved for theme files (.skin) –/App_WebServices – Reserved for.wsdl files –/App_Resouces – Reserved for local page resource files –/App_GlobalResources – Reserved for global resource files

ASP.NET 1.X to ASP.NET 2.0 XHTML compliance switch –XHTML compliant markup is now emitted by default –Good for standards compliance, but can break some UI –Web.config file setting to use older HTML markup rendering –Set this to help with migration of existing sites –Recommend updating pages to be XHTML compliant long-term

ASP.NET 1.X to ASP.NET 2.0 Other XHTML issues: –New pages created using VS2005 include a DOCTYPE directive indicating XHTML 1.1 compliance –IE will render page in browser differently if DOCTYPE present Remove the DOCTYPE to get older html rendering behavior –In future you should update your HTML to be XHTML compliant

ASP.NET 1.X to ASP.NET 2.0 Well known client-side script files are now encapsulated as resources –.js files are now referenced like: WebResource.axd?a=s&r=WebUIValidation.js –Hand-editing WebUIValidation.js file will no longer work –Use the expanded client-side scripting support in ASP.NET 2.0 for enabling common client-scripting scenarios instead

ASP.NET 1.X to ASP.NET 2.0 Potential for naming collisions with existing source code –2,000+ new classes in V2.0 –Common name collisions: Membership, Roles, Profile, Theme Name collisions do not affect already compiled binaries –CLR automatically picks the correct type to use in this case –Name collisions will affect you if you re-compile your project source Recommend you identify collision candidates today –Use a fully qualified class name when referencing these types (e.g. MyProject.Membership instead of Membership) –Alternatively use an alternative class name to avoid future issues

Visual Studio 2003 to Visual Studio 2005 Conversion

Visual Studio Conversion VS 2005 makes significant changes to web projects –Provides much more flexibility for web scenarios Key Benefits: –No more project file required –Web projects no longer compiled into single DLL –Web projects can now be written in multiple languages –No need to re-compile project when making changes –Ability to update pages/code while using the debugger –Significantly cleaner and more robust code-behind model

Visual Studio Conversion VS 2005 converts existing VS 2003 projects on open –One way conversion (cannot open in VS 2003 afterwards) –Always enable backup option as part of upgrade wizard –ConversionReport.txt lists all changes as part of the upgrade Things to be aware of during conversion: –New directories may be created (App_Code, App_WebReferences) –Non-page related class files (.cs,.vb) will be moved to App_Code dir –“Designer generated” sections are processed by the conversion tool –Pages automatically updated to use new code-behind model Recommendations when running under source control: –Move project to new location on disk (out of source control) –Open project and run the conversion wizard –Check back into source control

Visual Studio Conversion New Code-Behind Model –Removes need for VS to generate/modify code in your code-behind –Control definition now handled using new partial class feature of V2 compilers –Still enables definition of custom base pages + control classes Syntax differences: –ASP.NET 1.1 page definition –ASP.NET 1.1 code-behind class definition public class WebForm1 : System.Web.UI.Page –ASP.NET 2.0 page definition –ASP.NET 2.0 code-behind class definition public partial class WebForm1 : System.Web.UI.Page

ASP.NET 2.0 Code-behind Default.aspx Page codefile=“default.aspx.cs” inherits=“Default” public partial class Default : System.Web.UI.Page Default.aspx.cs File containing code behind class definition File containing code behind class definition Class that the page-gen inherits from Class is ‘partial’ and is combined to an auto-generated partial class Base class. Can be defined by user. The required ancestor base class is System.Web.UI.Page Dynamic Compile Auto- generated page class MyClass Auto- generated partial Default Partial class defined in codefile DefaultSystem.Web.UI.Page

Issue Tracker – After running the conversion wizard

Visual Studio Conversion New dynamic compilation model implications: –Monolithic code-behind assembly is no longer used Instead, pages are compiled on-demand into separate assemblies –Code-behind code that references classes defined within other code-behind files will fail Move these classes out of code-behind files into standalone.cs and.vb files (can use App_Code directory or separate assembly) –Best practice to prepare for this with ASP.NET 1.1: Move classes, enumerations and interfaces that are not related to a page into standalone.vb or.cs files now In addition to making migration easier it is a better coding practice

Cross file class references

Visual Studio Conversion New dynamic compilation model implications: –Type casting dynamically loaded user controls requires an explicit reference to the.ascx files In 1.1, since all code lived in the same assembly, user control type names were always available for type casting –In 2.0, add page directive MyControl ctl = (MyControl) Page.LoadControl(“ctl.ascx”); Note: This is not needed if you don’t explicitly cast control

Visual Studio Conversion New dynamic compilation model implications: –Code that calls Type.GetType(“SomeType”) will fail if referencing classes in other code-behind files or in files deployed in App_Code –Instead, use: System.Web.Compilation.BuildManager.GetType The ASP.NET BuildManager has extra logic to “look” at all ASP.NET related assemblies VS 2005 project migration wizard will update code that does this

Type Resolution

Visual Studio Conversion Developers can pre-compile an ASP.NET site with: –aspnet_compiler.exe command line tool –“Publish Website” menu option within VS 2005 Two choices when pre-compiling: –All code compiled and.aspx markup removed –All code compiled, but.aspx preserved for later html edits (note: this is new in Beta2 and now the default)

Application Pre-compilation

Session Summary ASP.NET V1.1 and V2.0 run side-by-side on same server –No need to migrate all apps in order to start using V2.0 Backwards compatibility a priority with new APIs and features –Please tell us in Beta2 when you find things that break VS 2005 auto upgrades existing web projects to use new project model –Provides significantly better flexibility for web projects –Need to be aware of a few implications of dynamic compilation model Things to-do today to prepare for ASP.NET V2.0: –Start making HTML markup XHTML compliant –Separate non-codebehind classes/enums into separate class files –Avoid class naming conflicts with new V2.0 features now where possible

© 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.