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>