I've created a new WebApi prject from a blank WebApi template, added a controller with a post, but whenever I try to run the project, I get the following error:
Exception thrown: 'System.UnauthorizedAccessException' in mscorlib.dll
Additional information: Access to the path 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\~AspAccessCheck_90a342644584.tmp' is denied.
I can't find anything by searching other than permissions etc, but I've not changed any permissions and it hasn't even got to running my code yet. I've tried setting permissions in this folder to everyone, but the error still occurs.
EDIT: It turns out the above is caused by JustMyCode setting being disabled. Enabling it made the error go away.
I tried to find an explanation, but only came across a question that exhibits a similar problem (Admob WP8 System.UnauthorizedAccessException).
So why does just my code throw an UnauthorizedAccessException in mscorlib.dll when it is disabled?