1. First get the SID of the user running the windows service. Tip: see C:\Documents and Settings\
2. Then create a batch file with the followinf content assuming that the httpcfg.exe is installed into the default folder:
@set sid=%1
@set httpcfg.exe="C:\Program Files\Support Tools\httpcfg.exe"
%httpcfg.exe% set urlacl /u "http://+:_portnumber_/servicenamefile.svc/" /a "D:(A;;GX;;;%sid%)"
....
3. Execute your batch file with the SID specified as first parameter, example (this sid is valid only on my local computer!): SetupUrlAcl.cmd „S-1-5-21-329068152-1425521274-725345543-1015”
4. Ensure that the user has right „act as part of the operating system”. (mmc, local computer policy, computer configuration, windows settings, security settings, user right assignment) The snapin is not added by default, you have to add it manually (group policy object editor).
5. Start the windows service and esure that it’s working.
a httpcfg.exe set sort annyiszor kell megismételni, ahány service fájlod van.
Ezzel a paranccsal természetesen le is kérdezhető, tehát ha probléma van egy service elérésével, akkor először csekkold, hogy van-e joga a felhasználónak portot nyitni.
Nincsenek megjegyzések:
Megjegyzés küldése