I have a WPF application with a form that, when launched, calls a special method in a new thread.
Private Sub TestStep1_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded Dim oThread As New Thread(AddressOf DisplayNextPicture) oThread.Start() End Sub Private Sub DisplayNextPicture() '' do stuff End Sub
This works fine on my machine, but on the client, starting a new thread throws a MissingMethodException. I'm not sure why this will happen (and, unfortunately, the client is in a remote location, so I need to debug this by slipping in the trace instructions and trial and error). This is definitely the DisplayNextPicture () method, which was not found, as I was able to determine through tracing.
The only thing I can think of is that it is related to frame level security. Are there any restrictions on starting new threads from a WPF application?
I cannot catch this exception through Application.DispatcherUnhandledException, so I cannot get any exception data or stack trace. The client receives a .NET runtime exception dialog with the following information, and this is the only way to find out the type of exception:
EventType: clr20r3 P1: testapp.exe P2: 1.0.0.0 P3: 49fa2234 P4: mscorlib P5: 2.0.0.0 P6: 471ebc5b P7: 1295 P8: 14
P9: system.missingmethodexception
Please, help:)
Keith
source share