Category Archives: Visual Studio

Running ASP.NET 5 MVC on IIS 8.5

This is how I got my ASP.NET 5 MVC site to run on IIS 8.5. I had some initial problems and most information I found on internet was about earlier beta versions of the framework. All of these had lots of steps and and none of them helped me.

Software Setup

  • Windows Server 2012 R2 (fresh install)
  • IIS 8.5
  • DNX Version: dnx-clr-x64.1.0.0-rc1-update1
  • Visual Studio 2015 Update 1

Server Installation

  1. Added Server Role: Web Server (IIS).
    And also ASP.NET 4.5 (under Web Server (IIS) -> Web Server -> Application Development).
    This will also include the feature ASP.NET from .NET Framework and ISAPI Extensions, ISAPI Filters and also .NET Extensibility 4.5.
  2. Installed the HttpPlatformHandler 1.2 from:

Publishing Site

  1. Compiled and Published the Web project in Visual Studio to a local folder.
    Configuration: Release – x64 (will probably work with Any CPU also).
    Target DNX Version: dnx-clr-x64.1.0.0-rc1-update1
  2. Copied the published output to the Web Server.
  3. Added a new  Site pointing to the wwwroot in the published folder.

And that was all that was necessary. Obviously running an ASP.NET 5 site is much easier now when the release candidate is out.

Microsoft.CompactFramework.CSharp.targets not found after Update 10586 of Windows 10

After installing Update 10586.3 from Windows Update the Compact Framework projects could not be loaded in Visual Studio 2008. The error was something like “C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.CompactFramework.CSharp.targets’ cannot be found.”

I haven’t found any explanation of why this file (and some other Compact Framework files was removed during the update.

But the simple solution was to do a Repair/Reinstall of Visual Studio 2008.

Update August 17, 2016

Now Windows updated to Version 1607 (Build 14393.51) and the same problem  is back again.  It looks like we will have to do a reinstall of Visual Studio 2008 after each update of Windows 10.

Update May 22, 2019

I case anyone else than me still does maintenance work in Compact Framework the commenters are absolutely right. The Power Toys for .NET Compact Framework 3.5 ( is much easier to install than reinstalling Visual Studio.

But what I’ve done a few times is just copying the files named *CompactFramework* from another computer, that also has Visual Studio 2008 installed, into C:\Windows\Microsoft.NET\Framework\v3.5. Or just save the *CompactFramework* files in another folder or a network drive until the next Windows Update.

ASP.NET MVC4 site gives Error 403.14 on IIS 8.5

Publishig a new project created with Visual Studio 2013 Update 3 and ASP.NET MVC4 on IIS 8.5 and Windows Server 2012 R2 only resulted in Error 403.14.

Since it was the first MVC project on that server I thought is was a configuration issue in IIS. After testing almost all suggestions found on Internet (most of the referring to IIS 7.5), I found someone with that same problem and had a solution.

The problem was the setting “Precompile during publish” when publishing. I publish to a local folder before sending it to the server and I’d selected that because I thought it would make the site faster. But this completely broke the site!

Disabling “Precompile during publish”, republishing it (locally) and sending it to the server and now it worked as expected!

Remote Debugging ASP.NET Development Server with SPI Port Forward

If you try to connect to the ASP.NET Development Server included in Visual Studio from another computer, you simply just can’t.

It’s a safety feature from the Visual Studio team, but also a big headache for many developers. If you want to test a PDA connecting to a web service on ASP.NET Development Server it is not even possible to run the test software locally on the same computer as the server.

After searching the web I found this question (and solution) on stackoverflow:

But since the answer on stackoverflow is linking to, downloading the SPI Port Forward program is another headache. After the download the file is well hidden in some temp folder far away. So I added a download here.

Download SPI Port Forward here

After starting the program. You enter the port number you want to remote connect to your local ASP.NET Development Server with in Local port. Enter localhost as Remote host. And enter the port that the ASP.NET Development Server is using as Remote port. Then Activate to enable the port forward.

Now you can connect to your local ASP.NET Development Server by connecting to: Where is your local computer (with server) IP. And 12345 is the port you entered in Local port.