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


I've installed 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. The stack trace references a csc.exe program in a roslyn sub-sub directory. The failing command mentions a file in another directory.

I've seen other threads that say not to run TFS in 32-bit mode. The installer didn't ask me and I don't know how to tell it to act in 64-bit mode.

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. 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?

asked on Stack Overflow Dec 8, 2017 by david wendelken • edited Jul 18, 2020 by weegee

1 Answer


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.

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.

This caused the website to recompile to 64bit mode:

Files under C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files are created by ASP.NET compiler. It is very strange that error message mentions

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


since TFS must be running in 64-bit Application Pool. 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?

To do this you can do the following:

1) Open IIS Manager (inetmgr.exe)

2) Select Application Pools page

3) Select "Microsoft Team Foundation Server Application Pool" click on "Advanced Settings..." link on the right pane.

4) Make sure that Enable 32-bit Applications is set to False.

5) Repeat steps 3 and 4 for the "Microsoft Team Foundation Server Message Queue Application Pool"

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). Usually it is 1 or 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

Replace bold 1 with ID of your Team Foundation Server site.

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. After that, all was well.

answered on Stack Overflow Dec 14, 2017 by david wendelken • edited Jan 8, 2018 by david wendelken

User contributions licensed under CC BY-SA 3.0