Fix - Vsphere Client System.Reflection.TargetInvocationException

The Windows Server 2003 x64 workstation I was using for the vSphere 4.1 client recently stopped working. Was working fine for quite awhile, but recently I had installed and demo'd a few various software packages. I tried the usual uninstall and reinstall without success.

Thought it was most likely a .NET issue (aren't they usually?) and ripped all that off and tried again. Still the client would load, but the main panel would not display correctly. Started digging through the vSphere client logs in C:\Documents and Settings\username\Local Settings\Application Data\VMware\vpx and found this error:

[viclient:Error :M:16] 2011-03-03 17:01:01.028 System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.

Some back and forth with VMware technical support did not make any progress. A rebuild / repair was not really an option and I had another workstation I could use for the vSphere client for now. Eventually this thread was discovered:

http://communities.vmware.com/thread/279463

I looked up what the "nx" option specified did. "Enables, disables, and configures Data Execution Prevention (DEP), a set of hardware and software technologies designed to prevent harmful code from running in protected memory locations." Sounded plausible so I followed the instructions for disabling DEP for an individual program from Microsoft and selected the vpxclient.exe program.

Problem solved... no reinstall of vSphere or Reboot needed.