Self Hosted signalR in windows service; Minimum permissions for base url = http://*:1111

StackOverflow https://stackoverflow.com/questions/23428886

  •  14-07-2023
  •  | 
  •  

Pregunta

I have built a windows service which runs a self hosted SignalR service.

I start the webApp thus: WebApp.Start("http://*:1111")

to get this to start I have to provide my service with an Admin logOn. But that seems a bit too much of a privilege.

I Tried using NETWORK SERVICE but that got access denied error.

What is the minimum privilege required to start my WebApp for the URL provided. Or Must I run my service with Admin privileges?

¿Fue útil?

Solución

You probably want to use netsh.exe (found in c:\Windows\System32) to allow a specified non-admin user to listen for http requests on port 1111.

The syntax for the command is as follows:

netsh http add urlacl url=http://*:1111/ user=DOMAIN\user

http://msdn.microsoft.com/en-us/library/windows/desktop/cc307223(v=vs.85).aspx

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top