Developing Custom ASP.NET Providers For Membership And Role Manager Stefan Schackow PRS404 Program Manager – Web Platform and Tools Microsoft Corporation.

Slides:



Advertisements
Similar presentations
.NET 3.5 SP1 New features Enhancements Visual Studio 2008 SP1 New features Enhancements Additional features/enhancements.
Advertisements

Forms Authentication, Users, Roles, Membership Ventsislav Popov Crossroad Ltd.
Microsoft Dynamics AX 2009 Integration and Development with.NET Framework Enterprise Portal.
DEV392: Extending SharePoint Products And Technologies Through Web Parts And ASP.NET Clint Covington, Program Manager Data And Developer Services - Office.
Building Enterprise Applications Using Visual Studio ®.NET Enterprise Architect.
IIS7: Building New Core Server Modules Michael Volodarsky COM406 Program Manager Microsoft Corporation.
Windows Forms in Visual Studio 2005: An in-depth look at key features Name: Mike Henderlight Title: Program Manager.
Microsoft ASP.NET AJAX - AJAX as it has to be Presented by : Rana Vijayasimha Nalla CSCE Grad Student.
SharePoint 2010: Building an enterprise public website Vinod Unny Enterprise InfoTech Microsoft Regional Director.
Membership, Role Manager and Profile Membership, Role Manager and Profile Matt Gibbs ASP.NET Development Manager.
SharePoint Collaboration Features & Workflow
Design & Development Tools: Visual Studio 2005 SQL Server 2005 Biztalk Server 2006 David Gristwood, Mike Taulty Developer & Platform Group Microsoft Ltd.
Enterprise Reporting with Reporting Services SQL Server 2005 Donald Farmer Group Program Manager Microsoft Corporation.
Enhanced Collaboration and other benefits of Sharepoint Technologies Kern Sutton Business Productivity Group Microsoft Corporation.
WSS 3.0 Architecture and Enhancements Ashvini Shahane Member – Synergetics Research Lab.
1 Developing Rules Driven Workflows in Windows Workflow Foundation Jurgen Willis COM318 Program Manager Microsoft Corporation.
May 30 th – 31 st, 2006 Sheraton Ottawa. Microsoft Certificate Lifecycle Manager Saleem Kanji Technology Solutions Professional - Windows Server Microsoft.
DEV317 Integrating Extensible Business Graphics into Enterprise Applications using Visio 2003 Mai-lan Tomsen Bukovec Program Manager.
Membership in ASP.Net...if only Presented by: Patrick Hynds President, CriticalSites Microsoft Regional Director.
What’s New in SSIS with SQL 2008 Bret Stateham Training Manager Vortex Learning Solutions blogs.netconnex.com.
Copyright © 2014, 2015 William R. Vaughn All rights reserved William R. Vaughn.
Forms Authentication, Users, Roles, Membership Svetlin Nakov Telerik Corporation
Christopher Chapman | MCT Content PM, Microsoft Learning, PDG Planning, Microsoft.
Getting Started with Windows Azure Name Title Microsoft Corporation.
WEB 304 An Overview of ASP.NET and Windows Workflow Foundation Kashif Alam Program Manager Developer Division Microsoft Corporation.
® How to Build IBM Lotus Notes Components for Composite Applications 정유신 과장 2007 하반기 로터스 알토란.
Slide 2 The Microsoft Office Project 2003 Software Development Kit Jim Corbin Programmer Writer Office Developer Documentation Microsoft Corporation Uma.
Sofia, Bulgaria | 9-10 October Developing Custom ASP.NET Providers For Membership And Role Manager Goksin Bakir Yage Ltd Microsoft Regional Director, MEA.
Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy
Windows SharePoint Services “v3”: Using ASP.NET 2.0 Technology To Extend Pages, Sites, And Server Farms Mike Ammerlaan OFF405 Program Manager Microsoft.
Tony Goodhew Product Planner DEV328.
Advanced Reporting Concepts Philip Yuen Program Manager Microsoft Office Project.
Advanced ETL: Embedding Integration Services Ashvini Sharma Development Lead DAT411 Microsoft Corporation Sergei Ivanov Technical Lead DAT411 Microsoft.
Office Business Applications Workshop Defining Business Process and Workflows.
Windows Forms in Visual Studio 2005 Mike Pelton Systems Engineer Microsoft Ltd
Microsoft Dynamics NAV 2009 and Architecture Overview Name Title Microsoft Corporation.
Name Microsoft Student Partner Overview of the Visual Studio 2005 Express Products.
WEB320 Migrating ASP.NET 1.x Applications to ASP.NET 2.0 Stefan Schackow Program Manager Web Platform and Tools Team Microsoft Corporation.
SAURABH PANT PROGRAM MANAGER MICROSOFT CORPORATION Client Application Services in Orcas Authentication, Roles & Web Settings.
DEV303 ASP.NET: Leveraging Visual Studio.NET For Web Projects Tony Goodhew Product Manager Microsoft Corp.
Connect with life Vedant Kulshreshtha Technology Solutions Professional – SharePoint | Microsoft India
Web Content Management with MOSS 2007 Patrick Tisseghem
Windows Forms in Visual Studio 2005: An in-depth look at key features Name: Joe Stegman Title: Lead Program Manager Session code.
EBIZ302 Jupiter Business Process Automation and Web Services David Fong Program Manager.
Microsoft Visual Studio 2005 Tools for the Office System: Building Office Solutions Using Visual Studio 2005 Tools for Office Andrew Coates Developer Evangelist.
DEV414 Black-belt ASP.NET Tips And Tricks For Your ASP.NET Applications Rob Howard Program Manager Web Platform and Tools Team.
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.
ASP.NET 2.0 Security Alex Mackman CM Group Ltd
ASP.NET 2.0 Mohammed Abdelhadi Developer.NET Evangelist Microsoft Corporation.
Building rich web applications with ASP.NET AJAX Mike Ormond Developer & Platform Evangelism Group, Microsoft Ltd Developer & Platform Evangelism Group,
Building Enterprise Applications Using Visual Studio®
Integrating Enterprise Applications Into SharePoint® Portal Server
Business Connectivity Services in SharePoint 2010 and Office 2010
Enterprise Library Overview
Tech Ed North America /1/ :36 AM Required Slide
TechEd /15/2019 8:08 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
DAT381 Team Development with SQL Server 2005
Visual Studio 2005 Tools For Office: Creating A Multi-tier Application
Jochen Seemann Program Manager Enterprise Tools Microsoft Corporation
Office 365 Development.
TechEd /22/2019 9:22 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Developing for Windows Azure
Service Template Creation from the Ground Up
Service Template Creation from the Ground Up
Microsoft Dynamics.
Windows Forms in Visual Studio 2005: An in-depth look at key features
Introduction to ASP.NET Parts 1 & 2
Mark Quirk Head of Technology Developer & Platform Group
9/8/ :03 PM © 2006 Microsoft Corporation. All rights reserved.
Presentation transcript:

