views:

76

answers:

1

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
        {
        }
    }
+1  A: 

Paladin, you will have to diagnose it a little better. And then you might find it by yourself. So I take the question to be: "How to find out what's happening?"

  1. Eliminate some probable courses. Re-install (for and by the domain user). You did not try to run what was installed for (by) another user, did you?

  2. Find the (slightly hidden) install folder and verify all your assemblies are there.

  3. Did the app load at all? Use TaskManager.

  4. If it loads, start adding diagnostic logging with Sytem.Diagnostics.Debug.Print(). You can watch the output in DebugView.

Henk Holterman
Thanks, I used a variation of your suggestion to figure out what was wrong though I still have no idea why.... :)
Refracted Paladin