16
Migrating ASP.NET Applications Four ways to convert them to SharePoint Paul Papanek Stork, SharePoint Server MVP, MCT, MCSE+I, MCSA, MCSD, MCDBA, MCITP, MCPD [email protected]

Migrating Asp Net Apps T03 Paul Stork

  • Upload
    pstork

  • View
    823

  • Download
    0

Embed Size (px)

DESCRIPTION

Enabling Anonymous Access in SharePoint isn’t just a matter of flipping a switch in IIS manager. Anonymous Access must be enabled in IIS and then configured in SharePoint. But there are also situations where this basic configuration isn't sufficient. In this talk we’ll review how to enable and configure anonymous access for SharePoint web sites, lists, and libraries. Then we'll turn our attention to strategies that can be used overcome specific problems with SharePoint anonymous access. We'll demonstrate solutions and workarounds for questions like: 1) How do you require authentication for some items while maintaining anonymous access for the rest? 2) What content from a personal MySite can be accessed via anonymous access? 3) How do you enable anonymous responses to a discussion list? 4) Can BLOGS and Wiki sites be used in an anonymous access site collection?

Citation preview

Page 1: Migrating Asp Net Apps T03 Paul Stork

Migrating ASP.NET Applications

Four ways to convert them to SharePoint

Paul Papanek Stork, SharePoint Server MVP, MCT, MCSE+I, MCSA, MCSD, MCDBA, MCITP, [email protected]

Page 2: Migrating Asp Net Apps T03 Paul Stork

About the Speaker…

• Paul Papanek Stork, MVP, MCT, MCSE+I, MCSA, MCSD, MCDBA, MCITP, MCPD– Senior Instructor/Consultant at Mindsharp– http://www.mindsharp.com– [email protected]– Contributing Author, Developer’s Guide to Windows

SharePoint Services 3.0 & Microsoft Office SharePoint Server 2007 Best Practices

– Author, upcoming October 2009MCTS: Windows SharePoint Services 3.0 Configuration Study Guide (70-631) by Wiley

Page 3: Migrating Asp Net Apps T03 Paul Stork

Agenda

• The Challenge of Legacy Applications

• Four Conversion Methodologies– Page Viewer Web Part

– Run in Virtual Application Directory

– Uploaded Pages with Separate Class Library

– Refactor as Connected Web Parts

Page 4: Migrating Asp Net Apps T03 Paul Stork

The Legacy Application Problem

• Legacy ASP.NET Applications– Based on .aspx pages– Integrated Development environment– Code beside sheets or inline code– Code re-use and integration a challenge

• SharePoint Applications– Based on Web parts– No direct development environment– Separate class libraries– Web part re-use and integration through

connections

Page 5: Migrating Asp Net Apps T03 Paul Stork

Page Viewer Web Part

• Uses an iFrame embedded inside a Web Part• Advantages– Simplest Conversion

• Disadvantages– Authentication may be a challenge– Not High Performance – Requires maintaining existing servers– Difficulties with sizing and framing

Page 6: Migrating Asp Net Apps T03 Paul Stork

DemoPage Viewer Web Part

Page 7: Migrating Asp Net Apps T03 Paul Stork

Virtual Application Directory

• Create Virtual Directory in Web Application• Advantages– Can be mapped to multiple zones– Requires few changes– Can use SharePoint branding & navigation

• Disadvantages– May require some code changes to run

Page 8: Migrating Asp Net Apps T03 Paul Stork

Creating a Virtual Directory

1. Create a Virtual Directory in IIS manager2. Remove Application setting3. Copy pages and code behind files4. Make any necessary code changes– Transfer required web.config settings– Edit MasterPageFile attribute– Modify relative Url addresses

Page 9: Migrating Asp Net Apps T03 Paul Stork

DemoVirtual Application Directory

Page 10: Migrating Asp Net Apps T03 Paul Stork

Uploaded Pages with Class Library

• Upload ASPX pages to SharePoint Library• Re-compile Code in Class Library• Advantages– Supports SharePoint Branding

• Disadvantages– Code must be modified and recompiled– No support for Inline Code– Some code changes required

Page 11: Migrating Asp Net Apps T03 Paul Stork

Creating an Uploaded Page

1. Add code behind file to a Class Library project– Add Namespace to class– Add protected declarations for controls declared on

page– SharePoint specific code changes

2. Edit and upload ASPX pages to document library– Same as changes for virtual directory– Remove AutoEventWireup and Codefile attributes– Change Inheritance to point at Class Library

3. Mark class as Safe in web.config

Page 12: Migrating Asp Net Apps T03 Paul Stork

DemoUploaded Pages with a Class Library

Page 13: Migrating Asp Net Apps T03 Paul Stork

Refactor as Web Parts

• Re-factor web page as a set of Web Parts• Advantages– Web Parts allow for re-use– Can be configured by users– Can leverage SharePoint infrastructure

• Disadvantages– Requires the most effort

Page 14: Migrating Asp Net Apps T03 Paul Stork

Refactoring as Web Parts

1. Logically break code into UI components– Territory picker dropdown– Territory grid display

2. Define Interface for data passed between Web parts

3. Create Web Parts for each UI component– Reuse code when possible– Look for SharePoint specific alternatives

4. Add Web Parts to a page5. Configure connections between Web parts.

Page 15: Migrating Asp Net Apps T03 Paul Stork

DemoConnected Web Parts

Page 16: Migrating Asp Net Apps T03 Paul Stork

Questions?THANK YOU FOR ATTENDING!

Please be sure to fill out your session evaluation!