System.InvalidOperationException : Stack is null or empty.
Steps to reproduce:
using (var db = new Db("master"))
{
// HttpContext.Current have to be null yet
db.Configuration.Settings["someKey"] = "someValue";
HttpContext.Current = new SomeFakeContext();
db.Configuration.Settings["someKey"] = "someValue"; // I think any key and value behave the same
} // exception is here - in the Dispose
Stack Trace:
Switcher`2.Exit()
Switcher`2.Dispose()
Settings.Dispose()
DbConfiguration.Dispose()
Db.Dispose(Boolean disposing)
Db.Dispose()
Sitecore.Kernel 10.1.1
Workaround:
set HttpContext.Current before using db.Configuration.Settings!
System.InvalidOperationException : Stack is null or empty.
Steps to reproduce:
Stack Trace:
Sitecore.Kernel 10.1.1
Workaround:
set HttpContext.Current before using db.Configuration.Settings!