簡體   English   中英

“ /”應用程序訪問中的服務器錯誤被拒絕

[英]Server Error in '/' Application Access is denied

這是我先前提出的問題的延續,但是當我解決后,我立即又陷入困境

我的Asp.net Mvc應用程序未加載,我運行它,然后在IIS中瀏覽到它,但得到以下信息

在此處輸入圖片說明

堆棧跟蹤

[Win32Exception(0x80004005):訪問被拒絕]

[ExternalException(0x80004005):無法執行程序。 正在執行的命令是“ C:\\ Users \\ JoeCampbell \\ source \\ repos \\ webapi \\ bin \\ roslyn \\ csc.exe” / shared / keepalive:“ 10” / noconfig / fullpaths @“ C:\\ Windows \\ Microsoft.NET \\ Framework64 \\ v4.0.30319 \\ ASP.NET臨時文件\\ 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(SafeUserToken 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選項,String編譯器FullPath,String自變量,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” / shared / keepalive:“ 10” / noconfig / fullpaths @“ C:\\ Windows \\ Microsoft.NET \\ Framework64 \\ v4.0.30319 \\ ASP.NET臨時文件\\ 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,Exception appDomainCreationException)+831

[HttpException(0x80004005):無法執行程序。 正在執行的命令是“ C:\\ Users \\ JoeCampbell \\ source \\ repos \\ webapi \\ bin \\ roslyn \\ csc.exe” / shared / keepalive:“ 10” / noconfig / fullpaths @“ C:\\ Windows \\ Microsoft.NET \\ Framework64 \\ v4.0.30319 \\ ASP.NET臨時文件\\ 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

我嘗試過的事情

  • Windows功能中啟用的Windows身份驗證
  • 在“屬性”窗口中將“ Windows身份驗證”屬性更改為“啟用”

我通過轉到堆棧跟蹤中列出的文件夾並授予webapi.localhost.net的完全權限來解決此問題,但是對於您來說,這將成為您的應用程序池標識。

對我來說

“C:\\用戶\\ JoeCampbell \\源\\回購\\的WebAPI \\ BIN \\羅斯林\\ CSC.EXE”

然后,我右鍵單擊文件夾>屬性>安全性>

在“組或用戶名:”中單擊您的應用程序池標識。

單擊編輯,然后授予完全控制權

點擊確定

在此處輸入圖片說明

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM