Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 28, 2012 03:12 AM by oned_gk
Member
70 Points
185 Posts
Nov 27, 2012 09:38 PM|LINK
http://msdn.microsoft.com/en-us/library/system.web.security.membershipprovider.passwordstrengthregularexpression.aspx
I am trying to setup this regular expression but the MSDN article is wrong. The code example says to use:
passwordStrengthRegularExpression="@\"(?=.{6,})(?=(.*\d){1,})(?=(.*\W){1,})"
However, when I copy and paste that into my web.config file, I get 44 error messages saying:
Error 1 Character '(', hexadecimal value 0x28 is illegal in an XML name.
How do I get this working? And can someone please fix that article?
Thanks.
All-Star
30969 Points
6338 Posts
Nov 27, 2012 11:18 PM|LINK
try this
passwordStrengthRegularExpression="@\"(?=.{6,})(?=(.*\d){1,})(?=(.*\W){1,})"
Nov 28, 2012 01:47 AM|LINK
It appears that it's working now, for some reason. I don't know why the MSDN code doesn't work. Is there a way to have that page updated, so that it's correct?
Nov 28, 2012 03:12 AM|LINK
The problem is any double quote inside the characters.
Kensino
Member
70 Points
185 Posts
MSDN code example is wrong. How do I fix it?
Nov 27, 2012 09:38 PM|LINK
http://msdn.microsoft.com/en-us/library/system.web.security.membershipprovider.passwordstrengthregularexpression.aspx
I am trying to setup this regular expression but the MSDN article is wrong. The code example says to use:
passwordStrengthRegularExpression="@\"(?=.{6,})(?=(.*\d){1,})(?=(.*\W){1,})"
However, when I copy and paste that into my web.config file, I get 44 error messages saying:
Error 1 Character '(', hexadecimal value 0x28 is illegal in an XML name.
How do I get this working? And can someone please fix that article?
Thanks.
oned_gk
All-Star
30969 Points
6338 Posts
Re: MSDN code example is wrong. How do I fix it?
Nov 27, 2012 11:18 PM|LINK
try this
passwordStrengthRegularExpression="@\"(?=.{6,})(?=(.*\d){1,})(?=(.*\W){1,})"Kensino
Member
70 Points
185 Posts
Re: MSDN code example is wrong. How do I fix it?
Nov 28, 2012 01:47 AM|LINK
It appears that it's working now, for some reason. I don't know why the MSDN code doesn't work. Is there a way to have that page updated, so that it's correct?
Thanks.
oned_gk
All-Star
30969 Points
6338 Posts
Re: MSDN code example is wrong. How do I fix it?
Nov 28, 2012 03:12 AM|LINK
The problem is any double quote inside the characters.