title: Determine Asp.net version of the web application deployed in IIS server with multiple .net framework versions
body: <p>Need to find which .net version is used by web application after its deployed in IIS server with multiple .net framework versions installed in it</p>
  <p>My Asp.net web application is compiled with target framework 4.0 and deployed in IIS 10 server. In IIS server, application pool is configured to run with CLR version 4.0.30319.</p>
  <p>In the Deployment server, .net framework 4.0 to 4.6.2 is installed. Found this from regedit.</p>
  <p>In this case, how to find if the web application is running under the 4.0 framework or 4.6.2 framework ?</p>
  <p>While printing the environment.version property in aspx page of the web app, the version displayed is 4.0.30319.42000.</p>
  <p>(<a href="https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed</a>  &quot;Microsoft Version Detection Link&quot;)</p>
  <p>According to the above Microsoft link, 4.0.30319.42000 means .net framework version is 4.6 or above.</p>
  <p>However, as per above link, environment.version property is not supposed to be used to identify the .net framework version post 4.5 series.</p>
  <p>Hence confused how to find out the framework version under which web application is running ? Does it run with latest .net framework version ?  Any property or official method to find this.</p>
  <p>Intention is to migrate the web application to run with latest target framework if it's running currently below 4.5.1 version as these are not officially supported.</p>
  <p>Sorry for the long post but couldn't explain in less words.</p>