Run a .NET 2.0 App under IIS 8 on Server 2012 R2

When you first set up Server Essentials 2012 R2 with Anywhere Access, IIS 8 is configured with .NET v4.5 only. If you try to run a .NET 2.0 application, you may get a message like this:

Compilation error BC30456: ‘rows’ is not a member of ‘MyDataSetTableAdapters.myTableAdapter’

You’re a clever chap, so thinking that a compilation error could indicated the wrong .NET version, you set the Application Pool to target the .NET v2.0 CLR. But then you get this message when you access the page:

HTTP Error 404.17 – Not Found
The requested content appears to be script and will not be served by the static file handler.

Turn On .NET v3.5 for IIS

It turns out that .NET v3.5, which also handles v2.0 apps, is not installed for IIS. This TechNet article explains how to install it. Basically you just need to turn on .NET 3.5 under the Web Server (IIS) role:

NET 2 under Server 2012 R2

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.