This documentation is now out of date. As of the 1.0.0-rc2 release, ASP.NET Core uses the .NET CLI. For more information on the CLI visit https://dotnet.github.io/docs/core-concepts/core-sdk/index.html

Create package for deploying

Using VS Tooling:

Simply deploy to the file system using Visual Studio “14” publish. See details here under the section “Publish supports Azure website and file system”.

Using Command-line:

  • The command 'kpm' is used to pack the project along with the runtime to be deployed on the server.
  • On the command line navigate to web application root, the folder with project.json.
  • Run 'kpm bundle--out <output folder> --runtime <the alias/name of the runtime you want to run against>. Example 'kpm bundle --out C:\temp --runtime dnx-clr-win-x86.1.0.0-beta3'.
  • The runtime should be the alias of the one you want to run against in Azure. Make sure this is the one that is in the web.config file. It can be different from the one currently in the path but should be installed on the machine.

Deploy to Azure

  • In the Azure portal create a new website
  • Overriding settings/connection strings from azure portal:
  • If your app has connection strings, create SQL database(s) linked with the above created website. In the 'Configure' section of the application, provide the names for the connection strings as present in the config file of the web application. These will override the one shipped with the application and the subsequent data is stored in the linked databases.
  • If your app has any general settings, create app settings from the portal with the same name. Value of this will override the one in your local config.
  • Connect to the website FTP folder using any FTP client.
  • Copy the contents in the <output folder> to site folder of the website. With this copy operation, You are overwriting the original site/wwwroot folder with the one in <output folder> and adding a new folder site/approot.
  • Browse to website root to see if you can access the Home page.

Note: If you are deploying to any other server the same instructions as above should work as long as you have .Net 4.5.1 installed.