Home All Groups Group Topic Archive Search About

how to determine .NET framework version

Author
10 Jun 2005 6:51 AM
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

Author
10 Jun 2005 10:12 AM
John Timney (ASP.NET MVP)
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

Show quoteHide quote
"Vaclav Jedlicka" <no@spam.please> wrote in message
news:uP%23IykYbFHA.2936@tk2msftngp13.phx.gbl...
> 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
>
>
Are all your drivers up to date? click for free checkup

Author
10 Jun 2005 1:39 PM
Vaclav Jedlicka
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

Show quoteHide quote
"John Timney (ASP.NET MVP)" <timneyj@despammed.com> wrote in message
news:OIpQpUabFHA.3524@tk2msftngp13.phx.gbl...
> 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
>
> "Vaclav Jedlicka" <no@spam.please> wrote in message
> news:uP%23IykYbFHA.2936@tk2msftngp13.phx.gbl...
> > 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
> >
> >
>
>
Author
10 Jun 2005 2:04 PM
Juan T. Llibre
You can use the command tools included with aspnet_regiis.exe
or, far easier, use Denis Bauer's ASP.NET Version Switcher:

http://www.denisbauer.com/NETTools/ASPNETVersionSwitcher.aspx



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

Show quoteHide quote
"Vaclav Jedlicka" <no@spam.please> wrote in message
news:uMiCRIcbFHA.3620@TK2MSFTNGP09.phx.gbl...
> 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
>
> "John Timney (ASP.NET MVP)" <timneyj@despammed.com> wrote in message
> news:OIpQpUabFHA.3524@tk2msftngp13.phx.gbl...
>> 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
>>
>> "Vaclav Jedlicka" <no@spam.please> wrote in message
>> news:uP%23IykYbFHA.2936@tk2msftngp13.phx.gbl...
>> > 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
>> >
>> >
>>
>>
>
>
Author
10 Jun 2005 11:07 AM
Juan T. Llibre
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...
======================

Show quoteHide quote
"Vaclav Jedlicka" <no@spam.please> wrote in message
news:uP%23IykYbFHA.2936@tk2msftngp13.phx.gbl...
> 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
>
>

Bookmark and Share