Click here to Skip to main content
15,906,628 members
Home / Discussions / C#
   

C#

 
AnswerRe: Delegates Pin
Robert Rohde11-Apr-06 8:48
Robert Rohde11-Apr-06 8:48 
QuestionShow tray app context menu on left-click? Pin
rickell11-Apr-06 7:54
rickell11-Apr-06 7:54 
AnswerRe: Show tray app context menu on left-click? Pin
Stefan Troschuetz11-Apr-06 22:12
Stefan Troschuetz11-Apr-06 22:12 
GeneralRe: Show tray app context menu on left-click? Pin
rickell18-Apr-06 4:13
rickell18-Apr-06 4:13 
GeneralRe: Show tray app context menu on left-click? Pin
Stefan Troschuetz18-Apr-06 23:29
Stefan Troschuetz18-Apr-06 23:29 
QuestionNeeds some help with hit testing Pin
truly_pringled11-Apr-06 7:19
truly_pringled11-Apr-06 7:19 
AnswerRe: Needs some help with hit testing Pin
_Bao_11-Apr-06 22:47
_Bao_11-Apr-06 22:47 
QuestionApplication exits unexpectedly and without errors Pin
Ricardo Mendes11-Apr-06 7:00
Ricardo Mendes11-Apr-06 7:00 
Hi. I'm trying to solve a very strange problem. I have a windows forms application that makes calls to a web service. When the web service method is invoked, it is executed without exceptions on the web service side. When this method returns, the application exits without exceptions. It simply closes with error 0 (success).
Other methods of the webservice are called before this problematic method without problems.

Another strange behaviour: if I am debugging the application, it ends on the initialization when I call the problematic webservice method. But if I run the executable itself (without debugging), the application starts (the problematic method works) but it fails on another webservice method invoked on a button click.

The windows forms application looks like this:

public void Main()
{
try
{
webService.NormalMethod1();
webService.NormalMethod2();
webService.ProblematicMethod1(); //returns a DataSet with one table and one row
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString());
}
}

private void button_Click(object sender, EventArgs e)
{
try
{
webService.NormalMethod3();
webService.ProblematicMethod2(); //returns a string
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString());
}
}

As I said, if I am debugging, after the webService.ProblematicMethod1() method is called the application ends. If I run the executable itself webService.ProblematicMethod1() works and when the button is clicked, webService.ProblematicMethod2() makes the application terminate. In both cases, the catch block is never reached (the MessageBox is never shown). I've created a event handler for the Application.ThreadException event but it is never invoked.

The windows application also communicates with mobile devices through ActiveSync. The described problem only occurs when devices running Windows Mobile 5.0 are connected. It works fine with older devices. In my point of view, the PDA should not affect the windows application since what's involved in this piece of code is only the web service.

I don't know what to do and I need to solve this problem as soon as possible. Any suggestions will be greatly appreciated.

Thanks
AnswerRe: Application exits unexpectedly and without errors Pin
_Bao_11-Apr-06 22:37
_Bao_11-Apr-06 22:37 
GeneralRe: Application exits unexpectedly and without errors Pin
Ricardo Mendes12-Apr-06 1:32
Ricardo Mendes12-Apr-06 1:32 
GeneralRe: Application exits unexpectedly and without errors Pin
_Bao_12-Apr-06 3:15
_Bao_12-Apr-06 3:15 
QuestionServer.MapPath() and AJAX Pin
Canastro11-Apr-06 6:58
Canastro11-Apr-06 6:58 
AnswerRe: Server.MapPath() and AJAX Pin
Judah Gabriel Himango11-Apr-06 11:13
sponsorJudah Gabriel Himango11-Apr-06 11:13 
QuestionC# timers Pin
zotdoc11-Apr-06 6:33
zotdoc11-Apr-06 6:33 
AnswerRe: C# timers Pin
leppie11-Apr-06 7:05
leppie11-Apr-06 7:05 
GeneralRe: C# timers Pin
zotdoc11-Apr-06 9:19
zotdoc11-Apr-06 9:19 
AnswerRe: C# timers Pin
Steve Maier11-Apr-06 8:07
professionalSteve Maier11-Apr-06 8:07 
GeneralRe: C# timers Pin
zotdoc11-Apr-06 9:21
zotdoc11-Apr-06 9:21 
GeneralRe: C# timers Pin
zotdoc11-Apr-06 9:34
zotdoc11-Apr-06 9:34 
QuestionGetting the parent window of the ToolStripMenuItem Pin
zaboboa11-Apr-06 6:06
zaboboa11-Apr-06 6:06 
AnswerRe: Getting the parent window of the ToolStripMenuItem Pin
_Bao_11-Apr-06 6:28
_Bao_11-Apr-06 6:28 
QuestionAccessing Outlook in C# Pin
ChuckBurris11-Apr-06 5:42
ChuckBurris11-Apr-06 5:42 
QuestionPassing objects as parameters Pin
adol_w11-Apr-06 5:11
adol_w11-Apr-06 5:11 
AnswerRe: Passing objects as parameters Pin
J4amieC11-Apr-06 5:16
J4amieC11-Apr-06 5:16 
QuestionRe: Passing objects as parameters Pin
adol_w11-Apr-06 5:40
adol_w11-Apr-06 5:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.