Skip to content

PRB: Access Denied Error When You Make Code Modifications with Index Services Running

PRB: Access Denied Error When You Make Code Modifications with Index Services Running

I was getting an annoying error while writing an ASP.NET app. I would make a change to the code and then run the app. Most of the time, it would run. About 5% of time, I would get an “Access is denied” error message about one of the assemblies in the app. Googling on that message didn’t help, but when I searched on some other text from the error page, “Policy not being applied to reference at this time”, that eventually took me to the right Microsoft KB article.

Basicly, the Microsoft Indexing Service was trying to index the temporary files that ASP.NET creates. Excluding that directory from the Indexing service appears to eliminate the problem. Of course the real question is: Why was Indexing Service bothering to index a directory that by definition only contains temporary files?