Home All Groups Group Topic Archive Search About

WindowsForm Exception

Author
28 Jun 2005 2:50 PM
Amjad
I wrote a WindowsForms application and I compiled, installed, and run it on
my computer without any problems. When I install it on another computer that
doesn't have VS.NET installed I get the following error message immediately
after I double-click on its icon:

"MyApp.exe - Common Language Runtime Debugging Services
Application has generated an exception that could not be handled.
Proess id=0x884(2180), Thread id=0xb14(2386).
Click Ok to terminate the application.
Click CANCEL to debug the application.
"

The dot Net Framework is installed on all my computers and I have other
applications that I wrote before working fine on this computer. The problem
is I don't know where to look for the cause of this problem and since I don't
have a "Registered JIT debugger" on the machine in question I can't
troubleshoot it there.

I tried to add in the "Form_Load" event something like: 'Msgbox ("Test")' to
see if my application reaches the Form_Load stage before it generates the
error. And it never showed that message box. So I'm assuming the exception
occurs even before that!

Does any one know how we can troubleshoot/debug in this situation?

Author
28 Jun 2005 3:31 PM
Chris
Amjad wrote:
Show quoteHide quote
> I wrote a WindowsForms application and I compiled, installed, and run it on
> my computer without any problems. When I install it on another computer that
> doesn't have VS.NET installed I get the following error message immediately
> after I double-click on its icon:
>
> "MyApp.exe - Common Language Runtime Debugging Services
> Application has generated an exception that could not be handled.
> Proess id=0x884(2180), Thread id=0xb14(2386).
> Click Ok to terminate the application.
> Click CANCEL to debug the application.
> "
>
> The dot Net Framework is installed on all my computers and I have other
> applications that I wrote before working fine on this computer. The problem
> is I don't know where to look for the cause of this problem and since I don't
> have a "Registered JIT debugger" on the machine in question I can't
> troubleshoot it there.
>
> I tried to add in the "Form_Load" event something like: 'Msgbox ("Test")' to
> see if my application reaches the Form_Load stage before it generates the
> error. And it never showed that message box. So I'm assuming the exception
> occurs even before that!
>
> Does any one know how we can troubleshoot/debug in this situation?

Just a shot in the dark but you could be getting a security exception.
Try to full trust the assembly and see if that helps.

Chris
Author
28 Jun 2005 5:42 PM
Amjad
It's already set to Full Trust, and I'm still getting the same
non-informative error message.

Any other ideas?


Show quoteHide quote
"Chris" wrote:

