473,395 Members | 1,653 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,395 software developers and data experts.

Confused about modifying password strength requirements in ASP.NET 2.0.

Hello All,

I am working through the SAMS "ASP.NET 2.0 - Unleased" book to teach
myself ASP.NET. It is a great book, but Chapter 21 "Using ASP.NET
Membership" is causing me problems - or maybe I am just missing
something.

It is telling me that in order to modify user password requirements I
need to add the following to the web.config file.

<membership defaultProvider="MyProvider">
<providers>
<add
name="MyProvider"
type="System.Web.Security.SqlMembershipProvider"
minRequiredNonalphanumericCharacters="0"
connectionStringName="LocalSqlServer" />
</providers>
</membership>

The trouble with this is that "MyProvider" (whatever that is) is now
the default provider so it seems to override the provider that I
already have (the provider that was created for me the first time I
used the asp:CreateUserWizard control for the first time).

How do I modify the web.config file to change the value of
minRequiredNonalphanumericCharacters without "adding" a provider. What
is the name of the provider that I already have? I am confused.

Help is always appreciated.

Paul

Jun 7 '07 #1
3 8698
re:
!What is the name of the provider that I already have?

The default membership provider is a SqlMembershipProvider
instance named "AspNetSqlMembershipProvider".

http://msdn2.microsoft.com/en-us/lib...1k(VS.80).aspx

It contains methods and properties specific to using
SQL Express 2005 as a data store for membership information.

It inherits from the MembershipProvider class.
The MembershipProvider class itself inherits from the ProviderBase class.

re:
How do I modify the web.config file to change the value of
minRequiredNonalphanumericCharacters without "adding" a provider.
Add the required lines, after clearing the existing default provider.

<membership defaultProvider="MyProvider">
<providers>
<clear />
<add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider"
minRequiredNonalphanumericCharacters="0"
connectionStringName="LocalSqlServer" />
</providers>
</membership>

Make sure you don't leave out any important settings...


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Paul" <pa************@gmail.comwrote in message
news:11**********************@p47g2000hsd.googlegr oups.com...
Hello All,

I am working through the SAMS "ASP.NET 2.0 - Unleased" book to teach
myself ASP.NET. It is a great book, but Chapter 21 "Using ASP.NET
Membership" is causing me problems - or maybe I am just missing
something.

It is telling me that in order to modify user password requirements I
need to add the following to the web.config file.

<membership defaultProvider="MyProvider">
<providers>
<add
name="MyProvider"
type="System.Web.Security.SqlMembershipProvider"
minRequiredNonalphanumericCharacters="0"
connectionStringName="LocalSqlServer" />
</providers>
</membership>

The trouble with this is that "MyProvider" (whatever that is) is now
the default provider so it seems to override the provider that I
already have (the provider that was created for me the first time I
used the asp:CreateUserWizard control for the first time).

How do I modify the web.config file to change the value of
minRequiredNonalphanumericCharacters without "adding" a provider. What
is the name of the provider that I already have? I am confused.

Help is always appreciated.

Paul

Jun 7 '07 #2
Aargh! Typo warning !

That should have been :

<membership defaultProvider="AspNetSqlMembershipProvider">
<providers>
<clear />
<add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider"
minRequiredNonalphanumericCharacters="0"
connectionStringName="LocalSqlServer" />
</providers>
</membership>

Sorry...

The rest stands as posted.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:eN**************@TK2MSFTNGP05.phx.gbl...
re:
!What is the name of the provider that I already have?

The default membership provider is a SqlMembershipProvider
instance named "AspNetSqlMembershipProvider".

http://msdn2.microsoft.com/en-us/lib...1k(VS.80).aspx

It contains methods and properties specific to using
SQL Express 2005 as a data store for membership information.

It inherits from the MembershipProvider class.
The MembershipProvider class itself inherits from the ProviderBase class.

re:
>How do I modify the web.config file to change the value of
minRequiredNonalphanumericCharacters without "adding" a provider.

Add the required lines, after clearing the existing default provider.

