ASP.NET Version

  • Thread starter Thread starter David E.
  • Start date Start date
D

David E.

When ever ASP.NET spits up an unhandled excpetion, at the
bottom of the error page is both the .NET version and
ASP.NET version.

This isn't always the same on some of my test systems.

I know that I can programatically get the .NET version
from System.Environment.Version.ToString().

My question is how can I get the ASP.NET version
programatically.

Any help would be greatly appreciated.
 
If you go into IIS settings for a particular web site, you can look at the
application mappings for each file type, pick one of the ASP.NET file types
(aspx being an obvious choice) and the version number will be in the path to
this executable.
 
And how is this done programatically in c# from a web
page. I want to display this information on a web page.
 
Um ... you already said how you do that.
System.Environment.Version.ToString(). The aspnet_isapi loads up the
specified version of the runtime. If you don't believe what that is telling
you, System.Web.HttpRuntime.ClrInstallDirectory will give you the full path
to the runtime version, and you can parse the version number off of the end.
 
Back
Top