473,545 Members | 529 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1533
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 connectionStrin gs 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****@blueyon der.co.ukwrote in message
news:OT******** ******@TK2MSFTN GP06.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 MembershipProvi der. This is an abstract class, and there are
several concrete versions.

There is a built in , default MembershipProvi der .. and its the
SqlMembershipPr ovider. 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 "MembershipProv ider" "MyRDBMS"
(<<like Oracle). Somewhere, somebody has probably written a port over.

Then, for ultimate flexibility, you can derive your own. As in:
MyMembershipPro vider : MembershipProvi der
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.asp x (for example)
pages.
(this is one solution).
The MembershipProvi der 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

MembershipProvi der custom
MembershipProvi der "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)

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

...


"Andy Fish" <aj****@blueyon der.co.ukwrote in message
news:OT******** ******@TK2MSFTN GP06.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
892
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 security features you have added to the application code block
2
1495
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 database-operation opens a connection, executes and then closes the connection. Another way would be to use only a single connection to the database,
1
3375
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 me in an email. I heard that it could be done using SQL Server Jobs. But I am looking to develop it using a C# application.
2
2800
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 is not working with ASP.net application. Help will be useful......... Thanks n Regards, Deepak
1
2670
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 creates/stores user information in a SQL Server 2005 db. I have another website that will administer the first website, allowing admins to look at all of the...
0
1342
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 shop etc. The user will specify the exe path of the application alone. If word application has to be opened, user will specify just "WINWORD.EXE" or...
1
1112
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 SQL role provider for both these membership providers. Is this possible? If so, can you give me a link or some information on how to set this up....
4
8211
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 providers. Membership provider seems to work. I use forms authentication, so as articles say, I need to do some magic to be able to get roles for current...
2
1221
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 at? Andrew
0
7656
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7805
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7416
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7752
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5325
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4944
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3449
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3441
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1013
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.