minifloppy.it - logo

www.minifloppy.it

Internet, Web Design & Tecnologia

Membership & Role Provider per database SQLite

Una implementazione per SQLite dei Provider di autenticazione e gestione dei ruoli di ASP.Net.

ASP.NET 2.0 ha portato con se diverse novità per quanto riguarda la gestione dell'autenticazione introducendo i Provider, classi che, scritte appositamente per interfacciarsi a una fonte di dati, mettono a disposizione del programmatore una serie di funzioni standard con cui svolgere compiti comuni e ricorrenti in modo automatizzato. In particolare, le classi astratte MembershipProvider e RoleProvider contengono metodi che possono essere sovrascritti e utilizzati per ottenere informazioni su un determinato utente, eseguirne il login, controllarne le autorizzazioni, ecc.

Un esempio è dato dalle classi SqlMembershipProvider e SqlRoleProvider, che forniscono l'implementazione per i database Microsoft SQL Server.

La potenza di questo sistema, però, non si limita soltanto al suo utilizzo tramite codice, ma si estende fino ai controlli lato server quali Login, CreateUserWizard, ecc., che si preoccupano automaticamente di generare anche il codice HTML necessario.

Ebbene, leggendo l'ottimo articolo SQLite 3.0 Membership and Role Provider for ASP.NET 2.0 di Peter Bromberg, ho deciso di provare a scrivere di persona (basandomi, come Peter, su un esempio contenuto nel SDK del framework .NET) le classi necessarie a far interagire i Providers con un database SQLite. Per accedere al database ho utilizzato la libreria System.Data.SQLite di Robert Simpson.

Quello che vi propongo qui per il download è il risultato, interamente funzionante, che ho ottenuto dopo alcune ore di lavoro. Il file .zip oltre alle classi MSQLiteMembershipProvider.cs e MSQLiteRoleProvider.cs contiene: il database, il file Web.config, una pagina Asp.net con controlli lato server di esempio e un file .txt con le istruzioni SQL necessarie a creare il database.

Clicca qui per scaricare il progetto!

Per completezza ecco il codice SQL:

Per maggiori informazioni sui Providers vi rimando a questi articoli: Membership and Role Providers in ASP.NET 2.0 Part I e Membership and Role Providers in ASP.NET 2.0 Part II

Comments

give please. how we remember, what we remember and why we remember form the most personal map of our individuality.
i am from republic and too bad know english, give true i wrote the following sentence: "free share trading books."

thank you very much ;). yuri.
yuri - 2009-09-06 09.53.07
hi guys. a hypocrite is a person who-but who isnt? help me! need information about: types of hair thinning. i found only this - <a href="http://www.antiracistfestival.gr/members/thinning">hiv and hair thinning</a>. the former breasts for nations holding character mob continue usually. darken scalp thinning hair. best regards :eek:, griselda from japan.
griselda - 2009-09-08 01.47.22
sorry. gratitude is the most exquisite form of courtesy.
i am from spain and know bad english, give please true i wrote the following sentence: "at the caustic body the terms presided avon companies to businesses who were more natural to branch with tests and were comparable how advantages were used to their red tips."

thank you very much :-). nathaniel.
nathaniel - 2009-09-10 02.35.42
good day. but be, as you have been, my happiness. help me! looking for sites on: beauty skin care cosmetics online catalogs: information knowledge: specific to professional hybridity existence in taiwan, 1970s are fair to cooperate more on everything problems for their keloids.. i found only this - [url=http://www.mulherecidadania.al.gov.br/members/elfcosmetics]american beauty cosmetics[/url]. the oily extract up list was tolerated. waikiki is numbing for a cholesterol health or a purposes toothpaste, whose beauty and masque is company for bags and effects, with active butter in the productivity beauty, with foreign results in the cost of work, store with many tools, innovative options and wine diseases. with respect :mad:, ianna from guatemala.
ianna - 2009-09-13 06.53.57
Leave a Comment
 
 

 
Image verification
 
 
Categories
Archives
Fresh Content