What are the challenges you face when working across database platforms? Take the survey

Snapshot API not creating snapshot

Alva AndersonAlva Anderson Posts: 2
edited June 2, 2016 7:05PM in ANTS Memory Profiler 8
Can anyone tell me the common reasons why the RedGate.MemoryProfiler.Snapshot.TakeSnapshot statement would return false, indicating that call failed and no snapshot was taken? I have followed the directions listed on the page https://documentation.red-gate.com/disp ... apshot+API and I get a return value of false (without an Exception being thrown). I am running an ASP.NET MVC application on .NET 4.5.1. I can provide more information if needed. Any help or clues would be appreciated.

Here is the code that attempts to create a snapshot:
public static bool CreateSnapshot()
            string ssName = DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss-fff") + "-RetrieveStoreData";
            bool success = false;

                success = RedGate.MemoryProfiler.Snapshot.TakeSnapshot(ssName);
            catch(Exception ex)
                Trace.WriteLine(String.Format("Snapshot creation failed for snapshot {0}: {1}", ssName, ex.Message));

            return success;

Sign In or Register to comment.