My Windows Form Application NOT starting due to System.Security.SecurityException. Here is code on Program.cs
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new BaseForm());
}
Stacktrace as below.
StackTrace:
System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
System.Security.CodeAccessPermission.Demand()
System.Windows.Forms.Application.add_ThreadException(ThreadExceptionEventHandler value)
MyApp._0.Program.Main()
I have no idea to solving this... Any hints are appreciated.