Last post Jul 29, 2016 08:57 PM by bruce (sqlwork.com)
Jul 28, 2016 08:43 AM|mystic.smeg|LINK
I've written a fairly standard ASP.NET5 MVC6 (Core 1) application using Visual Studio 2015 Community with Update 3.
The plan is to sit the app on a PC in some-one’s home (in their basement for example) where it will act as middleware between a heating system and the user via a browser on any device. The app will interface with the hardware and provide the user with an
interface to change temperatures and configure stuff. The app needs to be self-hosted on a PC (rather than the cloud) so it can interface with the hardware. It also needs to be hosted from the PC over a static IP which has been exposed through firewalls,
so it can be accessed from a web browser anywhere in the home, or the world. The difficult part, as I've discovered, is finding any complete, up to date, or working information on self-hosting an application that is not over 'localhost'.
For the clever person able to help; I'm not worried about large traffic, or what hosting platform I use as long as it works. IIS (Express?), OWIN, Kestrel, Mono, DNX, are all fine as long as it is relatively simple to install / understand (we all start somewhere)
and easy to deploy / maintain.
Is there a technical genius who can rise to the challenge and knows how to self-host a Core 1 app under the described conditions please? From a PC, over an IP address/port other than 'localhost:port' and can provide clear, working (tested?) and understandable
instructions on how to accomplish this?
By the looks of it, I'm not the only one who needs to know how to do this; and as the use of Core 1 increases (as it will) the requirement for this knowledge will only grow stronger. True fame and fortune awaits the individual who can.
C# / ASP.NET5 (Core 1)
Razor with CSS3 and HTML5
Currently using Kestrel service with debugging through IIS Express in VS
Much appreciated and forever grateful :D
Jul 29, 2016 05:35 AM|anurajp|LINK
I didn't understand your problem completely, but IISExpress is for development purpose, not production. Kestrel also not mature to host a production app. Recommended way is use IIS or nginx in front, which will handle the requests, and which will transfer
the request to Kestrel server.
Jul 29, 2016 10:08 AM|mystic.smeg|LINK
Many thanks for taking the time to reply to this post.
It's true my understanding of the actual 'hosting' is a little thin.
It sounds like you have experience in this area, do you know if there are any links to step by step guides on how to set-up either of these services (IIS or nginx) that you can point me towards? If it is just information I need, but don't understand what
information I need to look for, then someone who understands the problem domain would be better placed to find working and relevant information.
Jul 29, 2016 10:13 AM|Radomir|LINK
Jul 29, 2016 03:01 PM|anurajp|LINK
Here is how to use with nginx - http://dotnetthoughts.net/aspnet-core-with-nginx-as-reverse-proxy/
And here with IIS - https://docs.asp.net/en/latest/publishing/iis.html
Jul 29, 2016 08:57 PM|bruce (sqlwork.com)|LINK
MS recommends using IIS to self host on a windows machine for a couple reasons:
1) IIS will restart the asp.net core process if it crashes or a machine reboot
2) kerstrel is not cerified yet by microsoft to be open to the internet
here are the instructions: