|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
how to determine .NET framework versionHi
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; } -- Show quoteHide quoteRegards 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 > > 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 > > > > > > 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 >> > >> > >> >> > > 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 > >
Other interesting topics
ASP.NET tells me my table doesn't have a primary key
Session State stateserver or Sql Server Did I do this correctly? - Display resized image from DB. <Head>Tag PostBack problem Does CompareValidator work for the date in dd-mmm-yyyy format? Munging URLs to store data OnPreRender ??? What is ? Render and get html from usercontrol 2.0 App-Code Folder Support for 'Code-Behind' |
|||||||||||||||||||||||