Developing Custom ASP.NET Providers For Membership And Role Manager Stefan Schackow PRS404 Program Manager – Web Platform and Tools Microsoft Corporation

Agenda Provider Model Extensibility scenarios with code demos Projecting Membership via web services Role caching with SQL Server 2005 Virtualizing applications Integrating Membership with custom data

Provider Model Enable new functionality in a transparent fashion Enable extensibility for Web services Browser based “Atlas” clients Smart clients Application services as pluggable building blocks Decoupled via configuration Use structural classes for your own features

Provider Model Feature Lifecycle Feature config. Static feature class Provider instances

public class QuotationsConfiguration : ConfigurationSection { [ConfigurationProperty("providers")] [ConfigurationProperty("providers")] public ProviderSettingsCollection Providers public ProviderSettingsCollection Providers { get; get; } [ConfigurationProperty("defaultProvider", [ConfigurationProperty("defaultProvider", DefaultValue = "StaticQuotationProvider")] DefaultValue = "StaticQuotationProvider")] public string DefaultProvider public string DefaultProvider { get; get; set; set; }} Provider Model Feature Configuration

Provider Model Creating Provider Instances //Start with empty provider collection providerCollection = new QuotationsProviderCollection(); //Helper class converts configuration information into //concrete providers ProvidersHelper.InstantiateProviders( qc.Providers, //a ProviderSettingsCollection qc.Providers, //a ProviderSettingsCollection providerCollection, providerCollection, typeof(QuotationsProvider)); typeof(QuotationsProvider)); //Lock the provider collection providerCollection.SetReadOnly();

