Mike.Griffin:I'm pretty confused, if SetupEntitySpacesConnection is called only once during startup, what is it doing the very first thing looping through connections in a foreach loop?
I never really found a clear guide to using configless setup. I think some of the stuff you saw was taken from a forum post.
Mike.Griffin:Are you also trying to use a config file too?
No, there are no ES sections in the config file.
Mike.Griffin:Also, what is going with that enum.Parse stuff?
esConnectionElement.SqlAccessType takes an enum, but my settings are saved as a string. If there is a better way to go from a string to an enum I'm happy to change it.
Mike.Griffin:Finally, it looks like you remove the connection and then immediately turn around and add it again? If you are calling this more than once I certainly see how things can go wrong ? Can you shed some light on this ... Perhaps a database call is occuring when you have the connection removed.
This isn't called more than once unless the configuration changes. I have a System.IO.FileSystemWatcher that watches a shared configuration file. If the database connection settings are changed through a configuration utility then that shared file will be updated. This triggers FileSystemWatchers in two windows services, one website, and two possible WinForms apps that may be running to update thier configuration without needing a restart. The FileSystemWatchers are set to call SetupEntitySpacesConnection when the configuration file changes, the same function that is called when the app starts. SetupEntitySpacesConnection is actually in a shared library. I'm happy to change it to update a possibly existing connection in the proper way if you can tell me what you recommend.
Mike.Griffin:esTransactionScope works fine in multi-threaded scenario's as every web page in ASP.NET is handled by a different thread and we have tons of folks doing web development.
Yeah, I know. This has all been working fine up to this point.
Is there any optional logging that can be turned on in ES to give more details about the current state, or anything else you can think of that I should look for?
Thank you.