Our application uses the Enterprise Library's PropertyProxyValidator class to validate user input (v4.1 - Oct 2008). On occassion, the code will raise an exception saying the source type cannot be found. This error persists until the application
pools recycle at night, at which point everything works again. It tends to only affect one of the web front ends at a time (there are two).
I tracked down where the exception was being raised, and this is the section of code:
throw new InvalidOperationException(Resources.ExceptionNullSourceTypeName);
Type validatedType = BuildManager.GetType(this.SourceTypeName, false, false);
if (validatedType == null)
throw new InvalidOperationException(
(The value for this.SourceTypeName is shown in the exception and I've checked that it matches exactly.)
We have never been able to reproduce this exception and at this point don't have any ideas left as far as causes. For a while, my suspicion was that it was related to the Temporary ASP.NET Files folder. The last time the error occurred,
I copied that folder from both web front ends. Then the next day when things were back to normal, I copied the folders. When I did a directory and file comparision of the affected web front end, I found no differences.
Our application is essentially user controls hosted in web parts on SharePoint (they don't do anything with SharePoint - in fact, for a while, we were developing the controls on ASPX pages). There are two servers in the farm, both with Windows Server
2003 R2 Standard x64, IIS 6, and .NET v3.5.
Any ideas for causes would be greatly appreciated. I could also use suggestions on tools I could use to try and debug this when happens again (it happens 2-3 times a month) in production.