We have a C# DLL (let\'s call it myapp.exe) built with .NET 2.0 Framework (VS2005) and we found out that our application won\'t work on machines where only .NET
Just setting web.config to supportedRuntime version="v4.0.30319"/ is not going to be enough.
You need to actually open up your project in Visual Studio, change its target framework (properties-->build) to 4.0 - and THEN redploy the built solution to your 4.0 clients. Several system assemblies are different between 2.0 and 4.0 (system.web etc..) - although, as the previous answer suggested, backwards compatibility has been provided.
The only way to consistently provide your clients with an actuual '4.0 compatible' version, is to compile it against a 4.0 runtime. This will entail upgrading any 3rd party, open source libraries to their 4.0 versions as well.