I have got installed .NET 2.0 framework on my local machine where is my project and my webserver has got .NET framework 4.0 installed.
Please suggest what can be the risks or benefits if we go with this, as building the project on 2.0 and then deploying it on 4.0.
Thanks.
In general, .NET 4 will run .NET 2 applications fine. However, it is a different framework and a different CLR, so it is possible for results to be different.
If you know your deployment environment will be using .NET 4, I would recommend developing using .NET 4. This gives you improved features (lots of new stuff in .NET 4) as well as guarantees to the same environment in development as deployment.
Note that you can use Visual Web Developer Express (2010) for free to develop .NET 4 applications to match your webserver.