ConfigurationErrorsException when running multiple instances due to file locking
Posted
by dr. evil
on Stack Overflow
See other posts from Stack Overflow
or by dr. evil
Published on 2010-04-05T11:39:14Z
Indexed on
2010/04/05
11:43 UTC
Read the original article
Hit count: 323
I'm using My.Settings in my VB.NET application and when we run multiple instances rarely it's giving a ConfigurationErrorsException because the settings file locked by another instance.
Is there anyway to fix this?
This is happening during the OnShutdown process, also I'm not quite sure how can I catch that exception and handle it.
Only thing I can think of is disabling onshutdown save and manually save it during the shutdown with extra retry + locking + exception handling.
© Stack Overflow or respective owner