I am trying to install a program on another machine besides the developer. I keep getting the unhandled exception error whenever I try to start it. Runs fine on the development box. The other pc has .NET framework 1.1, MDAC 2.8. I've set the Security to Full Trust of the Intranet (it accesses a db) and localhost, as well as granting full trust to the assembly with the Wizard. I still cant' get it to work. Is there anything else to do on the new machine
Also, is there any other way to catch errors vice the thread, and is it possible that the error is being thrown before my form even loads How could I catch an error before the form loads
Thanks for the help.
Mark F
Houston, TX
I've added an exception handler to try and catch the error with the following code, but no go.
Private Sub frmMain_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
AddHandler _
Application.ThreadException, New ThreadExceptionEventHandler(AddressOf Me.HandleExp)
myData.Fill(DsPlate)
btnNext.Visible = False
btnEndSpec.Visible = False
btn1.Visible = False
btn2.Visible = False
End Sub
Public Sub HandleExp(ByVal Sender As Object, ByVal t As _
ThreadExceptionEventArgs)
' Treat the exception
MsgBox("Unhandled Exception:" + _
vbCrLf + t.Exception.Message)
End Sub

Unhandled Exception when running on another machine
MBiere
Something like:
Public Class Form1
<STAThread()> Shared Sub Main()
Try
Application.Run(new Form1())
Catch ex As Exception
MessageBox.Show(ex.Message & "\n" & ex.Source & "\n" ex.TargetSite & _
"\n" & ex.StackTrace, "Error")
End Try
End Sub
End Class
My VB.NET is a bit poor so there is surely some syntax errors in this exampel but I guess u get the idea :)
Aaron Whitney
If someone has some code for a "Universal" handler that gives me detailed messages I'd sure appreciate it.
Thanks.
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
Try
InitializeComponent()
Catch
Dim EX As exception
MessageBox.Show(EX.ToString + " Component Initialization Failed", "Form Initialization Failure", MessageBoxButtons.OK, _
MessageBoxIcon.Warning)
End Try
GrahamWilliams
I really appreciate the assist. This one has got me stumped.
Again, thanks for the help.
Mark F.
Houston, TX
SmileMrk
Thanks,
-Dinesh Chandnani