Deploy ASP.NET RC1 WebApp in IIS 8.5

3

I am trying to deploy an ASP.NET 5 WebApp in a Windows Server 2012 R2 that has IIS 8.5 installed.

The source code that I have here is a new ASP.NET Web Application. If I build it and run it in Visual Studio 2015, then works fine.

Now... I want to use the publish wizard to deploy it in ISS 8.5 so what I do is...

  1. Right click on the project name (WebApplication5)
  2. I created a custom profile (I named as localhost)
  3. I add the target location. C:\inetpub\wwwroot
  4. I configure the Settings
    • Configuration: Release
    • Target DNX Version: dnx-clr-win-x64.1.0.0.rc1-update1
  5. Then I publish the web app.

After that, I have the following folder structure in my C:\inetpub\wwwroot

C:\inetpub\wwwroot
     - approot
         - packages
         - runtime
         - src
         - ... bunch of files
     - logs
     - wwwroot
         - css
         - images
         - js
         - lib
         - some files including web.config

Now I edited the permissions of the C:\inetput\wwwroot to include IIS_IUSRS and IUSR (I gave them full access for now to discard permission issues)

Finally, I went to ISS manager to Default Web Site -> Right Click -> Manage Website -> Advanced Settings -> and under physical path I added C:\inetpub\wwwroot\wwwroot

I restarted the IIS Server and when I try to browser to the default site I got the following message...

HTTP Error 500.19 - Internal Server Error

The requested page cannot be accessed because the related configuration data for the page is invalid. Detailed Error Information:

Module IIS Web Core

Notification Unknown

Handler Not yet determined

Error Code 0x8007000d

Config Error

Config File \?\C:\inetpub\wwwroot\wwwroot\web.config

And finally... this is the content of the web.config file...

<configuration>
  <system.webServer>
    <handlers>
      <add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
    </handlers>
    <httpPlatform processPath="..\approot\web.cmd" arguments="" stdoutLogEnabled="false" stdoutLogFile="..\logs\stdout.log" startupTimeLimit="3600"></httpPlatform>
  </system.webServer>
</configuration>

What am I missing? That used to be super easy on previous versions of ASP.NET but I can't configure this properly now.

Any pointers? Thanks!

asp.net
asp.net-mvc
iis
asp.net-core
iis-8.5
asked on Stack Overflow Dec 18, 2015 by user3587624

1 Answer

2

Well once you have that...

First, make sure you have the HTTP Platform Handler installed in your IIS (x86 / x64).

Now you'll need to unlock the system.webServer/handlers section which can be found in IIS Manager on the server node under Configuration Editor. Search for the right section and unlock it from the right action pane.

Make sure that the App Pool is set to No Managed Code. DNX is being run as an external process. IIS doesn't need to know about what it's currently running.

As we are talking of external process... make sure that you can run dnx from an empty Command Prompt (as in: Not Developer Command Prompt provided by Visual Studio).

For the full tutorial, checkout the official documentation.

answered on Stack Overflow Dec 18, 2015 by Maxime Rouiller

User contributions licensed under CC BY-SA 3.0