I'm working on a C# server based application using Sql Compact 3.5 as the database. It's designed to run as a service. My problem is that when I run the service, the following line of code takes 15 seconds to execute:
_dbConnection = new SqlCeConnection ();
_dbConnection is declared as a SqlCeConnection inside of the class.
I'm positive that this line is what's causing the delay because I've commented out all of the other code so that this is all that executes when the service starts up.
I can run the app in another mode by specifying a command line argument and double clicking it. In this mode, it's obviously not a service and a debug window pops up with debug messages, etc. When I run it in this mode, instantiating the SqlCeConnection is instant.
Does anyone know why it would be instant running as an app, but take 15 seconds when running as a service?
Thanks,
Mario
_dbConnection = new SqlCeConnection ();
_dbConnection is declared as a SqlCeConnection inside of the class.
I'm positive that this line is what's causing the delay because I've commented out all of the other code so that this is all that executes when the service starts up.
I can run the app in another mode by specifying a command line argument and double clicking it. In this mode, it's obviously not a service and a debug window pops up with debug messages, etc. When I run it in this mode, instantiating the SqlCeConnection is instant.
Does anyone know why it would be instant running as an app, but take 15 seconds when running as a service?
Thanks,
Mario
Comment