If I try to run this code in my office-js add-in in Excel 2016 (Desktop), it throws an error and says Access is denied.
ngOnInit() {
console.log('Writing to localStorage...' );
localStorage.setItem('foo', 'bar');
console.log('done.');
}
However, this only happens on one computer, but works as expected on every other. Also, this code works perfectly fine running in any browser including IE 11. Further, if I run excel in Administrator mode, it also works as expected.
There is some permissions or something that are off, writing to localStorage in Excel's sandboxed instance of IE11, and I can't figure out where or what it is.
I think I have tried every fix on this related question and none of them seem to make a difference in this case (Access Denied for localstorage in IE10).
More Background: Initially, this worked on my computer (and I was trying to fix it for a co-worker), but I changed my CachePath registry key (as noted here: Access Denied for localstorage in IE10) to Local instead of LocalLow to be able to reproduce the bug on my box. However, after trying various things to fix it, even switching that registry key back to LocalLow doesn't resolve the issue on my box as I would've expected.
Update:
Image of my CachePath registry key:
However, using process monitor, I can see it's using the wrong path and ignoring the registry key update:
Why is it ignoring my registry update?
Any ideas?