How to Debug a Windows Service in Visual Studio

How to Debug a Windows Service in Visual Studio

When you create a Windows Service project under Visual Studio, you may have noticed that the following dialog box appears when you try to run the service. In summary, it is simply impossible to run a windows service in Visual Studio, you must necessarily go through the NET START command to start the service after having previously installed it with the command INSTALLUTIL. Except that this method prevents us from easily debugging the Windows Service. As a matter of fact, to debug our code, we must install the service, start it, then link the debugger to the relevant service process from Visual Studio. And by the way, let's keep in mind that we will also have to stop, recompile and restart the windows service in order to load up any change we make to the code. In short, it's kinda annoying. There is a simpler solution though....

Read more
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Monthly Archives

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))