Error Scenario

You try to log on to a Windows SharePoint Services website and receive the message:

C# 8.0 and .NET Core 3.0 – Modern Cross-Platform Development: Build applications with C#, .NET Core, Entity Framework Core, ASP.NET Core, and ML.NET using Visual Studio Code, 4th Edition
ASP.NET Core 3 and Angular 9: Full stack web development with .NET Core 3.1 and Angular 9, 3rd Edition
C# in Depth, 4th Edition

Error: Server Error in ‘/’ Application.
Access to the path “C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\…\…” is denied.

What Cause the Error

The Network Service group does not have sufficient security permissions to the Temporary ASP.NET folder.

Error Resolution

1. click Start -> Run -> type cmd -> OK.
2. In command prompt type: “cd Drive(where is installed .NET Framework 2.0):\WINDOWS\Microsoft.NET\Framework\v2.0.50727”
3. Execute the command: “aspnet_regiis -ir”.