Alex Rivera | Logout

What would cause ANY .NET application to crash immediately... except a project I create and Debug inside Visual Studio?

Asked 2009-09-22T19:06:06.480
19

My software recently got deployed to a customer who said that the application was crashing immediately after it started. After some initial debugging, the customer provided me remote access to one of the computers which was unable to run the application. I found that the crash wasn't specific to my application. Any application which depended on the .NET framework crashed immediately.

Conveniently, Visual Studio 2008 was installed so I created a quick hello world application on it and clicked Debug. The application worked fine. But, then when I tried to execute the generated binaries in the /bin/Debug/HelloWorld.exe directory outside of visual studio it crashed.

List of things i've tried (UPDATED):

  • I checked that "Everyone" has Read&Execute permissions for c:\Windows.
  • To test that the problem was with the .NET Framework (and not my application), I attempted to download Paint .NET on to the computers. The setup frontend crashed in the same manner.
  • Performed a repair of the .NET framework as outlined in http://support.microsoft.com/kb/908077 (Boy was this fun and time consuming). No luck.
  • Installed .NET 3.5 SP1 (before it just had .NET 3.5) Note: my application targets 2.0 so I did this more as a long shot... but i learned in the process that .NET 3.5 SP1 also updates the underlying frameworks.
  • Ran Aaron Stebner's .NET Setup Verification Tool. This tool indicated that .NET was successfully installed. (I forget if i checked all the versions but at least 2.0 worked).
  • Tested some mini hello world applications which were targeted for .NET 2.0 and .NET 3.5 and both crashed in the same way.
  • Tried launching .NET apps via windbg cmd line. Doing this did allow me invoke m
Edit
Report

3 Answers

8

Based on your windbg output it looks like someone has injected a DLL into the process at process-launch, and that the injection isn't designed for whatever version of mscorwks that has been loaded. If this is a casual workstation (e.g. secretary) I would have it confiscated for MIS/IT to inspect for malware. If it is a machine sitting in a server room I would look toward the customer to perform a relocation to another machine.

I don't suspect this would happen to any other customer, and in 8 years .NET development the only thing that can (expectedly) cause the behavior you're describing is an attempt to run a .NET Application on a system with an older version of the framework installed (e.g. lack of support, results in a standard debug/cancel dialog on most versions of Windows) and that is NOT what this problem is. This is also not related to Processor Architecture, Framework Version nor SP level, it is not related to any commercial AV software, nor any commercial network-security software.

It's clearly not something in your code, and I don't see that it is something you can fix for your client. I know of no tool nor series of steps you can use to resolve this issue short of having the customer re-image the target machine. Before they do so, again, have it ghosted by MIS/IT for potential malware (specifically, malware that wouldn't be distributed through the general public.)

For related reading: http://research.microsoft.com/apps/pubs/default.aspx?id=68568

Good luck.

answered 2009-09-25T06:17:14.080
1

Had the same issue and it was fixed by using the Publish wizard. That's how I found out the target machine did not have the Visual Basic Powerpack 3.0 package installed. After installing that, it works like a charm.

answered 2010-02-11T05:30:26.660
0

There is no silver bullet fix and I do not think it is a permission issue.

Here is what I would try

  1. If it is a 64 bit machine try and switch to 32 bit mode I have seen this with 32 bit dlls trying to run in 64 bit.
  2. Create a new website on the server and run aspnet_regiis on it.
  3. Uninstall and reinstall the 2.0 and 3.5 frameworks. besure and run aspnet_regiis when complete
answered 2009-09-22T19:36:00.767

Your Answer