473,685 Members | 3,045 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="MyProvide r"
type="System.We b.Security.SqlM embershipProvid er"
minRequiredNona lphanumericChar acters="0"
connectionStrin gName="LocalSql Server" />
</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:CreateUserW izard control for the first time).

How do I modify the web.config file to change the value of
minRequiredNona lphanumericChar acters 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 8715
re:
!What is the name of the provider that I already have?

The default membership provider is a SqlMembershipPr ovider
instance named "AspNetSqlMembe rshipProvider".

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 MembershipProvi der class.
The MembershipProvi der class itself inherits from the ProviderBase class.

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

<membership defaultProvider ="MyProvider ">
<providers>
<clear />
<add name="AspNetSql MembershipProvi der"
type="System.We b.Security.SqlM embershipProvid er"
minRequiredNona lphanumericChar acters="0"
connectionStrin gName="LocalSql Server" />
</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.goo glegroups.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="MyProvide r"
type="System.We b.Security.SqlM embershipProvid er"
minRequiredNona lphanumericChar acters="0"
connectionStrin gName="LocalSql Server" />
</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:CreateUserW izard control for the first time).

How do I modify the web.config file to change the value of
minRequiredNona lphanumericChar acters 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 ="AspNetSqlMemb ershipProvider" >
<providers>
<clear />
<add name="AspNetSql MembershipProvi der"
type="System.We b.Security.SqlM embershipProvid er"
minRequiredNona lphanumericChar acters="0"
connectionStrin gName="LocalSql Server" />
</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.comwrot e in message
news:eN******** ******@TK2MSFTN GP05.phx.gbl...
re:
!What is the name of the provider that I already have?

The default membership provider is a SqlMembershipPr ovider
instance named "AspNetSqlMembe rshipProvider".

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 MembershipProvi der class.
The MembershipProvi der class itself inherits from the ProviderBase class.

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

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

<membership defaultProvider ="MyProvider ">
<providers>
<clear />
<add name="AspNetSql MembershipProvi der"
type="System.We b.Security.SqlM embershipProvid er"
minRequiredNona lphanumericChar acters="0"
connectionStrin gName="LocalSql Server" />
</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.goo glegroups.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="MyProvide r"
type="System.We b.Security.SqlM embershipProvid er"
minRequiredNona lphanumericChar acters="0"
connectionStrin gName="LocalSql Server" />
</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:CreateUserW izard control for the first time).

How do I modify the web.config file to change the value of
minRequiredNon alphanumericCha racters 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(objec t sender, EventArgs e)
{
MembershipUserC ollection mine = Membership.GetA llUsers();
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.GetA llUser() 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
2249
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 two customers that I'm working with on this app right now have 2 very different password requirements, I'd rather not have to re-write the signup and login page for each customer. I'm working in classic ASP, but .. ASP.NET is not out of the...
0
2104
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 saved in MS Access 2000. ... www.soft30.com/screen-149-12232.htm - 32k - Cached - Similar pages MS Access HTML Help Generator 1.2 - Soft.com MS Access HTML Help Generator 1.2. ... System Requirements: MS Access 2000 / XP /
9
11521
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 specifications: ALGORITHM: 1. Ask the user to input a possible password. 2. Check to see that it: - is at least 8 characters long
9
2830
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 support it), when shadow passwords are enabled, the actual password is not stored. Instead an encrypted version is stored. Then, to authenticate the password, the system re-encrypts the user's input to see if it matches the stored, encrypted...
0
1236
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 position. I've got the 8 char long below. Can someone tell me how to do the minimum of 1 numeric character in the 2nd through next-to-last position? thanks! declare @position smallint, -- @numCaps...
2
3197
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 out of the text box, but the meter will stay at its current position until text is entered back into the textbox. Once text is re-entered, the meter will display the results again. I would like everything to reset when the button is pushed, but I...
5
4821
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
3761
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 strong,medium or weak like that. could you please help me? how to do coding for that? i have already tried with java script but doesnt work. thnks
0
8504
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8758
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8773
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6431
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5790
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4299
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4521
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2936
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
1924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.