100 likes | 260 Views
ASP.NET 2.0 Member/Role Management with IIS. Peter Kellner, Software Engineer/Consultant http://peterkellner.net (download for class on Web Site). Overview. What is Member Management and Why do we need it? Using Member Management in the Real World, Demo. What Microsoft Provides
E N D
ASP.NET 2.0 Member/Role Management with IIS Peter Kellner, Software Engineer/Consultant http://peterkellner.net (download for class on Web Site)
Overview • What is Member Management and Why do we need it? • Using Member Management in the Real World, Demo. • What Microsoft Provides • Details about the Drop in Component for Managing Users and Roles
Main Points From HillFinder Demonstration (Real World App) • Registration • Login Authentication • Password changing/recovery • Login Status • Membership Approval • Security Based On Roles • Roles In Action (hiding controls)
The Member Management Page • What Gets Delivered with ASP.NET 2.0 out of the box? Web Configuration Lots of Nice Controls (Login, etc.) Provider API with several plugins (SqlExpress, SqlServer, others) What’s Missing??? IE Web Configuration!
Membership Tab Page From HillFinder Application • Review Membership Page • Create a Sample User Page • Create a Sample Detail User page Including ComboBox For Selection • (DataKeyNames=“ProviderUserKey”)
The DataObject • Show Overall Structure (Page 6) • Parameters In Select,Insert,Delete and Update • Review Insert,Delete and Update (Pages 7,8) • Review Get (Select) / Properties Page 9
ObjectDataSource Declarations • Wizard driven, but really need to understand what is doing. • Reflection • Readonly, Writeonly Properties • Primary Key’s (Membership API a little Schizophrenic when it comes to UserName and ProviderUserKey)
Sorting Have to’s, A Litte Tricky • To GridView, Must add to declaration: AllowSorting="True“ • To ObjectDataSource Declaration, Just Add SortParameterName="SortData“ (or whatever your Member Function Name is) • To GridView Column Attributes, Must add SortExpression="UserName“ • Dataobject must implement IComparable