I have a Winform App that I deploy with ClickOnce that installs and works for me(my UserLogin) on any system in our Domain but will not start up for a regular Domain User.
It doesn't produce any errors of any kind just sits there indefinitely. It used to work and I am at a loss as to what changed that it doesn't work now.
I am at a complete loss as to what to look for. I tried taking a DomainUser and elevating them to DomainAdmin(like me) but nothing changed. I know this is a little vague but I am looking for any insight people might have on this.
How to Troubleshoot?
Where should I be looking?
Anything will be appreciated.
I found what is causing the "hang" I just still do not understand why.
try
{
HUD.CurrentUserRole = new ConnectBLL.BLL.RoleAccess(HUD.CurrentUser);
sbrHUD_SecureRole.Text += " " + HUD.CurrentUserRole.RoleDescription;
}
catch (Exception exception)
{
exception.LogError(this);
}
My test user, Malcolm Reynolds, does not HAVE a role returned by RoleAccess(). What I do not understand is why it is hanging there vs throwing an error.
LogError
is an extension method that emails the exception to my Mailbox and displays the error in a more User Friendly way.
public static void LogError(this Exception exception, DevExpress.XtraEditors.XtraForm whichForm)
{
var fileName = GetDesktopImage(whichForm);
SendExceptionMail(exception, fileName);
ExceptionMessageBox box = new ExceptionMessageBox(exception);
box.Show(whichForm);
}
private static void SendExceptionMail(Exception exception, String fileName)
{
try
{
SmtpClient smtpClient = new SmtpClient("WWCMAIL");
var innerExceptionMessage = String.Empty;
if (exception.InnerException != null)
{
innerExceptionMessage = exception.InnerException.Message;
}
var stackTrace = exception.StackTrace;
var source = exception.Source;
MailMessage message = new MailMessage
{
From = new MailAddress("[email protected]"),
Subject = Environment.UserName + ": MATRIX Application Error",
Body =
"***THE EXCEPTION***\n" + exception.Message + "\n\n***THE INNER EXCEPTION***\n" +
innerExceptionMessage + "\n\n***THE STACK TRACE***\n" + stackTrace + "\n\n***THE SOURCE***\n" + source
};
Attachment attachment = new Attachment(fileName);
message.Attachments.Add(attachment);
message.To.Add("[email protected]");
message.To.Add("[email protected]");
smtpClient.Send(message);
}
catch
{
}
}