Question: I wrote a C# application that is running well on my xp development machine.
When my client is running it on different PC, it seems to freeze on both vista and 7 machines.
I would like to know if there is any issue on running dotnet applications on vista/7.
I compiled the application for both framework 2.0 and 3.5 but it didn't help.
The log file neither doesn't help.
Is there any way to know where is the application freezing (of course, the client doesn't have VS for attaching to the application) ?
Thank you in advance for any help.

Pierre.

Answer: 
Generally, .NET application should run the same on any Windows version with .NET framework installed. Most common problem that occur are related to the new User Account Control policy in Vista and 7, which prevents applications from accessing areas requiring elevated privileges (which would otherwise run fine under an Administrator account in XP). 

For example, if your application is trying to write configuration settings to the `Program Files` folder (which is a really bad idea, btw), or is using some hardcoded disk or registry paths instead of environment variables provided in .NET classes, it may fail under Vista.

To quickly check if this is an UAC privilege problem, try to run the application as an administrator (have your client right click the .exe file and select **Run as Administrator**). If it works, then this suggests that you need to examine your code and update it to make sure you are only accessing allowed areas.

Check this link for more information: [Making apps UAC aware](http://www.codeproject.com/KB/vista-security/MakingAppsUACAware.aspx).

As [redsquare](https://stackoverflow.com/questions/3171887/c-application-is-freezing-on-vista-7-not-on-xp-2003-server/3171901#3171901) suggested, the best way to test your application in a variety of Windows systems is to run them in several virtual machines ([MS Virtual PC](http://www.microsoft.com/windows/virtual-pc/default.aspx) or [VMWare Player](http://www.vmware.com/products/player/), both of them free for download).
csharp applications are supposed to run on vista/win7. This is their home:)

Your problem is not the OS. its your application.
Most probably the application is looking for a file, a folder, something on the client side that is not there and its freezing. this is my experience.

Check for project **independencies** and make sure you have shipped to your clients everything your project needs.

and last, distribute to one client the debug version with debug messages enable and get the feedback from their system.