.NET only allows one profiler to be attached to any given process, so this error occurs whenever anything else using the profiling API is already attached to the target process. Unfortunately, the error reported to ANTS is exactly as displayed on screen, so it has no way of knowing what the other profiler is.
It's possible that a crashed UI session would leave behind the ANTS profiler core in the target process. Unfortunately, there's no way to unload the core at this point other than by restarting the process.
Hm, it occurs to me that we haven't tried the case where the profiler environment variables are set but the profiler doesn't start. I think that the core should unload itself and allow a future attach, but I haven't actually tried it.
If it's not ANTS, tracking down the culprit is going to be more difficult. You should be able to see the profiler DLL that's loaded using SysInternals process explorer (ANTS memory profiler will be RedGate.Memory.Core.dll). You can also look at the environment variables to find third-party profilers: specifically, the COR_PROFILER environment variable, which if it's set will be set to the GUID of a COM+ component, which can be looked up in the registry to find out what's being loaded (then you'll need to configure whichever tool it is to stop loading on the target process). If the profiler attached itself via the .NET API, these variables won't be set, so the only way to find out what the profiler is is to spot the actual DLL that's being loaded.
There is at least one third-party profiler that works by loading itself in via this mechanism to every running process on the system to implement its own attach mechanism (this effectively disables any other profiler from running on the system). I *think* IntelliTrace also loads a profiler into anything it's being run on, so that will need to be turned off to make the profiler work.
Red Gate Software Ltd.