Blogs
September 09, 2010
Filter by Category
Blogs
Author: Tom Hundley Created: 2/3/2008 3:42 PM
ASP.Net

The "out of the box" password complexity requirements for the ASP.Net Membership system is this:

7 characters minimum 1 symbol character A client asked for a more complex password (a common request):

8 characters minimum at least 1 number at least 1 lower case at least 1 upper case at least 1 symbol character I tested a lot of regular expressions and most of them didn't work.  I finally found one that works well:

^.*(?=.{8,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[\W]).*$

Simply set the "passwordStrengthRegularExpression" attribute of the provider section in the web.confg to this regular expression and badda bing, you're good to go.  See this link for a list of all the attributes in the config.

You might want to seriously look into using the Password Strength Ajax Extender available from the Ajax Toolkit.  It's really nice and goes a long way to solving your users' password complexity woes.  It's simply to use and you can implement...

Read More »

The Telerik RadGrid automatically goes to the last page of the grid when inserting records, which is fine you don't care about seeing the newly inserted item.  This code will show you how to select the page and row which was just created.  The commented code at the bottom will also show you how to open the record in edit mode in cases where you need the page opened in such a manner. 

Simply subscribe to the PreRender event of the grid, enumerate the datasource directly to get the new records row index so that you can determine the page index and there you go.  Note that the Items collections on all of the grid objects only have the total number of items in that page, which is why you need to enumerate the datasource.

        if (Session[sessionObjectToFind] != null)         {             Guid storeRefId = new Guid(Session[sessionObjectToFind].ToString());             Session[sessionObjectToFind] = null;

            int pageIndex = 0;             int rowIndex = 0;

            for...

Read More »

Remote testing of web services via HTTP was diabled by default after .Net 1.0, so now you can only invoke test methods with your browser on the server.  Should you ever find the need to enable it again, add the following to the system.Web section of your web.config:

webServices>   protocols>     add name="HttpPost" />     add name="HttpGet" />   protocols> webServices>

Tom Hundley Elegant Software Solutions, LLC

 

...

Read More »

This is a quick reference to the Microsoft documentation explaining the ASP.Net SQL providers.  All copyright belongs to Microsoft.

Read More »

This is a quick reference to the Microsoft documentation explaining how to use SQL Server for ASP.Net Session State.  All copyright belongs to Microsoft.

Read More »

Home  |  Clients  |  Blogs  |  Contact Us
Copyright© Elegant Software Solutions, LLC