jacksonakj
jacksonakj

Reputation: 882

How can I programatically detect ASP.NET 3.5?

I am creating a diagnostic page for ASP.NET and would like to programatically detect if ASP.NET 3.5 has been installed on the server. Any ideas on how to best do this?

Upvotes: 0

Views: 288

Answers (1)

RuudKok
RuudKok

Reputation: 5302

System.Environment.Version gives you the CLR version.
For ASP.NET 2.0, 3.0 and 3.5 it will return the same CLR version: 2.0.50727.3053
As for ASP.NET 4.0 the CLR version will change to 4.*

Upvotes: 1

Related Questions