Sofia, Bulgaria | 9-10 October Developing Custom ASP.NET Providers For Membership And Role Manager Goksin Bakir Yage Ltd Microsoft Regional Director, MEA.

Slides:



Advertisements
Similar presentations
Malek Kemmou Technology Architect, Application Platform Microsoft Middle East and Africa Overview of ASP.NET 2.0.
Advertisements

Microsoft Dynamics® AX 2012
Sofia, Bulgaria | 9-10 October Developing An Advanced ASP.NET Server Control With Rich Design-Time Goksin Bakir Yage Ltd Microsoft Regional Director, MEA.
Designing, Deploying and Managing Workflow in SharePoint Sites Steve Heaney Product Development Manager OBS
Forms Authentication, Users, Roles, Membership Ventsislav Popov Crossroad Ltd.
October Dyalog File Server Version 2.0 Morten Kromberg CTO, Dyalog LTD Dyalog’13.
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.
Chapter 12: ADO.NET and ASP.NET Programming with Microsoft Visual Basic.NET, Second Edition.
INTERNET DATABASE. Internet and E-commerce Internet – a worldwide collection of interconnected computer network Internet – a worldwide collection of interconnected.
Microsoft ASP.NET AJAX - AJAX as it has to be Presented by : Rana Vijayasimha Nalla CSCE Grad Student.
Performed by:Gidi Getter Svetlana Klinovsky Supervised by:Viktor Kulikov 08/03/2009.
Membership, Role Manager and Profile Membership, Role Manager and Profile Matt Gibbs ASP.NET Development Manager.
ASP.NET Programming with C# and SQL Server First Edition
Jonas Thomsen, Ph.d. student Computer Science University of Aarhus Best Practices and Techniques for Building Secure Microsoft.
IIS 7: The Next Generation Web Application Server Platform Michael Volodarsky Program Manager Web Platform and Tools Team Microsoft Corporation.
Enterprise Reporting with Reporting Services SQL Server 2005 Donald Farmer Group Program Manager Microsoft Corporation.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
WSS 3.0 Architecture and Enhancements Ashvini Shahane Member – Synergetics Research Lab.
May 30 th – 31 st, 2006 Sheraton Ottawa. Microsoft Certificate Lifecycle Manager Saleem Kanji Technology Solutions Professional - Windows Server Microsoft.
Delivering Excellence in Software Engineering ® EPAM Systems. All rights reserved. ASP.NET Authentication.
Edwin Sarmiento Microsoft MVP – Windows Server System Senior Systems Engineer/Database Administrator Fujitsu Asia Pte Ltd
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
Creating Business Workflow Using SharePoint Designer 2007 Presented by Tarek Ghazali IT Technical Specialist Microsoft SQL Server MVP Microsoft SQL Server.
Membership in ASP.Net...if only Presented by: Patrick Hynds President, CriticalSites Microsoft Regional Director.
Chapter 9 Using the SqlDataSource Control. References aspx.
4-1 INTERNET DATABASE CONNECTOR Colorado Technical University IT420 Tim Peterson.
Forms Authentication, Users, Roles, Membership Svetlin Nakov Telerik Corporation
Oracle Application Express 3.0 Joel R. Kallman Software Development Manager.
CIS 375—Web App Dev II Microsoft’s.NET. 2 Introduction to.NET Steve Ballmer (January 2000): Steve Ballmer "Delivering an Internet-based platform of Next.
® How to Build IBM Lotus Notes Components for Composite Applications 정유신 과장 2007 하반기 로터스 알토란.
Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy
Module 5 Configuring Authentication. Module Overview Lesson 1: Understanding Classic SharePoint Authentication Providers Lesson 2: Understanding Federated.
Vinay Dhareshwar.  Introduction  Membership Service  Login Controls  Role Management Service 2.
James Akrigg Microsoft Ltd Integrating InfoPath Forms Into Workflow Solutions And Business Processes.
Slide 1 ASP Authentication There are basically three authentication modes Windows Passport Forms There are others through WCF You choose an authentication.
Office Business Applications Workshop Defining Business Process and Workflows.
ASP.NET 2.0: A Look Inside Membership, Role Management, and Profiles in ASP.NET 2.0 Sam Spencer Program Manager Microsoft – Web Platform & Tools DEV312.
Role Management in.NET Shree Shalini Pusapati CS /17/20151.
SAURABH PANT PROGRAM MANAGER MICROSOFT CORPORATION Client Application Services in Orcas Authentication, Roles & Web Settings.
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Web Part Development Overview VITALE, CATURANO & COMPANY LTD SharePoint Developer Series – Web Part.
Sofia, Bulgaria | 9-10 October ASP.NET: Developing Portal UI With Web Parts Goksin Bakir Yage Ltd Microsoft Regional Director, MEA Goksin Bakir Yage Ltd.
MEMBERSHIP AND IDENTITY Active server pages (ASP.NET) 1 Chapter-4.
Intro to Datazen.
Connect with life Vedant Kulshreshtha Technology Solutions Professional – SharePoint | Microsoft India
MBL 305 ASP.NET Mobile Controls: Best Practices Gökşin Bakir CSA Yage Ltd. Microsoft Regional Director.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Hosting Websites and Web Applications with Microsoft ® SQL Server ® 2008.
Users are moving towards web applications Content on the web is more personal & meaningful Development on the web is easier than the OS.
Microsoft Visual Studio 2005 Tools for the Office System: Building Office Solutions Using Visual Studio 2005 Tools for Office Andrew Coates Developer Evangelist.
A Lap Around New Enhancements for Web Developers in Visual Studio 2005 Alexander Holy Developer Evangelist, Microsoft EMEA
Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트.
Module 6: Administering Reporting Services. Overview Server Administration Performance and Reliability Monitoring Database Administration Security Administration.
Security. Agenda ASP.NET security basics AuthenticationAuthorization Security principals Forms authentication Membership service Login controls Role Management.
Module 5: Managing Content. Overview Publishing Content Executing Reports Creating Cached Instances Creating Snapshots and Report History Creating Subscriptions.
Workflow in Microsoft Office SharePoint Server Jessica Gruber Consultant Microsoft Corporation.
ASP.NET 2.0 Security Alex Mackman CM Group Ltd
ASP.net Course From Intermediate to Advance level By Arsalan Ahmed 3 Months Course Cell :
Developing Custom ASP.NET Providers For Membership And Role Manager Stefan Schackow PRS404 Program Manager – Web Platform and Tools Microsoft Corporation.
Vinod Unny Enterprise InfoTech Microsoft Regional Director, North India
Integrating Enterprise Applications Into SharePoint® Portal Server
z/Ware 2.0 Technical Overview
DotNetNuke® Web Application Framework
10 – 12 APRIL 2005 Riyadh, Saudi Arabia
Beyond the BDC\BCS Model
Enterprise Library Overview
ASP.NET Module Subtitle.
Office 365 Development.
Role Management in .net Vinay Dhareshwar.
Windows Forms in Visual Studio 2005: An in-depth look at key features
Presentation transcript:

