Server Application Unavailable

Many a time while developing a web application you may come accross “Server application unavailable”


When you get this error in Windows XP make sure you have given ASPNET user sufficient rights on your physical application folder, it mainly requires read permission.

When you get this error in Windows 2003 server you can right click your virtual directory – permission – grant aspnet user sufficient rights there.

If the above solution doesn’t work here is another alternative,

You could try editing the Machine.config (located in
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFI G\).

Look for a key userName=”machine”. If you set it to “SYSTEM”
instead the aspnet_wp.exe runs with a different user (with
higher privileges).

Hope this helps

Validating html tags in textbox – Cross site scripting

Following is the code to validate any textbox or input text against html tags.

//source and args are required if calling from custom validator in else its not required
function htmlValidation(source,args) 
var re = /(<([^>]+)>)/gi;

if (document.getElementById(’<%=TextBox2.ClientID%>’).value.match(re)) {
document.getElementById(’<%=TextBox2.ClientID%>’).value = “”;
alert(’Invalid content’);
//args.IsValid = false; // you can use this if you are calling this from custom validator in
return false;
if (document.getElementById("textboxid").value.match(re)) {
document.getElementById("textboxid").value = “”;
alert(’Invalid content’);
return false;
return true;