One of my web apps uses SQL Server Reporting Services, and began throwing this error the other day:
Compiler Error Message: BC2017: could not find library ‘c:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\…’
The file name in the path refers to a temporary file with a random name.
Last time I saw a similar error message, the permissions on the Temporary ASP.NET Files folder needed to be modified. I was using impersonation, and the impersonated user needed MODIFY permissions. It didn’t make sense in this case, since we hadn’t made any changes and weren’t using impersonation.
Just to be sure, we added the ASPNET user with Modify permissions, and the report ran! As an experiment, we removed the ASPNET user, and the report sill ran! This made no sense, so I hunted down the network manager to see what MS update may have been installed on my web server. Instead, they had decommissioned the old primary domain controller, and promoted a newer BDC to become the PDC. This web server is Windows 2000 (and is to be replaced this year), and our guess is that IIS was using a token cached from the old PDC, which wasn’t validating against the new PDC.
Whatever the case, tweaking the permissions worked. In other cases, you may need to leave the impersonated user assigned to the folder. This is usually the case when you try and access the report for the first time.