Red Gate forums :: View topic - Unable to profile a windows service
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
ANTS Memory Profiler Previous Versions
ANTS Memory Profiler Previous Versions forum

Unable to profile a windows service

Search in ANTS Memory Profiler Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
venuzr



Joined: 08 Feb 2010
Posts: 1

PostPosted: Mon Feb 08, 2010 8:56 pm    Post subject: Unable to profile a windows service Reply with quote

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
Back to top
View user's profile Send private message
AndrewH



Joined: 17 Aug 2006
Posts: 137

PostPosted: Tue Feb 09, 2010 11:45 am    Post subject: Reply with quote

There are two possibilities for this error: either there is a problem with WMI on your system (we use this to determine the process ID of the service if it's running), or ANTS is unable to determine the registry key for your service. The latter is more likely, I think.

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.
_________________
Andrew Hunter
Software Developer
Red Gate Software Ltd.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group