Testing the ASP.NET Installation, and what 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!

If IIS isn't installed read our IIS installation page and for further reading check out this article on 'options for a web server', if the .NET framework isn't installed then read our article ASP.NET installation.

Get the best asp hosting provider from web-hosting-top.com and save up to 30%

Advertisements



MembersPro

MembersPro PayPal - ASP Membership software

Plug and play ASP membership script that integrates with PayPal to let you charge recurring membership fees.

Global ASP.NET Hosting Leader - Click Here