.NET 2.0 Security membership Provider - without SQL?

0

00_DotNetWarrior

I am using .NET 2.0 Security to do login/password management, but in the
ASP.NET web site administration page, it forces me to use
"AspNetSqlProvider" as provider.

Is it possible to change it to something else? like a plain XML file?
without using SQL Database? Since our application is extremely
lightwighted, we don't really need a database. Also, we don't want our
client to install SQL Express or to use SQL server.

Thanks..
 
M

Michael Bosch

Hi DotNetWarrior...

From what I have "heard" but not "implemented", the grandest thing about
ASP.NET 2.0 nowadays is the Provider Model. You can configure the provider
you want to use in the Web.Config. This allows you to create you own
providers for whatever functionality (in this case, Membership) you are
seeking. For example, if you have a file named "foo.txt" and you wanted to
base all you authentication on that, you can create a FooMembershipProvider
to implement it.

Regards,

Michael Bosch
 
J

Juan T. Llibre

re:
it forces me to use "AspNetSqlProvider" as provider.

Is it possible to change it to something else? like a plain XML file?

At this page :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/ASPNETProvMod_Prt1.asp

there's sample code for a ReadOnlyXmlMembershipProvider.

It does not support programmatically adding users, or changing passwords, though.
It's intended for read-only membership services.

You can add users/change passwords via a separate XML parse/write operation.

Maybe that's enough for you ?
 
S

sloan

The new way that Microsoft is doing things is.

they create and use an abstract class in the code, for their controls.
They ship with the framework, a class that implements the abstract class.

This way it works "out of the box".

Realizing that it won't satify all/many customer needs, you have the ability
to create your own class ( inheriting the abstract class Microsoft
provides ) and then write your own code to handle the abstract methods.
(mustinherit I think in vb.net)

Then, you override the class which ships with dotnet, in the .config file.

Its not trivial to create your own. it takes some work.

Depending on the project, you can either learn how to use it "out of the
box", or use the previously provided links to find some other people who
have create their own version.

But nothing is free. You either can tackle the setup and learning curve of
using the code "out of the box", or you can write/"borrow" other code to
replace the out of the box code.
 
P

PeterKellner

00_DotNetWarrior said:
I am using .NET 2.0 Security to do login/password management, but in the
ASP.NET web site administration page, it forces me to use
"AspNetSqlProvider" as provider.

Is it possible to change it to something else? like a plain XML file?
without using SQL Database? Since our application is extremely
lightwighted, we don't really need a database. Also, we don't want our
client to install SQL Express or to use SQL server.

Thanks..

In the book "Pro ASP.NET 2.0 in C# 2005" is full xml exmaple of membership
provider.

Starting on page 870. Published by Apress (www.apress.com). Probably
source is on line.

(sorry for the double post, newsreader problem)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top