简体   繁体   English

0x80004005 新安装的 TFS2018 Express 拒绝访问。 无法执行 roslyn\\csc.exe

[英]0x80004005 Access is Denied on new install of TFS2018 Express. Can't execute roslyn\csc.exe

I've installed TFS2018 Express.我已经安装了 TFS2018 Express。 It appears to have completely installed.它似乎已完全安装。

When I attempt to access its website component, I get the Win32 0x80004005 Access is Denied error.当我尝试访问其网站组件时,出现 Win32 0x80004005 Access is Denied 错误。 The stack trace references a csc.exe program in a roslyn sub-sub directory.堆栈跟踪引用了 roslyn 子目录中的 csc.exe 程序。 The failing command mentions a file in another directory.失败的命令提到另一个目录中的文件。

I've seen other threads that say not to run TFS in 32-bit mode.我见过其他线程说不要在 32 位模式下运行 TFS。 The installer didn't ask me and I don't know how to tell it to act in 64-bit mode.安装程序没有问我,我不知道如何告诉它在 64 位模式下运行。

Other threads say I need to add read and execute permissions to the directory.其他线程说我需要向目录添加读取和执行权限。 Which directory/directories?哪个目录/目录? I've added it to the whole website directory and its children plus the referenced file directory.我已将它添加到整个网站目录及其子目录以及引用的文件目录中。

It seems pretty darn silly for the product to install itself with inadequate permissions and not tell us which permissions are needed.该产品在权限不足的情况下自行安装而不告诉我们需要哪些权限,这似乎非常愚蠢。

The error message tells me what command was failing.错误消息告诉我什么命令失败了。

[Win32Exception (0x80004005): Access is denied]

[ExternalException (0x80004005): Cannot execute a program.  The command being executed was:

"d:\Program Files\Microsoft Team Foundation Server 2018\Application Tier\Web Services\bin\roslyn\csc.exe" /shared /keepalive:"10" /noconfig /fullpaths @"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\tfs\af7cc5\244hjudj.cmdline"

Just for testing, after fighting it for some time, I gave full control over the roslyn directory and to the TFS (and child) directories to domain users where the cmdline file was mentioned.只是为了测试,经过一段时间的斗争后,我将 roslyn 目录和 TFS(和子)目录的完全控制权交给了提到 cmdline 文件的域用户。 No change in the error message.错误消息没有变化。

I put the above command into the command line and ran it.我将上述命令放入命令行并运行它。 I get this error message:我收到此错误消息:

error CS2011: Error opening response file 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\tfs\af7cc5\244hjudj.cmdline'
warning CS2008: No source files specified
error CS1562: Outputs without source must have the /out option specified.

Any ideas?有什么想法吗?

See https://developercommunity.visualstudio.com/content/problem/165639/0x80004005-access-is-denied-on-new-install-of-tfs2.html# for an answer that worked for me.请参阅https://developercommunity.visualstudio.com/content/problem/165639/0x80004005-access-is-denied-on-new-install-of-tfs2.html#以获得对我有用的答案。

Key elements are that the program was installed via the iso installer and it apparently caused the website to run in 32bit mode, when 64bit mode is needed.关键要素是该程序是通过 iso 安装程序安装的,当需要 64 位模式时,它显然导致网站以 32 位模式运行。

This caused the website to recompile to 64bit mode:这导致网站重新编译为 64 位模式:

Files under C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\Temporary ASP.NET Files are created by ASP.NET compiler. C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\Temporary ASP.NET 下的文件由 ASP.NET 编译器创建。 It is very strange that error message mentions很奇怪,错误信息提到

C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319 instead of C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319 而不是

C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319 C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319

since TFS must be running in 64-bit Application Pool.因为 TFS 必须在 64 位应用程序池中运行。 Could you make sure that "Microsoft Team Foundation Server Application Pool" and "Microsoft Team Foundation Server Message Queue Application Pool" application pools are configured to run in 64 bit processes?您能否确保“Microsoft Team Foundation Server 应用程序池”和“Microsoft Team Foundation Server 消息队列应用程序池”应用程序池配置为在 64 位进程中运行?

To do this you can do the following:为此,您可以执行以下操作:

1) Open IIS Manager (inetmgr.exe) 1) 打开 IIS 管理器 (inetmgr.exe)

2) Select Application Pools page 2) 选择应用程序池页面

3) Select "Microsoft Team Foundation Server Application Pool" click on "Advanced Settings..." link on the right pane. 3) 选择“Microsoft Team Foundation Server 应用程序池”,单击右侧窗格中的“高级设置...”链接。

4) Make sure that Enable 32-bit Applications is set to False. 4) 确保启用 32 位应用程序设置为 False。

5) Repeat steps 3 and 4 for the "Microsoft Team Foundation Server Message Queue Application Pool" 5) 对“Microsoft Team Foundation Server 消息队列应用程序池”重复步骤 3 和 4

Once you verified that application pools are configured to run in 64 bit processes, open Sites page in the IIS manager and find out ID of the Team Foundation Server site (second column).确认应用程序池配置为在 64 位进程中运行后,打开 IIS 管理器中的站点页面并找出 Team Foundation Server 站点的 ID(第二列)。 Usually it is 1 or 2.通常为 1 或 2。

After that, execute the following from the elevated command prompt:之后,从提升的命令提示符执行以下操作:

c:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\aspnet_compiler.exe -errorstack -m /LM/W3SVC/ 1 /root/tfs c:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\aspnet_compiler.exe -errorstack -m /LM/W3SVC/ 1 /root/tfs

Replace bold 1 with ID of your Team Foundation Server site.将粗体 1 替换为您的 Team Foundation Server 站点的 ID。

Does it report any errors?它是否报告任何错误?

In my case, the 32bit settings on the application pools were correct, and the aspnet_compiler.exe command caused the website to switch to 64bit mode.就我而言,应用程序池上的 32 位设置是正确的,并且 aspnet_compiler.exe 命令导致网站切换到 64 位模式。 After that, all was well.在那之后,一切都很好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM