Using asp.net membership with sqlite or other provider? - asp.net

Does anyone have any examples of using Sqlite with ASP.NET membership? I am building a small "drop-in" type web application and don't want to rely on an SQL database for storing user credentials, etc. Sqlite seems like a good option, and I have been impressed with its performance in Elmah; I wouldn't mind using xml as a data store either.
On another note, perhaps asp.net membership isn't a good choice for basic form level security? The app will not require more then a couple users for those who implement it, and at this time I don't see a need for roles. My thought of using asp.net membership is simplicity to setup and get running; why build a security class if I don't need to, right?
Any other suggestion are surely welcome; thank you for your time.

It looks like Roger Martin's project - http://www.codeproject.com/KB/aspnet/SQLite-Providers.aspx - is now the recommendation for SQLite connectivity.
This is suggested by Peter Bromberg (http://twitter.com/peterbromberg/status/5031854389) and the next top resource on Google is the above by Roger Martin, who suggests that as the place to get the provider (http://galleryserverpro.blogspot.com/2009/08/new-release-adds-support-for-flash.html#comments).
Seeing as how it's part of a semi-commercial product (and the author is trying to get back to work on it as a full-time job), it seems this will be kept up to date.
EDIT 1: More information about the ordering of released providers for SQLite: http://sqlite.phxsoftware.com/forums/p/75/397.aspx

I am a big fan of SQLlite as well. I would say asp.net membership is good enough for the basic stuff.
Peter at Eggheadcafe has this right article about sqllite, check it out.
Article

For using the membership provider with other databases look at a custom membership provider

There's a new, updated source for Roger Martin's SQLiteMembershipProvider
nuget package: https://www.nuget.org/packages/SQLiteMembershipProvider
sourcecode: https://bitbucket.org/jkuemerle/sqlitemembershipprovider

Related

ASP.NET Identity customization and ADO.NET

I have existing User tables in my project, and existing code that I want to maintain for persisting users to my database. This is a new ASP.NET site, but it just needs to play nice with existing tables and objects.
In most of my previous developing efforts, I would simply use FormsAuthentication to handle the HTTP Authentication, use its static methods to set the cookies and redirect the browser, and customer prepare the roles on the Principle. While this has worked well for me in the past, I am worried that FormsAuthentication is headed for the same fate as Dodos, Newspapers, and Record Stores, and I am also trying to challenge myself to not avoid new technologies simply because they are new (-er.)
Also, my project is utilizing ADO.NET and not the Entity Framework, and I am hoping to not have to use EF just for the users.
Can anyone point to a tutorial or walkthrough that would help in my getting up to speed on the Identity process and customizing it to fit my needs?
Thanks
I am hoping to not have to use EF just for the users.
Identity uses Entity Framework Code First. You cannot get away with EF if you want to use Identity's auto-generated tables.
Adam Freeman (author of Pro ASP.NET MVC 4 & 5) offers free 3 Chapters just for Identity.
Please take a look at a project I have created for this topic on github https://github.com/giorgos07/AspNet.Identity.AdoNetProvider Hope you like it.

ASP.NET/VB...users log on and see the own data only?

I'm attempting to make a system that stores employees details...name address etc.
I would like the users to be able to log on, see and change their own details only.
Is this possible is asp.net and if so how?
I'm really new at this so if you could keep answers as simple as possible.
Thanks
Here's a good starting point for your research...
Check out ASP.NET Membership. This is a good, out of the box, solution for storing basic "member" information (login/password/name/etc.). It will give you a good starting point for handling user authentication and building out ways for users to manager their info.
I usually use the SQL Membership Provider. Have a look at this link for good instructions on how to get it up and running.
You could look at the asp.net membership system, a walk-through can be found here - http://msdn.microsoft.com/en-us/library/879kf95c.aspx

Lightweight asp.net membership provider alternative

Looking for a light weight alternative to the membership provider. Does such a thing exist?
It should allow for the creation and modification of accounts, nothing to fancy. A password reset would also be nice. Would be great if it didn't require a database but used some object database (couchdb, db40 etc). Basically as I wrote, a simple and light weight version of the membership provider.
I highly recommend Artem XML Providers.
A full provider stack with XML backing store.
Perfect for small sites with few users as well as for demo apps.
I just published a Membership and Roles providers that use CouchDB as the backed. You may download it from: http://couchdbnet.codeplex.com/

Microsoft Membership Provider Vs Custom Provider Vs Complete Custom Login System

I am currently converting a very old, but working classic ASP site to ASP.Net.
It has a completely custom written user management system. Whilst it works fine, it really needs a refresh as I want it to be more flexible for some future projects in the works.
When I asked someone about this, they said "You need to use the Microsoft Provider" and gave a lecture on how Microsoft release all these things for free and how good they are and should be re used as much as possible.
I have done quite a bit of research on it (mainly looking at the videos on http://asp.net/learn ) and am very impressed by some of the features as there appears to be drag and drop components for items that would take me ages to write.
However, the current membership database is complicated to explain, it is a completely custom written database that has many internal relations... It is not really "compatible" with the default Microsoft Provider.
I have taken a look at How Do I: Create a Custom Membership Provider?, but I feel a little out of my comfort zone and worried it will either be slow, introduce a security hole or simply won't work.
At the end of the day, the Microsoft Membership Provider should work for me - the only customisations I really need is the login to use the username/password field in my database and the create user script which has a lot of custom code to several third party systems (needing to provision services etc.).
I was just wondering, what would you do if faced with a similar situation?
Use the Microsoft Membership Provider and somehow get it to work for you (although I would like suggestions)
Use the Microsoft Membership Provider but use custom provider that is customised around your code.
Use your own completely customised solution?
That video does complicate things :) If you're going to implement a custom provider then reflector over the existing one is a good place to start :)
As a quick and dirty option you could, of course, hack the stored procedures that the SQL Membership provider uses but the custom code to provision services is probably stretching that.
If you think about it the remote provisioning of services doesn't really belong in a membership provider, it's not really a membership function - all membership does is provide usernames and passwords and authentication around them. My own feeling is that you should move the provisioning of services out of there, and perform it on the ASP.NET site after a user has been created - even if that's just calling a stored procedure once the membership provider has done its thing. If you do this you may find that the SQL membership provider will do everything you need it to (probably with the Roles & profile providers too), and thus you have way less code to write!
I've been in similar situations in the past. In both cases we created custom implementations of the providers (MembershipProvider, RoleProvider, ProfileProvider) around the existing mechanism.
In both cases we only used the provider implementations for read-only access, e.g. to give us the easy validation gubbins in web.config and suchlike. The user administration code was left well alone as it worked just fine.
If the existing provider works (has the right fields for your data), use that to start. You can VERY easily replace that with a customer provider later (just a single config value change).
Beware there isn't an "out of the box" ASP.NET management interface for that, you'll need to roll your own or use a third party one.
Use my specialized MembershipProvider to work against my own database tables.

ASP.NET SqlMembership Provider Scalability

I've got an upcoming project that is going to be dealing with 70,000+ users (education). I was wondering if the ASP.NET SqlMembership Provider has been used at such large capacities? Assuming the hardware is there, is there anything special that needs to be done to make it work smoothly? We're doing all the obvious things like separating boxes for databases and applications, but is there anything code wise that I need to watch out for?
I know one site that, owner of this site wrote a brilliant article about asp.net performance(http://www.codeproject.com/KB/aspnet/10ASPNetPerformance.aspx)
On this article there is one subject that author describes a patch about profile provider for higher performance. Please read that section.
Inbuilt SqlMembershipProvider is very reliable and workable. They tightly integrate with FormsAuthentication and Login Controls. So authentication is reliable and it is also quick to implement.
Only problem I see is the complexity of the Database table structure, they are quite tidy and not so straight at first. So you can basically write your own MembershipProvider that will talk to your own users table with more simplistic design and implementation. Also Managing Members on admin is also painful due to table design but in a way it is fairly possible to do so. For these reasons we wrote our own MembershipProvider based on Sql. It's working amazingly and we've had good experience of the same.
If you have a small website or project
you can straight go on with inbuilt
SqlMembershipProvider but for a large
project like yours I'd recommend
writing your own MembershipProvider.

Resources