Getting unhandled exception in runtime
-
Hi I have a strange problem.In an application ,I have a login process and I'd like to show the progress of this process on a progress form using a progress bar and a label describing what is going on.Thus I put a progress form in my project and whenever this form is activated starts the login process and listens to a progress event that tells it to refresh the controls according to the progress. There's a LoginFailedException in my app that is thrown whenever the username and/or the password is incorrect.I've handled this exception by showing a message box.Every time I debug my project using VS2003 IDE and provide some incorrect information It works fine and shows me the message box but when I exceute the exe file directly ,an unhandled exception is thrown just like there is no exception handler available. What is wrong with my program? please help me.
-
Hi I have a strange problem.In an application ,I have a login process and I'd like to show the progress of this process on a progress form using a progress bar and a label describing what is going on.Thus I put a progress form in my project and whenever this form is activated starts the login process and listens to a progress event that tells it to refresh the controls according to the progress. There's a LoginFailedException in my app that is thrown whenever the username and/or the password is incorrect.I've handled this exception by showing a message box.Every time I debug my project using VS2003 IDE and provide some incorrect information It works fine and shows me the message box but when I exceute the exe file directly ,an unhandled exception is thrown just like there is no exception handler available. What is wrong with my program? please help me.
Hard to say, without seeing some code.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
Hard to say, without seeing some code.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
Here it is : In my login form:
private void OnOKButtonClicked() { try { this.Cursor=Cursors.WaitCursor; progressForm.Login(this.txtUsername.Text,this.txtPassword.Text) ; this.Cursor=Cursors.Default; this.Close(); } catch(LoginFailedException) { this.Cursor=Cursors.Default; MessageBox.Show("Invalid username and/or password."); } catch(Exception exp) { new ExceptionViewForm(exp).ShowDialog(); } }
In my progress from:internal static void Login(string username,string password) { progressForm frm=new progressForm() ; frm.username=username; frm.password=password; frm.ShowDialog(); } protected override void OnActivated(EventArgs e) { if(! activated) { LoginForm.engine= LoginProcess.Instance.Login(this.username,this.password); } }
-
Here it is : In my login form:
private void OnOKButtonClicked() { try { this.Cursor=Cursors.WaitCursor; progressForm.Login(this.txtUsername.Text,this.txtPassword.Text) ; this.Cursor=Cursors.Default; this.Close(); } catch(LoginFailedException) { this.Cursor=Cursors.Default; MessageBox.Show("Invalid username and/or password."); } catch(Exception exp) { new ExceptionViewForm(exp).ShowDialog(); } }
In my progress from:internal static void Login(string username,string password) { progressForm frm=new progressForm() ; frm.username=username; frm.password=password; frm.ShowDialog(); } protected override void OnActivated(EventArgs e) { if(! activated) { LoginForm.engine= LoginProcess.Instance.Login(this.username,this.password); } }
And what is the exception when it is run standalone? When you run it stand alone is it a debug or release build?
Upcoming events: * Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... * Reading: Developer Day 5 Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton My website
-
And what is the exception when it is run standalone? When you run it stand alone is it a debug or release build?
Upcoming events: * Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... * Reading: Developer Day 5 Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton My website
Hi Exception is LoginFailedException and the stand alone program has been built using debug configuration.