ASP.net Version Test Script
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


Leave a Reply