What is RTM ?

Short for Release To Manufacturing, the version of a software product that is given to manufacturers to bundle into future versions of their hardware products. RTM versions are typically released to manufacturers before they are released to the general public so that the manufacturers can work out any bugs the software may encounter with hardware devices. The release of an RTM version does not necessarily mean that the creators have worked out all the problems with the software; there still may be more versions of the product before it is released to the general public.

URLs in master page of asp.net 2.0

(from : http://www.odetocode.com/Articles/450.aspx )
At runtime, the master page and the content page are in the same control hierarchy – the master page is essentially a user control inside the content page. At design time, however, the master page and content page are two different entities. In fact, the master page and content page may live in different directories. During design time, it’s easy to put URLs and relative paths into our master pages, but we have to be careful when using relative paths. Take the following master page excerpt as an example:.

<img src=”logo.gif” alt=”Company Logo” />

<asp:ContentPlaceHolder ID=”ContentPlaceHolder1″ runat=”server”>

The good news is, the ASP.NET runtime does provide a feature called “URL rebasing”. The runtime will try to “rebase” relative URLs it finds on server-side controls inside a master page. This means the following relative path will work, no matter where the master page and web form live.

<img src=”logo.gif” alt=”Company Logo” runat=”server” />

We’ve added a runat=”server” attribute to the image tag, making the <img> a server-side control. When the master page file and logo are in the root directory, but the web form is in a subdirectory, the ASP.NET runtime will rebase the relative path it finds in the src attribute to point to the root of the website.

The following code will also work, because we are using a server-side Image object.

<asp:Image ImageUrl=”logo.gif” runat=”server” />

The ASP.NET runtime will also rebase paths it finds inside of the head tag. Take the following excerpt from a master page:

<head runat=”server”>
<title>Untitled Page</title>

<link href=”styles/styles.css” type=”text/css” rel=”stylesheet”/>


If we request a webform from a subdirectory, the runtime will catch the href inside the link tag and rebase the URL to “../styles/styles.css”. However, the runtime doesn’t catch everything. If we included our style sheet with the following code, the runtime won’t rebase the relative href.
<head runat=”server”>

<style type=”text/css” media=”all”>
@import “styles/styles.css”;


Also, the runtime doesn’t rebase URLs inside of embedded styles, and not all attributes are covered (the background attribute, for instance).

<body background=”logo.gif” runat=”server”>
<!– the background for the body tag will break –>
<form id=”form1″ runat=”server”>

<div id=”Div1″ style=”background-image: url(‘logo.gif’);” runat=”server”>
<!– My background is also broken. –>

If you need to use a relative path in an area where the runtime does not provide the rebasing feature, you can compute a client side URL using ResolveClientUrl and passing a relative path. ResolveClientUrl, when called from inside a master page, will take into account the location of the master page, the location specified in the HTTP request, and the location specified by the relative path parameter to formulate the correct relative path to return.

<body background=<%= ResolveClientUrl(“logo.gif”) %> >

When working with image paths in embedded styles, it’s often a good idea to move the style definition into a .css file. The ASP.NET runtime will rebase the path it finds inside a link tag, so we won’t have any problems locating the stylesheet from any webform. Take the following style definition in a .css file:


Relative paths are safe inside a .css file because the browser will always request logo.gif relative to the location of the stylesheet.

sqlcmd command

You can run the SetupDatabase.sql which can be found within the App_Data,which creates the database schema using the following command in your command prompt:

(Note:SQLCMD comes with the Visual Studio / SQL Express installation)

How to display/hidden menu items automatically due to logined user in ASP.NET 2.0

How to display/hidden menu items automatically due to logined user in ASP.NET 2.0

.NET 2.0 has the feature of displaying/hidden menu items automatically due to logined user in ASP.NET 2.0, but you have to know how to set up.

Normally, when you create a new .NET project, you can not get this feature, you will find specific menu item can not hidden or display due to the different users.
Just set up by the following steps:

1: Add a XML SiteMap Provider and something else related section in web.config file:

<authentication mode=”Forms”>

<forms loginUrl=”Default.aspx”  name=”.ASPNETAUTH”  path=”/” timeout=”20″ protection=”Validation” />

<allow users=”*”/>

<customErrors mode=”RemoteOnly” defaultRedirect=”CustomError.aspx”/>
<pages theme=”Standard”/>
<remove name=”AspNetSqlMembershipProvider”/>
<add name=”AspNetSqlMembershipProvider”


<remove name=”AspNetSqlProfileProvider”/>
<add name=”AspNetSqlProfileProvider”


<roleManager enabled=”true”>
<remove name=”AspNetSqlRoleProvider”/>
<add name=”AspNetSqlRoleProvider”


<siteMap defaultProvider=”XmlSiteMapProvider” enabled=”true”>
<add name=”XmlSiteMapProvider” description=”SiteMap provider which reads in .sitemap XML files.” type=”System.Web.XmlSiteMapProvider, System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a” siteMapFile=”web.sitemap” securityTrimmingEnabled=”true”/>

<!– compilation debug=”true”/ –>


2: Add menu items in Web.sitemap file:

<?xml version=”1.0″ encoding=”utf-8″ ?>
<siteMap  xmlns=”http://schemas.microsoft.com/AspNet/SiteMap-File-1.0″ >
<siteMapNode url=”~/Default.aspx” title=”Home” description=”Home Page” >
<siteMapNode url=”#” title=”Home” description=”Home Page” />
<siteMapNode url=”~/Services.aspx” title=”Services” description=”Our Services”/>
<siteMapNode url=”~/About.aspx” title=”About Us” description=”About Us”/>
<siteMapNode url=”~/Contact.aspx” title=”Contact” description=”Contact Information”/>
<siteMapNode url=”~/Admin/ContactInfoAdm.aspx” title=”Administration” description=”Administration” />

Note: in the Web.sitemap, for the “Home” menu, there should be add 2 times in Visual Web Developer 2005 Express like the following :

<siteMapNode url=”~/Default.aspx” title=”Home” description=”Home Page” >
<siteMapNode url=”#” title=”Home” description=”Home Page” />

I tried  in Visual Studio 2005 too, It doesn’t need 2 times, just like this:

<?xml version=”1.0″ encoding=”utf-8″ ?>
<siteMap  xmlns=”http://schemas.microsoft.com/AspNet/SiteMap-File-1.0″ >
<siteMapNode url=”~/Default.aspx” title=”Home” description=”Home Page” >
<siteMapNode url=”~/Services.aspx” title=”Services” description=”Our Services”/>
<siteMapNode url=”~/About.aspx” title=”About Us” description=”About Us”/>
<siteMapNode url=”~/Contact.aspx” title=”Contact” description=”Contact Information”/>
<siteMapNode url=”~/Admin/ContactInfoAdm.aspx” title=”Administration” description=”Administration” />

How to develop and debug ASP.NET custom controls in Visual Web Developer Express

(This all article is completely copy from “Mikhail Arkhipov (MSFT)’s WebLog” , I have not tried yet.  Thanks him! )

How to develop and debug ASP.NET custom controls in Visual Web Developer Express

As you may know, Visual Web Developer Express only supports Web site projects and you can only have  a single project open at a time. It does not support creation of Web Control libraries since Web Control Library is, in fact, a client side project like a Class Library project and VWD does not support client side development.

However, you do can create Class Library in Visual C# Express or Visual Basic Express. Web Controls Library is a variety of the Class Library. Now, did you know that you can install all Express editions on the same machine and that you can run multiple Express editions at the same time? Armed with that knowledge, if you really need to create and debug a custom control and you are limited to Express editions, here is what you can do:

1. Download and install Visual C# Express or Visual Basic Express.

2. Open Web site in the Visual Web Developer Express.

3. Right click on root node in the Solution Explorer, choose New Folder and name the folder bin. Folder should get distinct ‘bin’ folder icon.

4. Run C# or VB Express and create Class Library project.

5. Right click on the class library project node in the Solution Explorer and choose Properties.

6. In the Build tab (C#) or Compile tab (VB) set Output Path to the Web site bin folder.

7. Right click on the class library node in the Solution Explorer, select Add Reference and add reference to System.Web.

8. In the class code, add references (via imports/using statements) to System.Web, System.Web.UI and System.Web.UI.WebControls.  Derive the class from WebControl.

9. Write necessary custom control code and build the assembly.

10. Go back to Visual Web Developer, right click on the bin folder in the Solution Explorer and choose Refresh. You should see control assembly and the pdb file under the bin node.

11. Right click on Toolbox and select Choose Items…

12. Select .NET tab, click Browse…, locate locate custom control assembly in the Web site bin folder and click OK. You should see control added to the toolbox.

13. Go to Design view and drop control on the designer. You should see control instantiated and design time HTML rendered.

14. Choose File | Open, locate custom control source file (.vb/.cs) and open it. Set breakpoint in the custom control code, such as in the control constructor or in RenderContents.

15. Hit F5 in the Visual Web Developer to run your Web under debugger. You should hit the breakpoint in the custom control code.

As you can see, you are editing and compiling control assembly in VB or C# Express while debugging should be performed in the Visual Web Developer. You’ll have to go to another IDE to recompile custom control and you’ll have to maintain matching build mode and remember switch to release build and delete pdb files before deploying the Web.

Of course, in Visual Studio Standard you would only have to add a Web Control library to the solution and be done as the most of the steps above would happen automatically 😉

Let ASP.NET 2.0 create “ASPNETDB.mdf” in my own database

The ASP.NET version 2.0 membership feature provides secure credential storage for application users. It also provides a membership API that simplifies the task of validating user credentials when used with forms authentication.(MS)

when we create users and roles by selecting menu “ASP.NET Configration” wizard,  it will create a sql server express file named “aspnet.mdf”, but most of time I have my own database for my projects, If I use these 2 seperat database, it will not convenient to deploy. so is it possible let asp.net 2 create those built-in tables, schemas, store procedure into my own database ?

I tried and I got successful. The following steps are what I did:

1: Create your own database in Visual Web Developer 2005 Express Edition using Database Explorer or Solution Explorer. i.e: its name is MyDB.mdf (this is a SQL Sqlsever instance database file);

2: Right click this database – MyDB.mdf, select “Modify Connection…”;

3: You will see the Modify Connection window:

4: Change Data source, click the “Change…” button on the right side of Data Source textbox, select Microsoft SQL Server and click OK:

5: Then back to Mofify Connection Window, fill “[Your computer name]\SQLEXPRESS” into Server name textbox, if you have set authentication access to sql server express when you installed sQL Server Express, select “Use SQL Server Authentication”, input Username and Password, Otherwise, just select “Use Windows Authentication”;  and select “Attach a database file”, click “Browse” butthon, locate your own database file that you created in Step 1 (“MyDB.mdf”) and select it, click OK:

For my case, I just use Windows authentication.

6: Later , if you check your database by right click it, you will find “Data Source” has been changed to “Microsoft SQL Server Database File (SqlClient)” automatically, but I still have to do followed the above steps since I want to add my own database into [My machine name]\ExPRESS server;

7: Now, I can use “aspnet_regsql.exe” tool to create the built-in schema, tables and sprocs for the users and roles of ASP.NET 2.0 ;

locate the file “C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regsql.exe” and double click it to run;

8: Next:

9: Change “Server” from the original text to “[Your Computer Name]\SQLEXPRESS” (My case is: 09B-036-D001\SQLEXPRESS)

10: Click Next until Finish:

11: Now I go back to my Visual Web Developer 2005 Express, I found my own database MyDB.mdf have been inserted some data tables, schema, store procedures… They just are what I mentioned in step 7.

12: Modify “connectionStrings” in web.config:

<!– add name=”LocalSqlServer” connectionString=”data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true” providerName=”System.Data.SqlClient”/ –>
<remove name=”LocalSqlServer”/>
<add name=”LocalSqlServer” connectionString=”Data Source=09B-036-D001\SQLEXPRESS;AttachDbFilename=C:\MyCodes\VisualStudio2005Express\WebSites\WebSite1\App_Data\mydb.mdf;Integrated Security=True” providerName=”System.Data.SqlClient”/>

Why remove LocalSqlServer just because this name has been added into machine.config in the folder “C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG”.

OK, now, I have finished my task : let asp.net 2.0 create the built-in data into my own SQL Server 2005 Express database. in fact, If I want to create those data into my own SQL Server 2005 database (not 2005 Express), it is easier than what I descripted above, because I dont need “record” my 2005 Express data file onto EXPRESS server, I can just start from step 7 (Or visit ScottGu’s blg : http://weblogs.asp.net/scottgu/archive/2005/08/25/423703.aspx)

Creating MS Word Document using VB.Net, XML and XSLT

This simple program demostrate how to create well formatted MS Word documents using VB.Net, XML and XSLT. Using XSLT to create Word document requires the knowledge of RTF key words. RTF specification is available in MSDN site.

1. Open Visual Studio .NET and select File –> New –> Project.

2. Select Visual Basic project as the Project Type and Windows Application as the Template. For the project name, specify ‘VBXSLT’; for the path specify the location where you want the project to be created. Click OK to create the new project.

3. Add an XML file named “Employee.xml” in \Debug\Bin directory (other wise you have to specify the path in the program). The structure of the file will be like:

<?xml version=”1.0″ encoding=”utf-8″ ?>















































<DeptName>Human Resource</DeptName>
















4. Add an XSLT file named “Employee.xslt” in \Debug\Bin directory (other wise you have to specify the path in the program). The structure of the file will be like,

<xsl:stylesheet version=”1.0″ xmlns:xsl=”http://www.w3.org/1999/XSL/Transform” xmlns:msxsl=”urn:schemas-microsoft-com:xslt” xmlns:dt=”urn:schemas-microsoft-com:datatypes” xmlns:user=”urn:my-scripts”>

<xsl:output method=”text” />

<xsl:template match=”Employee”>


<!–Print the Header Row–>

<xsl:text>\trowd\cellx2500\cellx3000\cellx3800\cellx6800\cellx9144\intbl\keepn\ql\b Name\cell Age\cell Sex\cell Address\cell Department\cell</xsl:text>


<!–Print Employee Records–>

<xsl:apply-templates select=”Record” />



<xsl:template match=”Record”>

<xsl:text>\trowd\cellx2500\cellx3000\cellx3800\cellx6800\cellx9144\intbl\keepn\ql </xsl:text>

<xsl:value-of select=”EmpName” />

<xsl:text>\cell </xsl:text>

<xsl:value-of select=”EmpAge” />

<xsl:text>\cell </xsl:text>

<xsl:if test=”EmpSex=’M'”>


<xsl:text>\cell </xsl:text>


<xsl:if test=”EmpSex=’F'”>


<xsl:text>\cell </xsl:text>


<xsl:value-of select=”EmpAddress” />

<xsl:text>\cell </xsl:text>

<!–Print Employee Department–>

<xsl:apply-templates select=”Department” />




<xsl:template match=”Department”>

<xsl:value-of select=”DeptName” />



5. In Form1.vb, add the following references

Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Text
Imports System.Windows.Forms
Imports System.Xml
Imports System.Xml.Xsl
Imports System.Xml.XPath
Imports System.IO

6. In Form1.cs, add a button and write the following code

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim ds As DataSet

Dim xmlDoc As XmlDataDocument

Dim xslTran As XslCompiledTransform

Dim root As XmlElement

Dim nav As XPathNavigator

Dim writer As XmlTextWriter


‘Create the DataSet from the XML file

ds = New DataSet()


‘Create the XML from the DataSet

xmlDoc = New XmlDataDocument(ds)

‘Load the XSLT for Transformation

xslTran = New XslCompiledTransform()


‘Determine the Root object in the XML

root = xmlDoc.DocumentElement

‘Create the XPath Navigator to navigate throuth the XML

nav = root.CreateNavigator()

‘First delete the RTF, if already exist

If File.Exists(“Employee.rtf”) Then


End If

‘Create the RTF by Transforming the XML and XSLT

writer = New XmlTextWriter(“Employee.rtf”, System.Text.Encoding.Default)

xslTran.Transform(nav, writer)

‘Close the Writer after Transformation


‘Release all objects

writer = Nothing

nav = Nothing

root = Nothing

xmlDoc = Nothing

ds = Nothing

MessageBox.Show(“Document created successfully…..”)

Catch ex As Exception

writer = Nothing

nav = Nothing

root = Nothing

xmlDoc = Nothing

ds = Nothing


End Try

End Sub

7. Compile and run the program.


How to update MS.NET Classifieds Starter kit Template in VS2005?

I installed Classifieds Starter Kit Beta Version before. Today I just found there was a Final version come out. I downloaded the new one and double clicked the .vsi file and installed. But later I found there are two Classifieds Starter Kit templates and their names are the same in my VS 2005.

So, how can I delete the old template?


1: Although I cannot delete a template I can offer a work around. The “final” version of the template creates tables that begin with “classified_” (e.g. “classifieds_Ads” and “classifieds_Location”). In may case the second download was listed after the first one in the template list. Create a new site using the second entry and check to make sure that the files have the “classifieds_” prefix.

2: I was able to delete the beta starter kit by deleting the zip file in C:\Documents and Settings\Jim\My Documents\Visual Studio 2005\Templates\ProjectTemplates\Visual Web Developer. There will be one with the “class-final” name — that is the one you want to keep.
(must delete the template .zip files phasically and must delete the files under both C# and VB.net folder,It is valid if you just moving, changing the template files )

Move my PHPBB2 forum to other server

I have a forum named www.sametopic.com/forums/ based on PHPBB 2. I have made many changes and improvement on the original PHPBB 2.0.20 code and added many MOD.

Now I would build another forum , and I don’t want to modify a lot of things on PHPBB 2 code, so I want to duplicate my SameTopic.com forum to the new one, and I want to create the new forum just in the same Godaddy hosting accout as my SameTopic.com forum.

Fortunately, Godaddy provide up to 25 Mysql databases to the customers then I got to create a new database easily. the next, what I should do is ‘Copy’ the old datas to the new database and copy all php files from sametopic folder to the new folder for the new forum.

Please read my detail steps, my new forum works well at present:

1: login to OLD mysql database by your OLD database login info in phpMyAdmin 2.7.0-pl2

provided by godaddy

2: Click ‘Databases’ on the right frame (Don’t select ‘Export’ directly), select database

name such as ‘dbsametopic’;

3: Click ‘Check All’ to select all tables;

4: Click ‘Export’ on the top ;

5: You will now get a screen with quite a few options. Select the options listed below for

the least amount of incompatibility:


Complete insertsExtended inserts
Export Type: INSERT
Save as file (with newer versions you can also choose a name, whatever you like).

Then create a SQL file on your computer as your specified folder;

6: Create a NEW mysql database on your Godaddy account;

7: Login to the NEW mysql database management (phpMyAdmin 2.7.0-pl2 ) ;

8: Click ‘SQL’ on the top in the right frame;

9: Open the previously mentioned SQL file by some text editor tool such as Notes or EmEditor

(if file is big);

10: Copy all the SQL scripts and paste to SQL query text area and click ‘Go’ button;

(If your SQL is small and not over the limited size, you can import it directly as the


8: Click ‘SQL’ icon on the left frame, you will see a popup window;

9: Select ‘Import files’ if your SQL file is not over the size on the right of ‘Browse’

button )

10: Since I just duplicate OLD database to a NEW database that exist in the same godaddy

account, and these two databases are PHPBB, and I just create two seperate sub folder for

OLD and NEW applications,so, for my case, I just modify ‘script_path’ to my new sub folder

in phpbb_config table of NEW database;
OR, if you have set others parameters such cookie_path, you can follow the fowllowing steps:

Your database is now imported successfully. But, we’re not done with phpMyAdmin after that.

We still have to edit some things. Normally, after the import, you will come back to the

same window (SQL). There, put the following SQL queries in the textarea:

UPDATE phpbb_config SET config_value = ‘domain_name_here’ WHERE config_name =

UPDATE phpbb_config SET config_value = ‘domain_name_here’ WHERE config_name = ‘server_name’;
UPDATE phpbb_config SET config_value = ‘path_to_phpBB’ WHERE config_name = ‘cookie_path’;
UPDATE phpbb_config SET config_value = ‘domain_name_here’ WHERE config_name = ‘script_path’;

Just replace the blue text with the appropriate values. Watch out with the cookie domain and

server name. You cannot include http:// or it will not work.

If you have a different table prefix (the standard is ‘phpbb_’), you may have to change that

in the commands above.

If you have verified that all info is filled in correctly, hit the “Go” button again. It

will update a few configuration settings.

11: Database part done, now you just copy files of the OLD sub foler’s to the NEW folder,

but, You have to change config.php file to your correct configration for NEW application, in

godaddy, different databases located different server, my sample is:


// phpBB 2.x auto-generated config file
// Do not change anything in this file!

$dbms = ‘mysql4’;

$dbhost = ‘mysqlXXX.secureserver.net’;
$dbname = ‘myNewdbName’;
$dbuser = ‘myNewdbUser’;
$dbpasswd = ‘…..(MyPassword)’;

$table_prefix = ‘(new table prefix)_’;

define(‘PHPBB_INSTALLED’, true);


12: Now you can try to visit your new subfolder and see everything works, but only some data

s got strange show (very few, this because the bug of phpMyAdmin 2.7.0-pl2 and my forum is

UTF-8 encode,don’t matter I don’t care)

support content provided by other people:

That was it for phpMyAdmin. You can now consider your database ready to go. All you need to

do now, is upload your phpBB files to the new server. So, just download them to your

computer. When done, before uploading, you will have to do one little thing. Edit

This file contains information to connect to the database and since you’re moving to another

server, you probably have new connection information.
Open the file in a plain text editor and change the values $dbhost, $dbname, $dbuser,

$dbpasswd to the appropriate ones.

Now just upload everything to your new server. If you have installed hacks like File

Attachments, Photo Albums and so forth you may have to check some file permissions. Refer to

their installation guides if you are not sure what I’m talking about (look for ‘chmod’). If

you allow avatar uploads, be sure to chmod the images/avatars directory to 777 as well. Read

the tutorials on CHMODing if you need to freshen your memory:

CHMOD File Permissions by Rapid Dr3am
CHMOD 2: Number CHMODing by Jaeboy
Windows Server File Permissions by Rapid Dr3am

Well, I guess that is that. Try accessing your forum on the new server. It should work.


About password changing in ASP.NET 2.0

Changing the Password Complexity in ASP.NET V2.0

(from: http://www.wwwcoder.com/main/parentid/258/site/5221/68/default.aspx)

One of the first things many people try with ASP.NET V2.0 (currently in Beta 2) and with the starter kits is to create a new user. Creating a new user will be common in ASP.NET version 2.0, whether it is the CreateUserWizard, a starter kit form or using the Membership namespace from code.

Scott Forsyth
One of the first things many people try with ASP.NET V2.0 (currently in Beta 2) and with the starter kits is to create a new user. Creating a new user will be common in ASP.NET version 2.0, whether it is the CreateUserWizard, a starter kit form or using the Membership namespace from code. Immediately following that is often a sigh of frustration when a fairly non-descriptive error occurs: “Please enter a different password.” What is that supposed to mean? Is it recommending passwords for us now and not pleased with the one we chose? Did the passwords not match? Even carefully double checking and trying again with a password that is 7 characters and has numbers and upper case and lower case letters triggers this non-descriptive error.

The issue is simply this: ASP.NET V2.0, at the time of writing, has a password complexity requirement of 7 characters and at last 1 non-alphanumeric character. For example, ‘Complex592PaSsWoRd’ isn’t complex enough. A space or a special character is required. Now, being cautious about security is one thing, but many of the V2.0 sites out there now are either test sites, personal or club starter kits or something fairly light. Personally I like to loosen the requirements somewhat, or even loosen them a lot and allow the user to determine how complex they want their password.

Fortunately there are a couple solutions and neither are too complex. The first solution obviously is to enter a more complex password. The second is to override the default complexity requirement and put in your own.

The provider that controls this is the membership provider. This is set by default in the machine.config file on the server. It can be changed at the machine.config file or overridden in the web.config file at the site level.

The two properties that control this are minRequiredPasswordLength and minRequiredNonalphanumericCharacters. They aren’t in machine.config by default in the Beta 2 timeframe. I’m not sure if there are plans to change this or not. To override it, simply add them to the <add name=”AspNetSqlMembershipProvider” /> section. The minRequiredPasswordLength property must be at least 1, while the minReqiredNonalphanumericCharacters property can be 0. Here is an example of the two lines to add which removes the requirements completely and allows the user to decide on their password. Don’t hold me accountable if you open this too much, but I give this example as the other extreme of the default settings.

Now, let’s say we want to do this at the web.config level. This is easy enough too. The gotcha is that because it already exists at the machine.config level, there will be a clash between the two. So, you must first “remove” the provider that is defined at the machine level and add the adjusted one back at the site level. This can all be done from your web.config file. To remove the existing one, (I’m assuming default names) you use
<remove name=”AspNetSqlMembershipProvider” />

Here is an example of a complete web.config file that could be used. If you have an existing web.config file that you want to work this into, take the section between and including <membership> and </membership> and place it in your <system.web> section.

<?xml version=”1.0″?>
<configuration xmlns=”http://schemas.microsoft.com/.NetConfiguration/v2.0″>
<remove name=”LocalSqlServer”/>
<add name=”LocalSqlServer” connectionString=”Data Source=.\SQLExpress;Integrated
Security=True;User Instance=True;AttachDBFilename=|DataDirectory|aspnetdb.mdf” />
<remove name=”AspNetSqlMembershipProvider” />
<add name=”AspNetSqlMembershipProvider”
type=”System.Web.Security.SqlMembershipProvider, System.Web, Version=,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”
passwordStrengthRegularExpression=”” />

Of course anything in my example can be adjusted however you want as long as it is within an allowed range. Take note especially of the connectionStringName which is referenced in the ConnectionString section of web.config and/or machine. config. If you changed your connection string name, then make sure to update the reference to that connection string there. Another thing to take note of is the connection string in this example. That connection string will only work if Sql Server Express is installed on the server and “user instancing” is enabled. At ORCS Web for example, we disable user instancing (because of security considerations), create a database for clients when first setting up sites, and then we provide an alternative connection string which should be used instead.

That’s it. Once you set this, you’ll be able to have a password that isn’t quite so complex. This quick example only briefly covers other considerations like the connectionStringName, user instancing, type of database used and additional properties but I hope it gives enough information to lay the foundation of managing the password complexity within ASP.NET v2.0.

Scott Forsyth is the Director of IT with ORCS Web, Inc. – a company that provides managed hosting services for clients who develop and deploy their applications on Microsoft Windows platforms.