Open BluePositive opened 2 years ago
This is my controller method to get a snapshot
[HttpGet]
[Route("takeSnapshot")]
public async Task<string> TakeSnapshot(CancellationToken cancellationToken)
{
var snapshotLocation = Environment.GetEnvironmentVariable("SNAPSHOT_LOCATION");
if (snapshotLocation is null)
return "The environment variable SNAPSHOT_LOCATION is missing";
await DotMemory.EnsurePrerequisiteAsync(cancellationToken);
var config = new DotMemory.Config()
.SaveToDir(snapshotLocation);
var snapshotPath = DotMemory.GetSnapshotOnce(config);
return $"New snapshot at : {snapshotPath}";
}
Azure App Service is a strict environment were not all APIs are available (at least by default). We never tested it in the environment and it's not expected the self api will work here. Here is a corresponding issue in JetBrains tracker: https://youtrack.jetbrains.com/issue/DTRC-28984
I'm trying to get a dotMemory Snaphost from an application that runs on Azure App Service but I'm getting this error.