Sofia, Bulgaria | 9-10 October Developing Custom ASP.NET Providers For Membership And Role Manager Goksin Bakir Yage Ltd Microsoft Regional Director, MEA Goksin Bakir Yage Ltd Microsoft Regional Director, MEA

Sofia, Bulgaria | 9-10 October Agenda ●Provider Model ●Extensibility scenarios ●Projecting Membership via web services ●Role caching with SQL Server 2005 ●Virtualizing applications ●Integrating Membership with custom data ●Provider Model ●Extensibility scenarios ●Projecting Membership via web services ●Role caching with SQL Server 2005 ●Virtualizing applications ●Integrating Membership with custom data

Sofia, Bulgaria | 9-10 October ●Membership service ●Membership API ●Membership providers ●Role Management service ●Roles class ●Role caching ●Role providers ●Membership service ●Membership API ●Membership providers ●Role Management service ●Roles class ●Role caching ●Role providers

Sofia, Bulgaria | 9-10 October Membership Service ●Service for managing users and credentials ●Declarative access via Web Site Admin Tool ●Programmatic access via Membership and MembershipUser classes ●Membership class provides base services ●MembershipUser class represents users and provides additional services ●Provider-based for flexible data storage ●Service for managing users and credentials ●Declarative access via Web Site Admin Tool ●Programmatic access via Membership and MembershipUser classes ●Membership class provides base services ●MembershipUser class represents users and provides additional services ●Provider-based for flexible data storage

Sofia, Bulgaria | 9-10 October Membership Schema Membership API Membership Data Access Other Data Stores Controls Login LoginStatus LoginView AccessMembershipProvider Other Membership Providers Other Membership Providers Membership Providers Membership MembershipUser SqlMembershipProvider SQL Server Other Login Controls Other Login Controls

Sofia, Bulgaria | 9-10 October The Membership Class ●Provides static methods for performing key membership tasks ●Creating and deleting users ●Retrieving information about users ●Generating random passwords ●Validating logins ●Also includes read-only static properties for acquiring data about provider settings ●Provides static methods for performing key membership tasks ●Creating and deleting users ●Retrieving information about users ●Generating random passwords ●Validating logins ●Also includes read-only static properties for acquiring data about provider settings

Sofia, Bulgaria | 9-10 October The MembershipUser Class ●Represents individual users registered in the membership data store ●Includes numerous properties for getting and setting user info ●Includes methods for retrieving, changing, and resetting passwords ●Returned by Membership methods such as GetUser and CreateUser ●Represents individual users registered in the membership data store ●Includes numerous properties for getting and setting user info ●Includes methods for retrieving, changing, and resetting passwords ●Returned by Membership methods such as GetUser and CreateUser

Sofia, Bulgaria | 9-10 October Provider Configuration ●Membership providers support a number of configuration settings ●How should passwords be stored (cleartext, hashed, encrypted)? ●Should password recovery be enabled? ●Must each user have a unique address? ●Exposed as properties of provider class ●Initialized from CONFIG files ●Membership providers support a number of configuration settings ●How should passwords be stored (cleartext, hashed, encrypted)? ●Should password recovery be enabled? ●Must each user have a unique address? ●Exposed as properties of provider class ●Initialized from CONFIG files

