Вы находитесь на странице: 1из 17

Custom Authentication Providers

For DotNetNuke v5.0

Stan Schultes – Sarasota, FL


Florida Community Leader
http://www.vbnetexpert.com
stan@vbnetexpert.com
Audience Experience

Who is using DNN 5 in production


today?
Who has done DNN module
development?
Who has done DNN authentication
provider development?
Agenda
Why Custom Authentication Provider
Development?
Provider Installation & Management
Visual Studio Environment Setup,
Design Mode
Provider Development Overview
Custom Provider Project Overviews
Create User Controls
Package Modules for Deployment
Developing & Debugging Level 300
Tips & Tricks, More Info
Why Custom Provider Development?
Adding functionality to DNN:
Install Custom Modules
Build Custom Modules
Change Providers
Modify the DNN Core
Custom Modules are pluggable extensions to
core DNN functionality
Easily modify existing modules as a starting
point
Key concept:
Reuse core code without changing it
DNN is an application development platform
Demo
Custom Provider Installation: DNNXML
Provider
Host  Extensions
Same process used for module upgrade
as install
Authentication Provider Management
Host  Extensions

Admin  Extensions
Visual Studio Environment Setup
DNN v5 developer prerequisites:
Win7/Vista, Server 2008/2003, (Windows
XP)
Visual Studio 2010/2008, .NET FW v2.0-4.0
SQL Server 2008/2005 (Express or Dev)
IIS, SMTP
Install DNN Starter Kit (for project
templates)
Configure DNN (use Install Package)
and test
Consider portal tags: objectQualifier,
databaseOwner
DNN v5 in Design Mode
Install module source package
Edit project file for URL
Open solution and check references
Run in Design mode:
Set project to Debug mode
Site web.config: <compilation
debug=true>
Tools  Attach to Process
W3WP.exe – Win7/Server 2008
ASPNET_WP.exe – WinXP/Server 2003
Demo
Visual Studio 2010 in Design Mode
Custom Provider: DNNXMLProvider
Provider Development Overview
Custom Providers consist of:
Provider container (provided by DNN)
Dynamically loaded user controls (.ascx)
(Data layer components)
Development process:
Project setup
(Build the data & business logic layers)
Create the user controls
Package for installation
Deployment
Develop providers in any .NET language
Create User Controls (UCs)
Login UCs inherit from
AuthenticationLoginBase

Settings UCs inherit from


AuthenticationSettingsBase

Reusable DNN core controls


Url, Url Tracking, Address, Dual List, Label, User,
etc.
The process is very similar to module
Package Modules for Deployment
Traditional deployment unit is a Zipfile
including:
.dnn manifest file – name & location of all
contained files with directory structure
Required .ascx’s and .dll’s
Resource files such as images
Source code
New Package Installer – extensions
Module, container, skin, provider, language,
etc.
Compatible with old deployment Zipfile
Host  Extensions: edit a module
Demo

Look at custom provider:


DNNXMLProvider
Deployment package
Developing and Debugging
Debugging your module: attach to
process
w3wp.exe in Win7/Servers, aspnet_wp.exe
in XP
set a breakpoint in Page_Load
Common troubleshooting
Exception log: Admin  Event Viewer
Read the error messages carefully
Code flow through the portal core
HTTPHandlers – Global.asax – Default.aspx
– LoadSkin – InjectModule – module
Page_Load
Tips & Tricks
Be familiar with the standard providers
Look for examples of calling core functions
Start here rather than working from scratch
Code generation tools can save a lot of
time
ObjectBrowser is your friend!
Goal: modify DNN core only for critical
bug fixes
Switch providers to change core functions
Useful documents: Module Dev Guide,
Data Access, Localization, Membership,
More Information
DotNetNuke home:
http://www.dotnetnuke.com
DNN forums
Resources directory
Gemini bug tracking
DNN Documents
Resource sites:
http://www.adefwebserver.com/DotNetNukeHELP/
http://www.dnncreative.com
http://www.dnn.com.au
Search – there’s a lot of information out there
Contact

Website: www.VBNetExpert.com
Sample Provider/Slide deck is available
(DotNetNuke  DNN Downloads)
Email: stan@vbnetexpert.com
Blog: StanSchultes.spaces.live.com

Вам также может понравиться