Publish ASPNET 5 MVC 6 on IIS

Using Visual Studio 2015 Preview CTP6.

  1. Create an ASP .NET 5 New App
  2. Check that it is working outside of IIS.
  3. Once complete, publish the application. In this example, I have selected the location C:\MyPublishFolder
    1. When publishing your application, make sure that you have:
    2. Disabled pre-compilation
    3. Selected kre-clr-win-x64.1.0.0-beta3 OR kre-clr-win-x86.1.0.0-beta3 (See image below)

      Publish Screen shot
      Publish Screen shot
    4. Upon a successful publish, go to C:\MyPublishFolder.You should see the folders approot and wwwroot inside.
    5. Now open the IIS Manager (I am assuming you have the ASP .NET 4.5 feature enabled) with IIS 8.5
    6. Create a new website.
      1. Select the wwwrooot folder as the website’s physical path. In this example, it is C:\MyPublishFolder\wwwroot.
    7. Now check the website it is working

If the precompile option is ticked in the Publish Web Settings window pictured above, then you must

  1. Go to the wwwroot folder of your published web application. It is C:\MyPublishFolder\wwwroot
  2. Locate web.config
  3. Inside the folder of your published application, there is a packages folder inside of the approot folder which is contain a folder named after your application, with a folder for the version underneath. Inside that folder should be a folder named root. In web.config, set the value for the key kre-app-base to the root folder. For reference, see the line of code below. In this example, the application name is TestApplication.
  4. <add key=”kre-app-base” value=”..\approot\packages\ TestApplication \1.0.0\root” /> (See image below)
Published Web.Config
Published Web.Config

Error when using HTTP Portable class library & compression

Burela's house-o-blog

I was trying to use the new HTTP Portable class library with the new compression capabilities (as described in this MSDN post).

I created a portable class library that retrieved data, and then used that library in my app. However my app kept throwing this error:
Method not found: ‘Void System.Net.Http.HttpClientHandler.set_AutomaticDecompression(System.Net.DecompressionMethods)’.

After searching for hours, I discovered the issue is that you need to add the portable HTTP client to BOTH your portable class library AND any app that consumes that assembly. I resolved the issue simply by adding the portable HTTP client Nuget package to my app.

View original post