Unable to profile a windows service
venuzr
Posts: 2
I am unable to start a profiling session on a custom windows service and am hoping you can help me. This service implements System.ServiceProcess.ServiceBase and I have it installed on my Windows Service Manager and am able to start it and stop it.
The error that I get is
Could not launch the task to be profiled.
RedGate.Profiler.Engine.Exceptions.CannotStartSessionException
at eU.Launch()
at RedGate.Memory.Controller.Session.ProfilerSession.i()
Caused by:
Object reference not set to an instance of an object.
System.NullReferenceException
at eT.a(String )
at eT.b()
at fe.PerformLaunch()
at eU.Launch()
Your help is appreciated.
Thanks
Venu
The error that I get is
Could not launch the task to be profiled.
RedGate.Profiler.Engine.Exceptions.CannotStartSessionException
at eU.Launch()
at RedGate.Memory.Controller.Session.ProfilerSession.i()
Caused by:
Object reference not set to an instance of an object.
System.NullReferenceException
at eT.a(String )
at eT.b()
at fe.PerformLaunch()
at eU.Launch()
Your help is appreciated.
Thanks
Venu
Comments
The service should have a key at HKEY_LOCAL_MACHINE\CurrentControlSet\Services\<Name>, where <Name> matches the name in the drop-down, which should in turn have an ImagePath key. If it's missing, then it looks like ANTS will give this exception (though if it's missing it's odd that the service is able to start at all). It's possible that ANTS is case sensitive.
If the key is not present, or the name doesn't exactly match the list, can you let me know what the difference is?
You might be able to fix this problem by deregistering and reregistering the service.
Software Developer
Red Gate Software Ltd.