Reputation: 9599
I have a web server that is run by a third party. I don't have direct access to the server but I can deploy ASP.NET code to it. I want to detect if that server is running ASP.NET 4 / .NET 4 or not. What is the easiest way to do that? Is there an environmental property somewhere that would tell me? Or should I try to load a particular class that only exists in .NET 4?
Upvotes: 6
Views: 254
Reputation: 19476
http://msdn.microsoft.com/en-us/library/system.environment.version.aspx
Upvotes: 2