> Amjad wrote:
> > I wrote a WindowsForms application and I compiled, installed, and run it on
> > my computer without any problems. When I install it on another computer that
> > doesn't have VS.NET installed I get the following error message immediately
> > after I double-click on its icon:
> >
> > "MyApp.exe - Common Language Runtime Debugging Services
> > Application has generated an exception that could not be handled.
> > Proess id=0x884(2180), Thread id=0xb14(2386).
> > Click Ok to terminate the application.
> > Click CANCEL to debug the application.
> > "
> >
> > The dot Net Framework is installed on all my computers and I have other
> > applications that I wrote before working fine on this computer. The problem
> > is I don't know where to look for the cause of this problem and since I don't
> > have a "Registered JIT debugger" on the machine in question I can't
> > troubleshoot it there.
> >
> > I tried to add in the "Form_Load" event something like: 'Msgbox ("Test")' to
> > see if my application reaches the Form_Load stage before it generates the
> > error. And it never showed that message box. So I'm assuming the exception
> > occurs even before that!
> >
> > Does any one know how we can troubleshoot/debug in this situation?
>
> Just a shot in the dark but you could be getting a security exception.
> Try to full trust the assembly and see if that helps.
>
> Chris
>
Author
28 Jun 2005 7:42 PM
Chris
Amjad wrote:
Show quoteHide quote
> It's already set to Full Trust, and I'm still getting the same
> non-informative error message.
>
> Any other ideas?
>
>
> "Chris" wrote:
>
>
>>Amjad wrote:
>>
>>>I wrote a WindowsForms application and I compiled, installed, and run it on
>>>my computer without any problems. When I install it on another computer that
>>>doesn't have VS.NET installed I get the following error message immediately
>>>after I double-click on its icon:
>>>
>>>"MyApp.exe - Common Language Runtime Debugging Services
>>>Application has generated an exception that could not be handled.
>>>Proess id=0x884(2180), Thread id=0xb14(2386).
>>>Click Ok to terminate the application.
>>>Click CANCEL to debug the application.
>>>"
>>>
>>>The dot Net Framework is installed on all my computers and I have other
>>>applications that I wrote before working fine on this computer. The problem
>>>is I don't know where to look for the cause of this problem and since I don't
>>>have a "Registered JIT debugger" on the machine in question I can't
>>>troubleshoot it there.
>>>
>>>I tried to add in the "Form_Load" event something like: 'Msgbox ("Test")' to
>>>see if my application reaches the Form_Load stage before it generates the
>>>error. And it never showed that message box. So I'm assuming the exception
>>>occurs even before that!
>>>
>>>Does any one know how we can troubleshoot/debug in this situation?
>>
>>Just a shot in the dark but you could be getting a security exception.
>>Try to full trust the assembly and see if that helps.
>>
>>Chris
>>

Try to wrap the entire program in a try... catch block.  Start the
program in a module and do:

sub main
try
    dim F as new Form1
    Application.Run(F)
catch ex as exception
    messagebox.show(ex.description)
end try
end sub

This may help you get a better idea what the error is.

Chris
Author
29 Jun 2005 1:52 PM
Amjad
Thanks Chris. That was a good idea.

The problem was one of the DLLs I used had the "Exclude" property set to
False for some reason!

Everything seems to be fine again now :)


Show quoteHide quote
"Chris" wrote:

> Amjad wrote:
> > It's already set to Full Trust, and I'm still getting the same
> > non-informative error message.
> >
> > Any other ideas?
> >
> >
> > "Chris" wrote:
> >
> >
> >>Amjad wrote:
> >>
> >>>I wrote a WindowsForms application and I compiled, installed, and run it on
> >>>my computer without any problems. When I install it on another computer that
> >>>doesn't have VS.NET installed I get the following error message immediately
> >>>after I double-click on its icon:
> >>>
> >>>"MyApp.exe - Common Language Runtime Debugging Services
> >>>Application has generated an exception that could not be handled.
> >>>Proess id=0x884(2180), Thread id=0xb14(2386).
> >>>Click Ok to terminate the application.
> >>>Click CANCEL to debug the application.
> >>>"
> >>>
> >>>The dot Net Framework is installed on all my computers and I have other
> >>>applications that I wrote before working fine on this computer. The problem
> >>>is I don't know where to look for the cause of this problem and since I don't
> >>>have a "Registered JIT debugger" on the machine in question I can't
> >>>troubleshoot it there.
> >>>
> >>>I tried to add in the "Form_Load" event something like: 'Msgbox ("Test")' to
> >>>see if my application reaches the Form_Load stage before it generates the
> >>>error. And it never showed that message box. So I'm assuming the exception
> >>>occurs even before that!
> >>>
> >>>Does any one know how we can troubleshoot/debug in this situation?
> >>
> >>Just a shot in the dark but you could be getting a security exception.
> >>Try to full trust the assembly and see if that helps.
> >>
> >>Chris
> >>
>
> Try to wrap the entire program in a try... catch block.  Start the
> program in a module and do:
>
> sub main
> try
>     dim F as new Form1
>     Application.Run(F)
> catch ex as exception
>     messagebox.show(ex.description)
> end try
> end sub
>
> This may help you get a better idea what the error is.
>
> Chris
>