Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Slow .NET app shut down

1 view
Skip to first unread message

Carel Lotz

unread,
Jan 26, 2004, 4:51:06 AM1/26/04
to
Hi

We've been experiencing some slow shut downs on our Windows .NET Desktop application. On further investigation, it turned out that the virus scanner was scanning a *.ini file for our application that is created within the Local Settings\Application Data\ApplicationHistory folder. It turns out that all .NET apps have a similar .ini file in the same directory. My question is, why do all .NET apps create such a .ini file in this directory? When you look at the contents of the file you see references to all the assemblies and versions that the app uses. In our development environment where we make a daily build, this file grows as the version numbers of our assemblies changes. What is the use of this file? Can we configure it to not be created? Is this going to be a problem once we release our application?

The file grew to about 270k for our application. I agree this is not big at all, but the virus scanner was running crazy on it. If we delete the file and run the app again, it creates a file of only about 13k. My guess is that the .NET app, when closing down, first needs to map the assemblies references to any existing entries in this .ini file to not create duplicates. The more entries, the more disk access. The virus scanner kicks in seeing what "virus" is writing information to this ini file. For a small 13k file, this overhead is minimal, however for the 270k file it becomes extreme. We have instances on a Win 2000 machine where the app shutdown drops from 3 minutes down to 10 seconds.

Currently we have "solved" the problem by deleting this file every time our application starts up. You can do this as it creates a .ini.inuse file for your app while it is running. I would love to know why this file is created and if our "solution" is going to cause long term side-effects.

Regards
Carel Lotz

MSFT

unread,
Jan 27, 2004, 3:43:07 AM1/27/04
to
Hi Carel,

Thank you for using the community. I am Luke and I am review this issue
currently. As I understand, you want to disable .NET application to
generate INI files in \Local Settings\Application Data\ApplicationHistory.

In fact, these INI files records the assembly binding information for .NET
applications and will be used in .NET Application Restore Tool:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconusingnetapplicationrestoretool.asp

From security consideration, .NET framework doesn't provide a way to
disable this INI file. The work around is just like what you have
implemented in your application: delete these INI manually.

Regards,

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

0 new messages