Reputation: 46663
I have a .NET Winforms app written in C# which works everywhere but on one particular machine. On that machine it dies without ever starting. There is no error message, but the following is written to the event log:
Type: Error
Source: .NET Runtime 2.0 Error Reporting
Description: Faulting application myapp.exe, version 4.2.0.0, stamp 4bcf05d0, faulting module kernel32.dll, version 5.2.3790.4480, stamp 49c51f0a, debug? 0, fault address 0x0000bef7.
There doesn't seem to be anything odd about that machine - it is one of a number of clones created with VSphere, and doesn't exhibit any other issues. The other clones run my app without any problem. It is Windows Server 2003 SP2 with .NET Framework 3.5 SP1, running Citrix, which was reinstalled after the clone to take the new name (as were the other clones).
Any advice on how to diagnose or trap the issue?
Also, I am soon going to release a new version of my app, is there anything I can do to the new version to give more information on this kind of problem?
EDIT: Thank you all for your answers, unfortunately the sysadmins for the machine decided to just rebuild it from scratch, and the problem went away. So I'll probably never know what the problem was.
Upvotes: 4
Views: 1094
Reputation: 52528
Is your MyApp.Exe.Config a correct XML file? Open it in Visual Studio, and see if there are any errors against the XML format.
Upvotes: 0
Reputation: 63264
Install Debugging tools for Windows on that machine, and use WinDbg to launch your application. Then it should tell what exceptions happen.
Upvotes: 5
Reputation: 918
If the error is related to environment (such as missing assembly) then the app will not reach a point where you can trap & log it.
I would create a new console application and then load such app into new AppDomain and run it with ExecuteAssembly. If the errors are .NET exceptions you will be able to catch them and write to a console window.
Upvotes: 1