473,385 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

using membership providers for a web application

Hi,

I am trying to figure out how to use asp.net membership providers for my
vs2005 web project. unfortunately the only walkthrough in MSDN uses the "Web
Site Administration Tool" to configure the providers, and that tool only
seems to be available for web sites, not web projects.

I can't figure out where the WSAT persists all the settings. the user and
group information seems to be all in a SQL server database but there is no
where to configure which database it uses.

is it possible to use membership providers with a web project? or was I
stupid to use a web project and should have been using a web application all
along? or was I stupid to try and use membership providers?

Thanks

Andy
Dec 6 '07 #1
3 1525
You can set up Membership, Profiles, etc. with any type of project. You might
want to look at the QUICKSTARTS samples on the asp.net site for code samples.
Basically you determine the database in the connectionStrings web.config
section.
-- Peter
Site: www.eggheadcafe.com
UnBlog: petesbloggerama.blogspot.com
Metafinder: www.blogmetafinder.com

"Andy Fish" wrote:
Hi,

I am trying to figure out how to use asp.net membership providers for my
vs2005 web project. unfortunately the only walkthrough in MSDN uses the "Web
Site Administration Tool" to configure the providers, and that tool only
seems to be available for web sites, not web projects.

I can't figure out where the WSAT persists all the settings. the user and
group information seems to be all in a SQL server database but there is no
where to configure which database it uses.

is it possible to use membership providers with a web project? or was I
stupid to use a web project and should have been using a web application all
along? or was I stupid to try and use membership providers?

Thanks

Andy
Dec 6 '07 #2
See the following MSDN articles:

http://msdn2.microsoft.com/en-us/library/f1kyba5e.aspx
http://msdn2.microsoft.com/en-us/library/44w5aswa.aspx
http://msdn2.microsoft.com/en-us/library/6tc47t75.aspx

The Web Site Administration Tool persists settings in the web.config file.

--
HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP

"Andy Fish" <aj****@blueyonder.co.ukwrote in message
news:OT**************@TK2MSFTNGP06.phx.gbl...
Hi,

I am trying to figure out how to use asp.net membership providers for my
vs2005 web project. unfortunately the only walkthrough in MSDN uses the
"Web Site Administration Tool" to configure the providers, and that tool
only seems to be available for web sites, not web projects.

I can't figure out where the WSAT persists all the settings. the user and
group information seems to be all in a SQL server database but there is no
where to configure which database it uses.

is it possible to use membership providers with a web project? or was I
stupid to use a web project and should have been using a web application
all along? or was I stupid to try and use membership providers?

Thanks

Andy


Dec 6 '07 #3

There are 2 things, and sometimes people use them interchangably.

There is the MembershipProvider. This is an abstract class, and there are
several concrete versions.

There is a built in , default MembershipProvider .. and its the
SqlMembershipProvider. It uses a sql server database of course.
You'll see tables like "asp_*" for this particuliar concrete version.

People have written other concrete versions. Heck, there's one for Access
somewhere.
If you don't have Sql Server, then google "MembershipProvider" "MyRDBMS"
(<<like Oracle). Somewhere, somebody has probably written a port over.

Then, for ultimate flexibility, you can derive your own. As in:
MyMembershipProvider : MembershipProvider
This is useful for when you already have a an existing db with usernames and
credentials.

the WSAT is ...something to avoid. It writes to the config file, only works
locally, and is more of a hobbyist answer for security.

MSDN has code you can get that gives you basic user management, you can
basically copy and paste the code into /Admin/RolesManage.aspx (for example)
pages.
(this is one solution).
The MembershipProvider and RoleProvider are based on ROLES, and not RIGHTS.
I find myself cursing at MS for this one sometimes.
For basic stuff, having roles like "admin", "normaluser", "guest" are ok,
but for a enterprise application I think rights, with configurable roles
(that contain those rights) would be a better solution.
But hey, MS makes alot more money than I do.
But I digress.

Here are some google searches that will help

MembershipProvider custom
MembershipProvider "Sql Server 2000"
(the above one is good even if you have another version of sql server,
it'll show you how to setup a asp_net database on any server)

MembershipProvider Access
(again, a good learning tool, even if you don't use Access)
Because MembershipProvider (and RoleProvider) are abstract, the backend
implementation can be different....but the code is all the same.
This is called the Provider Model ... or maybe in more OO terms, the Factory
Pattern.
Again, SqlMembershipProvider is the "out of the box" concrete version of
MembershipProvider ... that alot of people use.. but sometimes they will
refer to the concrete version AS the MembershipProvider, thus causing some/a
little bit of confusion.

...


"Andy Fish" <aj****@blueyonder.co.ukwrote in message
news:OT**************@TK2MSFTNGP06.phx.gbl...
Hi,

I am trying to figure out how to use asp.net membership providers for my
vs2005 web project. unfortunately the only walkthrough in MSDN uses the
"Web Site Administration Tool" to configure the providers, and that tool
only seems to be available for web sites, not web projects.

I can't figure out where the WSAT persists all the settings. the user and
group information seems to be all in a SQL server database but there is no
where to configure which database it uses.

is it possible to use membership providers with a web project? or was I
stupid to use a web project and should have been using a web application
all along? or was I stupid to try and use membership providers?

Thanks

Andy


Dec 6 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ramprasad Ramamurthy | last post by:
Hi, Could you please share the issues you faced when using any of application code block that Microsfot provides in your projects. It would be great if you could share some of the performance and...
2
by: Sebastian | last post by:
Dear members, I'am thinking about the "best" way to connect to my sql-server via ADO.Net (if there is a best way). My application uses the sql-server very intensively. At the moment every...
1
by: Reddy | last post by:
Hi, I am in the process of developing a C# application which runs continuously in the background on the server. It should grab the changes in the database and send the modified or new results to...
2
by: DB | last post by:
Hi All, I have to execute dos command containing batch file using asp.net application. Code for batch file execution is working properly when I tried it with console application but same code...
1
by: Andy | last post by:
Hi, I was wondering if someone could advise on if the following is possible. I have one website that is available to the public using Forms authentication and the Membership class, it...
0
by: Sasie7679 | last post by:
Dear All, We have a requirement to open any file using a specific application and showing it within a activex control. For example, bmp file can be shown in Internet explorer, paint brush, photo...
1
by: TheCornjerker | last post by:
With ASP.Net 2.0, I have setup a custom login screen that first authenticates against and SQL membership provider and if that fails, against an Active Directory provider. I'm wanting to have one...
4
by: alexandis | last post by:
There are tons of articles about custom role and provider membership, but they just tear me apart and confuse :( The situation is following: I use DB2, so I wrote custom role + membership...
2
by: Andrea Raimondi | last post by:
Hello, While I'm at it :-P I'm also looking for some GOOD tutorial that will walk me through understanding and using membership providers in ASP.NET. Is there such a tutorial you can point me...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.