Alvin_Lim
(Alvin Lim)
1
[quote]Windows Service
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.
Norman_P
(Norman P)
2
sc doesn’t appear, from my quick read, to have a means to pass cmd line args like you need
https://technet.microsoft.com/en-us/library/bb490995.aspx
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.
Alvin_Lim
(Alvin Lim)
5
Hello Wayne,
Yes, thanks for the great answer. I will register for the XVUG meeting.
Norman_P
(Norman P)
6
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.