Solved Failing to Get ASP.NET Working on IIS 8.5 on Windows Server 2012 R2
-
I am working on a small internal project and am setting up a Windows Server 2012 R2 server (in a VM, of course) with IIS 8.5 to server an ASP.NET application. I am getting errors even in getting a test ASPX page to work. I am not trying to do anything complex, just a standard test page, but nothing appears to be working. I am sure that it is something simple that I am overlooking. I have installed IIS and am getting an error page from it, so that seems to be okay. The ASP.NET components have been installed but they do not seem to do anything. I am getting a 404.17 error.
HTTP Error 404.17 - Not Found
The requested content appears to be script and will not be served by the static file handler.
From the looks of the error, it seems like it can't figure out that ASP.NET needs to render the page.
-
This is the test file, in case it matters:
<%@ 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>
-
I knew that it was going to be something simple. Went into the site -> Basic Settings and changed the pool from CLR 4 to .NET 2.0 Classic and boom, works just fine.
-
-
If you want to use a newer version of .Net, I generally tell it to use whatever version I want and the "Classic" version if it is listed. I've had problems similar using any other version.