Writing A Provider-Based Feature

Projecting Membership Physical 3-tier deployments May not allow web server to connect directly to Sql tier “Atlas” and smart clients Clients can only communicate over Http Need app services to work across the Internet

Projecting Membership Design Issues Authenticating to the web service Not all methods should be public Serialization of MembershipUser Read-only properties don’t serialize WebMethod parameter constraints Collection types and [out] parameters Selecting from multiple providers Choosing a non-default provider

Projecting Membership 3-Tier Flow Web server Webservice provider Webservice server.asmx Membership wrapper SQL provider Application code

Projecting Membership Authenticated Flow Internet client Applicatio n Webservice server.asmx Membership wrapper SQL provider.asmx Formsuth wrapper “login” Returns forms ticket pass ticket w/ each request Validate ticket and roles

Projecting Membership With Web Services

Caching Role Data Role Manager can cache user roles: Cookie caching (not enabled by default) Per-request in RolePrincipal RolePrincipal caching Results in at least one call to GetRolesForUser Stored internally with HybridDictionary Cookie caching limited to 4K of data Option for persistent cookie

Caching Role Data Cache role data using SQL Server 2005 query notifications Data is cached until SQL notifies you Good for clients that cannot use cookies Can handle apps with hundreds of roles

Caching Role Data Query Notification Specifics Need to change “SET QUOTED IDENTIFIER” in ASP.NET SQL scripts to “ON” Then recompile stored procedures Custom provider must query ASP.NET tables directly Cannot create notifications against SQL views

Role Caching With SQL Server 2005

Virtualized Applications One physical ASP.NET application Multiple “virtual” applications Portal style applications DotNetNuke portal provisioning Self-registered forums and portals Sharepoint However providers are “Application-centric” Statically defined in configuration

Virtualized Applications Override ApplicationName property Determine virtual application context dynamically (e.g. IHttpModule) Retrieve it in the override Cautionary Notes! Prevent auth ticket re-use across apps Don’t accidentally map roles in one virtual app to a user in a different virtual app Turn off cookie caching for roles

Setting Application Context Dynamically

Integrating Custom Data Need to integrate existing data Don’t want to write a provider from scratch May need to link to your own data What can “safely” be referenced? How do you handle transactions? How do you pass extra data along?

Integrating Custom Data Custom Provider Design Issues Referential Integrity Foreign key to aspnet_Users table Use SQL views to lookup UserID Transactional Integrity Use the new ADO.NET 2.0 TransactionScope Custom Data Pass via HttpContext to CreateUser Extend MembershipUser for other cases

Integrating Membership w/ Custom Data

Summary Rewrite or enhance features Plug-in rich functionality independently from the presentation tier Project current features onto other platforms via web services Use the provider infrastructure for your own features

Community Resources “Atlas” application development PRS312: ASP.NET: Future Directions for Developing Rich Web Applications with Atlas (Part 1) (Wed 5pm) PRS420: ASP.NET: Future Directions for Developing Rich Web Applications with Atlas (Part 2) (Thursday 11:30AM) Ask The Experts Thursday night Drop by the PRS track lounge!

Community Resources Provider Links on the Web Access providers from Beta 1 Installs as a Visual Studio 2005 VSI template Includes full source for Membership, Role Manager, Profile and Web Parts Personalization providers Provider Toolkit Extensive 120 page whitepaper Sample providers for all provider based features Both will be available at

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

Provider Model Appendix Patterns Strategy Provider base classes Factory Method System.Web.Configuration.ProvidersHelper Singleton Pattern Only one provider instance is instantiated Façade Feature classes like Membership, Roles, etc…

Provider Model Appendix Provider Class Definition What is the pluggable aspect for the feature? Configuration Feature configuration Provider-specific configuration Common entry point class Triggers feature initialization