c# - Access Denied. installutil.exe installation after rebuilding in VS Express 2013 -
this first time in c#, , following tutorial in order test out directory monitoring service. relevant installation steps in step 6:
http://www.rhyous.com/2012/11/27/c-creating-a-service-to-monitor-a-directory/
step 6 – install service open developer command prompt right-clicking , choosing run administrator. in command prompt, change bin\debug folder in project directory. run command install service: installutil.exe directorymonitoring.exe start service command. net start directorymonitoringservice
after following tutorial, service able install , run after building using visual studio development console. updated code little , built again.
i tried using same steps install or run service via vsd console again, accessed denied error when try either commands.
i following error installation:
system.invalidoperationexception: cannot open service control manager on computer '.'. operation might require other priviledges. inner exception system.componentmodel.win32exception thrown following error message: access denied.
i following error net start:
the service name invalid.
what going on? able first time. why not working now?
if have services window open, close , try doing reinstall again.
also, don't forget uninstall service before reinstalling it. however, in experience, i'm pretty sure once service installed replacing exe updated service , restarting sufficient , have gotten away without having reinstall service. ymmv.
Comments
Post a Comment