Вы можете записать причину перезапуска в методе Application_End файла Global.asax.cs, я использую этот код:
protected void Application_End(object sender, EventArgs e)
{
HttpRuntime runtime = (HttpRuntime)typeof(System.Web.HttpRuntime).InvokeMember("_theRuntime", BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.GetField, null, null, null);
string shutDownMessage = "";
if (runtime != null)
{
shutDownMessage = Environment.NewLine + "Shutdown: " +
(string)runtime.GetType().InvokeMember("_shutDownMessage", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.GetField, null, runtime, null) +
Environment.NewLine + "Stack: " + Environment.NewLine +
(string)runtime.GetType().InvokeMember("_shutDownStack", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.GetField, null, runtime, null);
}
}