Hello everyone,
If the app.config format is wrong, for example, not a correct format XML file, application will fail from loading. Are there any ways to let me know such issue -- for example, receiving some events (so that I could write file log and event log to record this issue) if app.config loads error because of a mal-formatted XML file?
thanks in advance, George
My code and app.config looks like this, but no exception is thrown.
class Program
{
public static void MyEventHandler(object sender, EventArgs e)
{
return;
}
static void Main(string[] args)
{
AppDomain currentDomain = AppDomain.CurrentDomain;
currentDomain.UnhandledException += MyEventHandler;
return;
}
}
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configuration>