I just upgraded from VS 2015 to VS 2019. I create a standard MVC project, execute and this error appears "System.ComponentModel.Win32Exception: Access is denied" in the standard 500 error page.
I didn't change anything in the default microsoft code of the standard project. Tried to execute VS as administrator but nothing changes.
I know there are a lot of people with this problem but they are all talking about problems in production, this happens to me when I start the app in debug from Visual Studio.
The processes of VS and IIS Express are owned by my user with administrator privileges.
Thanks in advance for the help.
Full error: ("Accesso negato" is italian for "Access denied")
Server Error in '/' Application.
Accesso negato
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ComponentModel.Win32Exception: Accesso negato
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[Win32Exception (0x80004005): Accesso negato]
[ExternalException (0x80004005): Cannot execute a program. The command being executed was "D:\Documenti\LavoriProgetti\MABE23\Grafoplast\Siglature\Siglature\bin\roslyn\csc.exe" /shared /keepalive:"900" /noconfig /fullpaths @"C:\Users\Discount Elettronica\AppData\Local\Temp\Temporary ASP.NET Files\vs\48e6051c\3d3b0e0b\xcsytsyz.cmdline".]
System.CodeDom.Compiler.Executor.ExecWaitWithCaptureUnimpersonated(SafeUserTokenHandle userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine) +7083507
System.CodeDom.Compiler.Executor.ExecWaitWithCapture(SafeUserTokenHandle userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine) +118
System.CodeDom.Compiler.Executor.ExecWaitWithCapture(IntPtr userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName) +85
Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.Compile(CompilerParameters options, String compilerFullPath, String arguments, String& outputFile, Int32& nativeReturnValue) +274
Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.FromFileBatch(CompilerParameters options, String[] fileNames) +682
Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.CompileAssemblyFromFileBatch(CompilerParameters options, String[] fileNames) +186
System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile(CompilerParameters options, String[] fileNames) +25
System.Web.Compilation.AssemblyBuilder.Compile() +985
System.Web.Compilation.BuildProvidersCompiler.PerformBuild() +10223794
System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) +10113866
System.Web.Compilation.BuildManager.CompileGlobalAsax() +47
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +274
[HttpException (0x80004005): Cannot execute a program. The command being executed was "D:\Documenti\LavoriProgetti\MABE23\Grafoplast\Siglature\Siglature\bin\roslyn\csc.exe" /shared /keepalive:"900" /noconfig /fullpaths @"C:\Users\Discount Elettronica\AppData\Local\Temp\Temporary ASP.NET Files\vs\48e6051c\3d3b0e0b\xcsytsyz.cmdline".]
System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +65
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +458
System.Web.Compilation.BuildManager.CallAppInitializeMethod() +35
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +605
[HttpException (0x80004005): Cannot execute a program. The command being executed was "D:\Documenti\LavoriProgetti\MABE23\Grafoplast\Siglature\Siglature\bin\roslyn\csc.exe" /shared /keepalive:"900" /noconfig /fullpaths @"C:\Users\Discount Elettronica\AppData\Local\Temp\Temporary ASP.NET Files\vs\48e6051c\3d3b0e0b\xcsytsyz.cmdline".]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +10080656
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +99
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +263
User contributions licensed under CC BY-SA 3.0