how to determine .NET framework version

  • Thread starter Thread starter Vaclav Jedlicka
  • Start date Start date
V

Vaclav Jedlicka

Hi
I created an ASP.NET app. How can I figure out if it uses ver. 1.0 or 1.1?
Both of them are installed on my box.
Thanks
Vaclav
 
Someone glued this to the end of another thread...............I've not tried
it.

switch(System.Environment.Version.ToString())
{
case "1.0.3705.000" :
{
Response.Write(" (.NET 1.0)");
break;
}
case "1.0.3705.209" :
{
Response.Write(" (.NET 1.0 SP1)");
break;
}
case "1.0.3705.288" :
{
Response.Write(" (.NET 1.0 SP2)");
break;
}
case "1.0.3705.6018" :
{
Response.Write(" (.NET 1.0 SP3)");
break;
}
case "1.1.4322.573" :
{
Response.Write(" (.NET 1.1)");
break;
}
case "1.1.4322.2032" :
{
Response.Write(" (.NET 1.1 SP1)");
break;
}

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director
 
Query System.Environment.Version

System.Environment.Version.ToString() returns the version number.




Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================
 
Thank you for your response.

One more question:

How can I specify which version I prefer the app to use?
Or how does IIS decide which one will be used (if both of them are
installed)?

Vaclav
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top