Deploying an ASP.NET Application to GE Predix

by Eugene LahanskyMarch 31, 2016
Use these step-by-step instructions to set up the Predix console, prepare a simple ASP.NET app, and push it to Predix with the Cloud Foundry CLI.

Predix is a Cloud Foundry–based PaaS for the Industrial Internet from GE. It offers developers a wide choice of programming languages and services. This tutorial guides you through the process of preparing a simple ASP.NET application for Predix and then pushing it to the platform.



To follow the steps of this tutorial, you need:

  • a Predix account
  • Microsoft Visual Studio 2015
  • the Cloud Foundry CLI


Setting up the Predix console

To get started, create a new space:

  1. Log in to your Predix account and navigate to Console.
  2. Click Create Space and type a name for your space.



Preparing the application for Predix

To make your ASP.NET application ready for deployment to Predix:

  1. Go to Microsoft Visual Studio 2015 and create a new project using a standard ASP.NET 5 template.
  2. Compile and start the application to check if it works locally.

  4. To deploy the application in Predix, modify the project.json file. First, include the Microsoft.AspNet.Server.Kestrel dependency and the kestrel command. Then, make sure your application targets the dnxcode50 framework. These changes help Predix to choose the correct buildpack for the application. The project.json file should look as shown below.
    "dependencies": {
        "Microsoft.AspNet.Server.Kestrel": "1.0.0-beta8",
    "commands": {
        "kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel"
    "frameworks": {
        "dnxcore50": { }
  5. Compile and start the application again to check if the configuration is valid.


Deploying the application to Predix

After finishing the necessary preparations, you can deploy the application to Predix. With the Cloud Foundry CLI installed, go through these steps:

  1. Open cmd.exe and change to your ASP.NET directory:
  2. cd <folder where project.json is located>
  3. Log in to your Predix account.
    cf login -a <API endpoint> -u <your predix email> -o <your predix organization> -s <your predix space>


    • -a sets the API endpoint, which can be found in the welcome e-mail that you get during registration for a user account.
    • -u sets the username.
    • -o sets the organization.
    • -s sets the space.

    You will be also asked for your password—the one you chose during registration.

  4. After logging in, push the application.

    cf push eugeneaspnet5 -b

    The cf push command has two parameters:

    • the Predix application name (required)
    • the Cloud Foundry buildpack set in the -b flag (optional)

    We would recommend to define the buildpack parameter either as a command option or in the manifest.yml file.

The result of the cf push command will look as shown below.

0 of 1 instances running, 1 starting
1 of 1 instances running

App started
App eugeneaspnet5 was started using this command `dnx --project . kestrel --server.urls${PORT}`
Showing health and status for app eugeneaspnet5 in org / space as
requested state: started
instances: 1/1
usage: 1G x 1 instances
last uploaded: Tue Mar 29 13:39:33 UTC 2016
stack: cflinuxfs2
state     since                    cpu    memory         disk      
running   2016-03-29 04:41:17 PM   0.0%   371.1M of 1G   666.4M of 1G

Now, you can see the result in the browser.

Creating the droplet and uploading it to Predix is quite easy and doesn’t require any special settings, except the preparations in the Predix console. In our future articles, we are going to show how to work with different services from our sample Predix application.


Further reading

This blog post was written by Eugene Lahansky with assistance from Victoria Fedzkovich
and edited by Alex Khizhniak.