Sofia, Bulgaria | 9-10 October

Role Management Service ●Role-based security in a box ●Declarative access via Web Site Admin Tool ●Programmatic access via Roles class ●Roles class contains static methods for creating roles, adding users to roles, etc. ●Maps users to roles on each request ●Replaces Application_AuthenticateRequest ●Provider-based for flexible data storage ●Role-based security in a box ●Declarative access via Web Site Admin Tool ●Programmatic access via Roles class ●Roles class contains static methods for creating roles, adding users to roles, etc. ●Maps users to roles on each request ●Replaces Application_AuthenticateRequest ●Provider-based for flexible data storage

Sofia, Bulgaria | 9-10 October Role Management Schema Roles API Roles Data Access Other Data Stores Controls Login LoginStatus LoginView AccessRoleProvider Other Role Providers Role Providers Roles SqlRoleProvider SQL Server Other Login Controls Other Login Controls

Sofia, Bulgaria | 9-10 October The Roles Class ●Gateway to the Role Management API ●Provides static methods for performing key role management tasks ●Creating and deleting roles ●Adding users to roles ●Removing users from roles and more ●Also includes read-only static properties for acquiring data about provider settings ●Gateway to the Role Management API ●Provides static methods for performing key role management tasks ●Creating and deleting roles ●Adding users to roles ●Removing users from roles and more ●Also includes read-only static properties for acquiring data about provider settings

Sofia, Bulgaria | 9-10 October Role Caching ●Role manager caches roles data in cookies ●Fewer accesses to data store ●Better performance ●Controlled via attributes and programmatically exposed thru Roles class ●Should roles be cached in cookies? ●Should role cookies be encrypted? ●How long are role cookies valid? ●Role manager caches roles data in cookies ●Fewer accesses to data store ●Better performance ●Controlled via attributes and programmatically exposed thru Roles class ●Should roles be cached in cookies? ●Should role cookies be encrypted? ●How long are role cookies valid?

Sofia, Bulgaria | 9-10 October Role Management Providers ●Role management is provider-based ●AccessRoleProvider (Access) * Removed ●AuthorizationStoreRoleProvider (AuthMan) ●SqlRoleProvider (SQL Server) ●WindowsTokenRoleProvider (Windows) ●Use custom providers for other data stores ●Role management is provider-based ●AccessRoleProvider (Access) * Removed ●AuthorizationStoreRoleProvider (AuthMan) ●SqlRoleProvider (SQL Server) ●WindowsTokenRoleProvider (Windows) ●Use custom providers for other data stores

Sofia, Bulgaria | 9-10 October 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 ●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

Sofia, Bulgaria | 9-10 October Provider Model Feature Lifecycle Feature config. Static feature class Provider instances

Sofia, Bulgaria | 9-10 October 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

Sofia, Bulgaria | 9-10 October 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();

Sofia, Bulgaria | 9-10 October

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 ●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

Sofia, Bulgaria | 9-10 October 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 ●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

Sofia, Bulgaria | 9-10 October Projecting Membership 3-Tier Flow Web server Webservice provider Webservice server.asmx Membership wrapper SQL provider Application code

Sofia, Bulgaria | 9-10 October 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

Sofia, Bulgaria | 9-10 October

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 ●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

Sofia, Bulgaria | 9-10 October 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 ●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

Sofia, Bulgaria | 9-10 October 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 ●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

Sofia, Bulgaria | 9-10 October

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 ●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

Sofia, Bulgaria | 9-10 October 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 ●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

Sofia, Bulgaria | 9-10 October Setting Application Context Dynamically

Sofia, Bulgaria | 9-10 October 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? ●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?

Sofia, Bulgaria | 9-10 October 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 ●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

Sofia, Bulgaria | 9-10 October Integrating Membership w/ Custom Data

Sofia, Bulgaria | 9-10 October 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 ●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

Sofia, Bulgaria | 9-10 October Community Resources ●INETA MEA ! ● ●mea.ineta.org ●INETA MEA ! ● ●mea.ineta.org

Sofia, Bulgaria | 9-10 October 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 ●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

Sofia, Bulgaria | 9-10 October Community Resources ●INETA MEA ! ● ●mea.ineta.org ●Speaker as a resource ●INETA MEA ! ● ●mea.ineta.org ●Speaker as a resource

Sofia, Bulgaria | 9-10 October 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… ●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…

Sofia, Bulgaria | 9-10 October 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 ●Provider Class Definition ●What is the pluggable aspect for the feature? ●Configuration ●Feature configuration ●Provider-specific configuration ●Common entry point class ●Triggers feature initialization

Sofia, Bulgaria | 9-10 October 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 ●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

Sofia, Bulgaria | 9-10 October Please fill out the survey forms! They are the key to amazing prizes that you can get at the end of each day Thank you!

Sofia, Bulgaria | 9-10 October