"/"应用程序访问中的服务器错误被拒绝
这是问题的继续我早问了,但是解决了之后,我立刻又卡住了
This is a continuation of a question I asker earlier, but that after I solved I got immediately stuck again
我的Asp.net Mvc应用程序未加载,我在IIS中运行它以浏览到它,相反,我得到了以下信息
My Asp.net Mvc application is not loading I run it browse to it in IIS, instead I get the following
[Win32Exception(0x80004005):访问被拒绝]
[Win32Exception (0x80004005): Access is denied]
[ExternalException(0x80004005):无法执行程序.命令
被处决是
"C:\ Users \ JoeCampbell \ source \ repos \ webapi \ bin \ roslyn \ csc.exe"/共享
/keepalive:"10"/noconfig/fullpaths
@"C:\ Windows \ Microsoft.NET \ Framework64 \ v4.0.30319 \临时ASP.NET
Files \ root \ f66da336 \ 3058efba \ 3w2ezdih.cmdline.]
System.CodeDom.Compiler.Executor.ExecWaitWithCaptureUnimpersonated(SafeUserTokenHandle
userToken,字符串cmd,字符串currentDir,TempFileCollection
tempFiles,String& outputName,String& errorName,字符串为trueCmdLine)
+1767 System.CodeDom.Compiler.Executor.ExecWaitWithCapture(SafeUserTokenHandle
userToken,字符串cmd,字符串currentDir,TempFileCollection
tempFiles,String& outputName,String& errorName,字符串为trueCmdLine)
+208 System.CodeDom.Compiler.Executor.ExecWaitWithCapture(IntPtr userToken,String cmd,String currentDir,TempFileCollection
tempFiles,String& outputName,String& errorName)+125
Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.Compile(CompilerParameters
选项,String编译器FullPath,String自变量,String&
outputFile,Int32& nativeReturnValue)+413
Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.FromFileBatch(CompilerParameters
选项,字符串[]文件名)+857
Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.CompileAssemblyFromFileBatch(CompilerParameters
选项,字符串[]文件名)+185
System.Web.Compilation.AssemblyBuilder.Compile()+1869
System.Web.Compilation.BuildProvidersCompiler.PerformBuild()+306
System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(布尔
isPrecompiledApp)+330
System.Web.Compilation.BuildManager.CompileGlobalAsax()+49
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()+327
[ExternalException (0x80004005): Cannot execute a program. The command
being executed was
"C:\Users\JoeCampbell\source\repos\webapi\bin\roslyn\csc.exe" /shared
/keepalive:"10" /noconfig /fullpaths
@"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\f66da336\3058efba\3w2ezdih.cmdline".]
System.CodeDom.Compiler.Executor.ExecWaitWithCaptureUnimpersonated(SafeUserTokenHandle
userToken, String cmd, String currentDir, TempFileCollection
tempFiles, String& outputName, String& errorName, String trueCmdLine)
+1767 System.CodeDom.Compiler.Executor.ExecWaitWithCapture(SafeUserTokenHandle
userToken, String cmd, String currentDir, TempFileCollection
tempFiles, String& outputName, String& errorName, String trueCmdLine)
+208 System.CodeDom.Compiler.Executor.ExecWaitWithCapture(IntPtr userToken, String cmd, String currentDir, TempFileCollection
tempFiles, String& outputName, String& errorName) +125
Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.Compile(CompilerParameters
options, String compilerFullPath, String arguments, String&
outputFile, Int32& nativeReturnValue) +413
Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.FromFileBatch(CompilerParameters
options, String[] fileNames) +857
Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.CompileAssemblyFromFileBatch(CompilerParameters
options, String[] fileNames) +185
System.Web.Compilation.AssemblyBuilder.Compile() +1869
System.Web.Compilation.BuildProvidersCompiler.PerformBuild() +306
System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean
isPrecompiledApp) +330
System.Web.Compilation.BuildManager.CompileGlobalAsax() +49
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +327
[HttpException(0x80004005):无法执行程序.命令
被处决是
"C:\ Users \ JoeCampbell \ source \ repos \ webapi \ bin \ roslyn \ csc.exe"/共享
/keepalive:"10"/noconfig/fullpaths
@"C:\ Windows \ Microsoft.NET \ Framework64 \ v4.0.30319 \临时ASP.NET
Files \ root \ f66da336 \ 3058efba \ 3w2ezdih.cmdline.]
System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()
+73 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()+603
System.Web.Compilation.BuildManager.CallAppInitializeMethod()+36
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager
appManager,IApplicationHost,appHost,IConfigMapPathFactory
configMapPathFactory,HostingEnvironmentParametershostingParameters,
PolicyLevel policyLevel,异常appDomainCreationException)+831
[HttpException (0x80004005): Cannot execute a program. The command
being executed was
"C:\Users\JoeCampbell\source\repos\webapi\bin\roslyn\csc.exe" /shared
/keepalive:"10" /noconfig /fullpaths
@"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\f66da336\3058efba\3w2ezdih.cmdline".]
System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()
+73 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +603
System.Web.Compilation.BuildManager.CallAppInitializeMethod() +36
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager
appManager, IApplicationHost appHost, IConfigMapPathFactory
configMapPathFactory, HostingEnvironmentParameters hostingParameters,
PolicyLevel policyLevel, Exception appDomainCreationException) +831
[HttpException(0x80004005):无法执行程序.命令
被处决是
"C:\ Users \ JoeCampbell \ source \ repos \ webapi \ bin \ roslyn \ csc.exe"/共享
/keepalive:"10"/noconfig/fullpaths
@"C:\ Windows \ Microsoft.NET \ Framework64 \ v4.0.30319 \临时ASP.NET
Files \ root \ f66da336 \ 3058efba \ 3w2ezdih.cmdline.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext上下文)+523
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext上下文)
+107 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
wr,HttpContext上下文)+688
[HttpException (0x80004005): Cannot execute a program. The command
being executed was
"C:\Users\JoeCampbell\source\repos\webapi\bin\roslyn\csc.exe" /shared
/keepalive:"10" /noconfig /fullpaths
@"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\f66da336\3058efba\3w2ezdih.cmdline".]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +523
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)
+107 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
wr, HttpContext context) +688
我尝试过的事情
- 在Windows功能中启用了Windows身份验证
- 在属性"窗口中将Windows身份验证属性更改为启用"
- Enabled Windows Authentication in Windows Features
- Changed the Windows Authentication property to Enabled in the Properties Window
Things I have tried
我通过转到堆栈跟踪中列出的文件夹并授予webapi.localhost.net的完全权限来解决了这个问题,但是对于您来说,这将是您的应用程序池标识.
I solved this by going to the folder listed in the stack trace and giving full permissions to webapi.localhost.net, however for you this is going to be your application pool identity.
对我来说是
"C:\ Users \ JoeCampbell \ source \ repos \ webapi \ bin \ roslyn \ csc.exe"
"C:\Users\JoeCampbell\source\repos\webapi\bin\roslyn\csc.exe"
然后我右键单击该文件夹>属性>安全>
I then right clicked the folder > Properties > Security >
在组或用户名:"中单击您的应用程序池标识
Click your application pool identity within "Group or user names:"
点击修改,然后授予完全控制权限
Click edit, and then grant Full control
点击确定