Testing the ASP.NET Installation, and Show Version

If there's a version of the .NET Framework present (check if the .NET Framework is installed) then we can move on to the next step of testing the script below to make sure that everything is functioning correctly.

IIS on installation creates a folder called ‘Inetpub’ on your hard drive, under Inetpub there is another folder called ‘wwwroot’. The wwwroot folder is the root folder for your website. By default the folders are placed on your C drive, C:\Inetpub\wwwroot. You can copy the code below into a new file called 'test.aspx' and place in the wwwroot folder.

<%@ Page Language="VB" %>

<script runat="server">
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
        lblVersion.Text = "Your server is running ASP.NET and the version is " & System.Environment.Version.ToString()
    End Sub
</script>

<html>
<head>
    <title>ASP.NET Version</title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:Label ID="lblVersion" runat="server"></asp:Label>
    </form>
</body>
</html>

Open your browser and type in 'http://www.localhost/test.aspx'. If it runs and works then everything's fine and the version is written to the browser programmatically!

More Info:
http://www.codefixer.com/asp-net/tutorials/test-asp-net-installation.asp

Comentarios