I have hosted some 5 applications on IIS in my server.
After sometimes I am getting System.OutOfMemoryException error due to out of memory in ASP.NET Temp Folder.
Is there any way to clear it automatically or any setting for this.
I have hosted some 5 applications on IIS in my server.
After sometimes I am getting System.OutOfMemoryException error due to out of memory in ASP.NET Temp Folder.
Is there any way to clear it automatically or any setting for this.
I doubt you're getting an OutOfMemoryException because a temp folder is full. I can see other types of exceptions being thrown for a full drive, just not OutOfMemoryException. I think you're looking in the wrong place.
System.OutOfMemoryException isn't due to your temp folder, this happens when .Net can't allocate memory.
You may want to look at MSDN Troubleshooting topics for this.
OutOfMemoryException isn't thrown because your temp directory is filling up. However, if some part of your code is reading the list of files, it may trigger the exception. This is not due to the directory filling up, but because the required data structure cannot be allocated by the runtime.