I created a new ASP.NET5 Beta 8 Web Application.
I publish it to my local file system and copy those files to my server which is a Windows Server 2012 R2
In
The hosting model from ASP.NET 5 Beta 8 has changed and is now dependant on the IIS HttpPlatformHandler.
You will notice your web.config in the wwwroot folder or your application contains references to it.
The above %DNX_PATH% translates to "..\approot\web.cmd"
ASP.NET BETA 8 release notes
Hosting ASP.NET 5 applications in IIS will now be achieved using the IIS HttpPlatformHandler configured to forward through to the ASP.NET 5 Kestrel server. The HttpPlatformHandler is a native IIS module that needs to be installed by an administrator on the server running IIS (installers: x86, x64). It’s also already included with the beta8 Web tools update for local development on IIS Express. This native IIS module manages the launching of an external application host process (in this case dnx.exe) and the routing of requests from IIS to the hosted process.
You can install the HttpPlatformHandler using the Microsoft Web Platform installer or separate x86 / x64 installers on download links from Microsoft's IIS site: link.
Take note: The HttpPlatformHandler only supports IIS 8 +. So this means for older operating systems like Windows Server 2008 R2 which comes with IIS 7.5, you won't be able to use IIS to host ASP.NET 5 websites since those version don't support the HttpPlatformHandler.