472,372 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,372 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 8647
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...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
0
DizelArs
by: DizelArs | last post by:
Hi all) Faced with a problem, element.click() event doesn't work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event('click', {...

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.