Common ASP.NET Problems (together in one post)

February 12, 2008

1.  You have IIS and ASP.NET 1.1 running OK. Now you want to run ASP.NET 2.0 for one webfolder with 1.1 running remaining site. You started getting “Failed to access IIS metabase”.

Solution :  Run aspnet_regiis in asp.net 2.0 folder

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727> aspnet_regiis -ga ASPNET

Then reset IIS

2.  How to Validate People Name

Using Regular Expression Validator and expression is  ^[a-zA-Z”-‘\s]{1,60}$

Full code of validator is as follows:

<asp:RegularExpressionValidator ID=”Regularexpressionvalidator1″ runat=”server” Display=”Dynamic” ControlToValidate=”txtName” ErrorMessage=”Invalid Name.” ValidationExpression=”^[a-zA-Z”-‘\s]{1,60}$”></asp:RegularExpressionValidator>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: