Solving development problems  |  About this blog

Archive for the ‘iis error’ tag

Compiler Error Message: CS0016: Could not write to output file – Temporary ASP.NET Files – Access is denied

Everything was working perfectly and then suddenly during ASP.NET (MVC) development you got this error from your IIS 7 server (in our case from Windows 7 64-bit):
Compiler Error Message: CS0016: Could not write to output file ‘c:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\myapp\xxxxx\xxxxx\App_GlobalResources.xxxxxxx.dll’ — ‘Access is denied.’
So, what goes wrong? You don’t know because it was working perfectly previous day, it is also compiles OK but not working anymore on your IIS webserver and, all you got, is yellow screen with this error message.

We searched a little bit and found that the problem appeared because the permission were lost on following Temporary folders:

C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\

C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\

C:\Windows\Temp

Recipe

  • Gave a full permission to NETWORK SERVICE user to these folders (extreme case is to give full permission to Everyone user to these folders – do this only it doesn’t work)
  • Restart IIS using iisreset command

IIS started to serve pages again….

A listener channel for protocol ‘http’ in worker process ” serving application pool ‘DefaultAppPool’ reported a listener channel failure.

PROBLEM: Enabling RPC over HTTP on a 64-bit Internet Information Services 7.0 webserver results in application pool failures.

Just run these 4 command and restart IIS and application pools:

1) %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/globalModules -[name='PasswordExpiryModule'].preCondition:bitness64

2) %windir%\system32\inetsrv\appcmd.exe add apppool -name:RpcAppPool -enable32BitAppOnWin64:false

3) %windir%\system32\inetsrv\appcmd.exe set app “Default Web Site/Rpc” -applicationPool:RpcAppPool

4) %windir%\system32\inetsrv\appcmd.exe set app “Default Web Site/RpcWithCert” -applicationPool:RpcAppPool

http://support.microsoft.com/kb/970259

Written by Avivo

July 7th, 2009 at 1:37 pm