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
tags: .Net, ASP.Net, asp.net 1.1, asp.net 1.1 server error, IIS, server unavailable, Virtual Directory Error, vs.netThe .Net Framework has a feature called Shadow Copy.
Shadow copy is enabled on every appdomain created by ASP.NET by default. By default assemblies loaded will be copied to a shadow copy cache directory, and will be used from that location.
But this may create problem sometimes.
tags: .Net, ASP.Net, Cache, Hosting Environment, Shadow Copy, web.configThe following code snippet will help you to catch an error in the global.asax file,
Turn off the custom error mode in web.config file first,
<customErrors mode="Off">
And add this code in your global.asax file to catch the error,
void Application_Error(object sender, EventArgs e)
{
HttpContext context = ((HttpApplication)sender).Context;
if (context.Error != null)
{
Exception ex = context.Error;
string msg = string.Empty;
while (ex != null)
{
if (!string.IsNullOrEmpty(ex.Message))
msg += ex.ToString() + "<br /><br />";
ex = ex.InnerException;
}
context.Response.Clear();
context.Response.Write(msg);
context.Response.End();
}
}
Hope this helps