I just uploaded a out of the box ASP.Net 4.6.1 MVC 5 Project and it throws an access denied error before displaying anything. I uploaded it within Visual Studio using the deploy settings everything looks good not sure what is causing an access denied error. I have only changed the web.config with proper database info and set the trust level to full before uploading. Here is the error. Server Error in '/' Application. Access is denied 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: Access is denied 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): Access is denied] [ExternalException (0x80004005): Cannot execute a program. The command being executed was "E:\web\greggood\bin\roslyn\csc.exe" /shared /keepalive:"10" /noconfig /fullpaths @"F:\tempdir\v4.0.30319\root\0b334023\fd24e763\s33tgwty.cmdline".] System.CodeDom.Compiler.Executor.ExecWaitWithCaptureUnimpersonated(SafeUserTokenHandle userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine) +6838575 System.CodeDom.Compiler.Executor.ExecWaitWithCapture(SafeUserTokenHandle userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine) +115 System.CodeDom.Compiler.Executor.ExecWaitWithCapture(IntPtr userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName) +81 Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.Compile(CompilerParameters options, String compilerFullPath, String arguments, String& outputFile, Int32& nativeReturnValue) +193 Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.FromFileBatch(CompilerParameters options, String[] fileNames) +680 Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.CompileAssemblyFromFileBatch(CompilerParameters options, String[] fileNames) +186 System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile(CompilerParameters options, String[] fileNames) +24 System.Web.Compilation.AssemblyBuilder.Compile() +948 System.Web.Compilation.BuildProvidersCompiler.PerformBuild() +10082369 System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) +9977420 System.Web.Compilation.BuildManager.CompileGlobalAsax() +44 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +260 [HttpException (0x80004005): Cannot execute a program. The command being executed was "E:\web\greggood\bin\roslyn\csc.exe" /shared /keepalive:"10" /noconfig /fullpaths @"F:\tempdir\v4.0.30319\root\0b334023\fd24e763\s33tgwty.cmdline".] System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +62 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +435 System.Web.Compilation.BuildManager.CallAppInitializeMethod() +33 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +545 [HttpException (0x80004005): Cannot execute a program. The command being executed was "E:\web\greggood\bin\roslyn\csc.exe" /shared /keepalive:"10" /noconfig /fullpaths @"F:\tempdir\v4.0.30319\root\0b334023\fd24e763\s33tgwty.cmdline".] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9946024 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +90 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +261
4.6.1 isn't supported on all servers. Log in to the support portal and open up a ticket. They can tell you whether your server supports it, and let you know what the options are if it doesn't.
Thank you I contacted support and got it squared away. For anyone else wondering. My server did support 4.6.1 The Access Denied error was a permissions issue. Support reset the permissions and the site now loads. I deployed using Visual Studio which caused the issue, the following may help prevent the issue for others: https://support.winhost.com/kb/a890/acl-altered-after-using-visual-studio-web-deploy.aspx
If anyone else gets this error. Contact our support department and ask them to Reset your ACL permissions. If you deployed your application using Web Deploy, please review these links which will show you how to prevent this from happening again in the future: http://support.winhost.com/KB/a890/acl-was-altered-after-using-vs-web-deploy.aspx http://blog.winhost.com/how-to-stop-web-deploymsbuild-from-skewing-server-permissions/ http://msdn.microsoft.com/en-us/library/ff398069(v=vs.110).aspx