Windows – IIS copying DLL and PDB files in Temp directory

filesiiswindows

This is driving me nuts…

I have nailed it down to the following, but I don't know why it's happening or how to stop it.

IIS worker process which is handling a web service is creating multiple copies of the same DLL, and a PDB, and an empty .tmp file every minute or two in my WINDOWS/Temp directory. I know it's the worker process for the web service which is doing it, because when I try to delete the files, it won't let me, and ProcExp says that the IIS worker process has the file, then digging into that worker process, I can tell it's the one running my web service. It is creating files like this…

tmp2A95.tmp.pdb

tmp2A95.tmp

tmp2A95.tmp.dll

Always in sets of these three files, but with sequential hex numbering skipping by three… so the next group of files would be tmp2A98

These are being created at a rate of about… well… 12,000 files over the weekend. It fills up my hard drive and starts to cause problems on the web site.

This is vendor software, and they have no idea why this is happening, and I've done my best to track it down, but I don't have access to their source code. They keep having me do ridiculous things that have nothing to do with the problem, and we haven't been able to fix it for about 6 months.

There are no errors in the event log, nothing in the IIS logs, and the DLL is a copy of one of their API libraries. The weird thing is the PDB… there's no other PDB files on the entire server – these are being generated directly from the DLL itself?

Please let me know if you've seen this kind of thing before, or if you know what causes IIS to drop a trio of files like that in the temp folder.

Thanks!

Best Answer

A pdb file is a program database file. It is used for debugging. For example, if your web application has an exception, if there is a pdb file for the assembly (dll) that had the exception, it will log the source code line number and method name of the offending code.

Check all of the web.config files in the virtual directory hierarchy, for ". If debugging is enabled, there will be copious amounts of temporary files generated for every page on the ASP.NET site.

Another possibility: If anything changes in the virtual site hierarchy, this will cause the ASP.NET application to recompile, which could result in the files that you are seeing. Ensure that you do not have anything that changes folders or files in the web site hierarchy. If you do, you need to move the folders/files that are modified outside of the website hierarchy. Another common offender is antivirus scanners, which can change some of the date attributes of files. It may be necessary to disable NTFS last access updates.

The Infamous Debug=True Attribute in ASP.NET

http://aspalliance.com/articleViewer.aspx?aId=1341&pId=-1

Don’t run production ASP.NET Applications with debug=”true” enabled

http://weblogs.asp.net/scottgu/archive/2006/04/11/442448.aspx