0

After I migrated my app to RC2 or to be very specific V. 1.0.0-rc2-3002702 I'm struggling with deployment of my app. I have noticed that folder "approot" in publish directory does not exist anymore and also with it "web.cmd" file. I have tried to deploy it on IIS but all I got is page not found "This site can’t be reached". On the official MS dotnet core documentation web site it is just like "Create new website in your IIS edit basic settings and you are good to go..."

2 Answers 2

1

Maybe my answer to a similar post will help: https://stackoverflow.com/a/37301527/166928

Don't point IIS to wwwroot like in RC1 but to the root folder.

Also, your server needs to have DotNetCore.1.0.0.RC2-WindowsHosting.exe

4
  • Thanks It is partially an answer. I have made it by creating application under default web site and pointing it to app-pool that uses No Managed Code and yes to root folder of published application. Also there was a loot of problems with magnifying of AngularJS files with bower and so on... And finally I'we got it working... Also one tip: in ConnectionStrings it is best to use Trusted_Connection=False; and to provide user name and password.
    – error505
    Jun 1, 2016 at 6:30
  • Not magnifying of angular :) but minify (Uglify) :)
    – error505
    Jun 1, 2016 at 7:52
  • 1
    For me it works fine with Trusted_connection=true. I just change the user in the app_pool to meet my requirements.
    – Francis
    Jun 1, 2016 at 13:15
  • Great. :) for me not... I was struggling for hours to find that last problem... Why data is not displayed. Than I figured out that it was trusted connection.
    – error505
    Jun 1, 2016 at 14:59
1

You will need to ensure that the server you are attempting to deploy to has the HTTPPlatformHandler installed.

You also need to ensure that your project.json has the IISIntegration package referenced and has an include containing your web.config. It should look something like this:

{
  "version": "1.0.0-*",
  "buildOptions": {
    "emitEntryPoint": true,
    "debugType": "portable"
  },
  "publishOptions": {
    "include": [
      "wwwroot",
      "web.config"
    ]
  },
  "dependencies": {
    "Microsoft.NETCore.App": {
      "type": "platform",
      "version": "1.0.0-rc2-3002702"
    },
    "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*",
    "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*",
    "Microsoft.Extensions.Logging.Console": "1.0.0-*",
    "Microsoft.AspNetCore.StaticFiles": "1.0.0-*" 
  },
  "frameworks": {
    "netcoreapp1.0": {
      "imports": "dnxcore50"
    }
  }
}

Your web.config will look something like this:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <handlers>
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" 
           resourceType="Unspecified"/>
    </handlers>
    <aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" 
                stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout"  
                forwardWindowsAuthToken="false"/>
  </system.webServer>
</configuration>

Note: The environment variables LAUNCHER_PATH and LAUNCHER_ARGS may cause you some headaches if you are not publishing from inside Visual Studio.

To get an RC2 site up and running on an Azure VM, I had to change that line to look like this:

<aspNetCore processPath="dotnet" arguments="./YourAppEntryPoint.dll" 
            stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" 
            forwardWindowsAuthToken="false"/>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.