Running dotnet core 2.0 mvc application on cloud9


I am trying to run a dotnet core 2.0 MVC application on cloud9. The steps I’ve taken is;

  1. Installed the dotnet core SDK according to
  2. Created a new MVC / React app using the cli: dotnet new reactredux
  3. Ran npm i and dotnet restore
  4. Changed port of application in Program.cs to http://localhost:8080
  5. Ran the application: dotnet run

The console shows that the application is running, but I cannot access it though the browser, so I guess there is some issue with forwarding the request from c9 to the MVC application. Should I use nginx for this, or is there a better way to achive this?

Thanks / AS


You can use an nginx reverse proxy if you want, but it’s easier to just change localhost to (this is stored in the $IP environment variable, FYI). This will tell your server to listen on the external port rather than internally, so that the Cloud9 proxy can connect to it.




I did try with previously, but it errored out with something like “not a valid url”, I tried using now and it works!

Thanks again.

*EDIT: For future googlers: you need to make your application publically awailable for AJAX to work