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

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

  •  14-07-2023
  •  | 
  •  

문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top