<membership defaultProvider="MyProvider">
<providers>
<clear />
<add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider"
minRequiredNonalphanumericCharacters="0"
connectionStringName="LocalSqlServer" />
</providers>
</membership>

Make sure you don't leave out any important settings...


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Paul" <pa************@gmail.comwrote in message
news:11**********************@p47g2000hsd.googlegr oups.com...
>Hello All,

I am working through the SAMS "ASP.NET 2.0 - Unleased" book to teach
myself ASP.NET. It is a great book, but Chapter 21 "Using ASP.NET
Membership" is causing me problems - or maybe I am just missing
something.

It is telling me that in order to modify user password requirements I
need to add the following to the web.config file.

<membership defaultProvider="MyProvider">
<providers>
<add
name="MyProvider"
type="System.Web.Security.SqlMembershipProvider"
minRequiredNonalphanumericCharacters="0"
connectionStringName="LocalSqlServer" />
</providers>
</membership>

The trouble with this is that "MyProvider" (whatever that is) is now
the default provider so it seems to override the provider that I
already have (the provider that was created for me the first time I
used the asp:CreateUserWizard control for the first time).

How do I modify the web.config file to change the value of
minRequiredNonalphanumericCharacters without "adding" a provider. What
is the name of the provider that I already have? I am confused.

Help is always appreciated.

Paul


Jun 7 '07 #3
Thanks Juan,

That brings me a little bit closer to understanding, but I am still
confused. I added the code that you gave me to the web.config file.

I am still getting a result that I don't understand. As an experiment
I have the following Page_Load event in one of my pages.

protected void Page_Load(object sender, EventArgs e)
{
MembershipUserCollection mine = Membership.GetAllUsers();
foreach (MembershipUser myUser in mine)
{
Response.Write(myUser.UserName + "<br />");
}
}

After I added the code that you suggested into the web.config file
this event produced no output. So as an experiment I created another
user and loaded the page again. This time I got output - the user that
I had just added. Then I had a look at the contents of the
aspnet_Users table in the ASPNETDB.MDF database and found that the
user I had just added was there with all the other users that I had in
there before. If all the users are stored in the same place, why does
the Membership.GetAllUser() method return a collection with only the
user that I added after I edited the web.config file. I had a look at
the data in some of the other tables in ASPNETDB.MDF database to see
if there was a field that gave the GetAllUsers() method the info it
needed to differentiate between users that I had added before editing
web.config and those I added after but I could not find anything. I
must be missing knowledge of some fundamental Membership concept that
is causing my confusion.

Paul

Jun 7 '07 #4

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

Similar topics

4
by: Bryan Harrington | last post by:
Hello.. I'm trying to come up with a good way to have password requirements (i.e., length, Upper/Lower case mix, x number of Alpha, x number of numeric, etc.) configurable by installed site. The...
0
by: com | last post by:
MS Access 2000 Password Recoverer 4.2 Screenshot - Soft30.com MS Access 2000 Password Recoverer will display the password to a MS Access database (*.mdb). This program works for MS Access files...
9
by: kwindham | last post by:
This program doesn't seem like it should be too hard, but I cannot figure it out. Here is the assignment: Password Verifier - Write a program to verify passwords, satisfying the following...
9
by: neokosmos | last post by:
This may only be tangentially related to Python, but since I am coding a password authentication system in Python, I thought I would ask here. In Linux (and presumably other *NIX systems that...
0
by: Straw | last post by:
I found this script for modifying sp_password. My requirements are that the password must be at least 8 characters long and have a minimum of 1 numeric character in the 2nd through next-to-last...
2
by: DarthPeePee | last post by:
Hello everyone. I am working on a Password Strength Meter and I am running into 1 problem that I would like to fix. When pressing the "Clear Password & Try Again" button, the password clears...
5
by: splendid9 | last post by:
ajax password strength how to do a server side check when using ajax password strength meter. i kmnow it does on client side..can anyone help me out with this?
1
by: itboy1 | last post by:
hii i have a question regarding password strength in asp.net using c#. i have made a page where i have put password field but i dont have idea about password strength. like password is...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
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...

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.