To run a web app as a Windows Service, you use the sc command from the Command Line to install the app as a service:
sc create MyWebAppSvc type= own start= auto binpath= c:\Path\To\Exe\mywebapp.exe[/quote]
How do I add --secureport=8081 options to the Windows Service? such as
But I am getting a syntax error from it.
sc doesn’t appear, from my quick read, to have a means to pass cmd line args like you need
Simply quote the binpath including the runtime parameter(s)
sc create MyWebAppSvc type= own start= auto binpath= "c:\\Program Files (x86)\\Path\\To\\Exe\\mywebapp.exe --secureport=808"
Join us at the XVUG meeting http://bit.ly/2mwCIkC where I’ll show you how to offload the SSL to IIS and proxy your site on Port 80/443.
Yes, thanks for the great answer. I will register for the XVUG meeting.
No why doesn’t MS put that kind of useful tidbit on their page about the sc command ?
Sorry Norman, can’t answer that, I don’t work for MS.