ASP.net Version Test Script

Bookmark and Share

Here’s a little script that we have used over and over again that will display the version of ASP.net that is running on a web server.  This script has been particularly useful when working with virtual hosts. 

Copy and paste the following code into a file (example: test.aspx) and upload to the webserver.

<%@ Page Language=”VB” %>

<script runat=”server”>
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
        
        lblASPDOTNETVersion.Text = “This server is running ASP.NET version: ” & _
         System.Environment.Version.ToString()

    End Sub
</script>

<html>
<head>
    <title>Test ASP.NET Version:</title>
</head>
<body>
    <form id=”form1″ runat=”server”>
        <asp:Label ID=”lblASPDOTNETVersion” runat=”server”></asp:Label>
    </form>
</body>
</html>

The output should be something similar to:

 This server is running ASP.NET version 1.1.4322.2032

One Response to “ASP.net Version Test Script”

  1. [...] virtualhost Configuring Apache Virtualhost for Virtualbox Saved by whatjasay on Sun 29-3-2009 ASP.net Version Test Script Saved by projektrevolution on Sun 22-3-2009 Instalei o Passenger, vulgo mod_rails :D Saved by [...]

Leave a Reply

Security Code:

129 Web Design · PO Box 18207 · Portland, Maine 04112