When web applications are pushed to CloudFoundry they are pushed out to one or more Windows cells and run inside the Hostable Web Core (HWC). HWC is the same component that IIS uses underneath to do the heavy lifting of serving ASP.NET applications. In Cloud Foundry the HWC is bootstrapped by the command line hwc.exe which works much like IISExpress.
We're going to serve the PCF .NET Environment Viewer app locally using the hwc.exe. These steps will guide you through all the prereqs to get that app working.
- Install the following Windows features: Hostable Web Core, ASP.NET 4.6, Websockets.
- Download or build the hwc executable. Place the hwc.exe in
c:\containerizer
. - Clone the PCF .NET Environment Viewer app to
c:\containerizer\env
i.e.git clone https://github.com/Pivotal-Field-Engineering/pcf-dotnet-environment-viewer.git env
. - From PowerShell start the web server:
& { $env:PORT=8080; .\hwc.exe -appRootPath "C:\containerizer\env\ViewEnvironment\" }
You should now be able to browse to http://localhost:8080/
and even attach a debugger and set breakpoints to the hwc.exe process.