TechEd Braindump: Migrating ASP.Net 1.1 to ASP.Net 2.0

Speaker: Stefan Schackow

·         Different virtual directories can run different versions of the ASP framework.

·         Forms authentication cookies can be used between 1.1 and 2.0.

o        2.0 uses AES encryption by default

o        To have this work change the machine Key in web.config. To do this explicitly set the validation key and machine key for 1.1. For 2.0 change the decryption attribute to “3DES”.

o        2.0:

·         New reserved directories:

o        /app_code – for code

o        /app_data – for data

o        /app_themes – for skins

o        /app_webreferences – for WSDL

o        /app_localresources – for local page resources

o        /app_globalresources – global resources

·         ASP.Net has full XHTML compliance

o        – Defaults to transitional. It can be set to Legacy or Strict. It’s recommended to update pages to be compliant in the long term. Because of the compliance pages might look “weird” in transitional mode.

·         Client-side script files are now encapsulated as resources.

o        Js files are new referenced

·         Webresource.axd?a=&r=webuivalidation.js

o        You cannot edit client-side scripts anymore. Use expanded client-side scripting instead.

·         Potential for Naming collisions. 2000+ new classes. Common names include roles, membership and theme

·         Visual Studio 2005

o        No more project file

o        Web projects are no longer compiled into a single dll.

o        Can update pages/code while using the debugger

o        No need to recompile when making changes

o        Web projects can be written in multiple languages.

·         VS 2003 to VS 2005

o        One way conversion

o        Always enable backup and check back into source code control when stable.

o        The conversion tool logs everything that it does.

o        No more code behind dlls. Code moves into the app_code directory

·         New code behind model. Designer generated sections are gone! Control definitions use partial classes.

o        Still enables definition of a custom base pages + control classes.

o        CodeBehind attrbute is replaced by the CodeFile attribute in 2.0

·         When sharing a dll to access the control in 1.1 you now have to share the ascx file. Hmmm. Dunno if I like that. I have to try this out.

·         Dynamic compilation model.

o        No more code behind assembly

o        Compile pages & controls on demand.

·         Precompilation – Compiles code into assemblies

o        Use aspnet_complier executable for precompilation. Options include aspx markup is removed or aspx markup is preserved. Now this I like.

Disclaimer: These are my notes from my experience at TechEd 2005. I do not guarantee the validity or accuracy of these notes. They are my thoughts and what information I felt was important at the time.