C # database connection delay

I have an application, it’s done and works, but users are reporting a small problem with it, and to be honest, I thought it might be a problem. As the name says, the application is written in C # (.net 3.5) and uses SQL DB. The “problem” is this: when the application starts first, it takes about a minute and a half to go to the database.

Can this be somehow reduced?

Thank you for your time!

EDIT1: The database is local .. sql server and .net framework are installed simultaneously with the application

EDIT2: when the application looks, everything works fine, and when users open winform, where they need to do some database work, they should wait about half a minute at the first start, after which it works fine.

+5
source share
1 answer

Of the questions I asked in the comments and their respective answers, I suggest the following:

It seems to me that the server agent service can be installed with startup mode Manual. This means that the service will only be launched as needed by the application:

Manual starts a service as required or when called from an application (according to definition, but only some of the time in practice, depending on the service)

To mitigate this, you can create a custom installation action that, as part of your product installation, sets this startup mode to Automatic- this will cause the service to start when Windows starts.

+4
source

All Articles