I have put an application in windows startup that needs an SQL Server connection but when starting it does not find SQL Server connection. When I close the application and restart it, SQL Server is accessible for the application. I think that my app starts before SQL Server services, but don't know how to fix the problem. Is any way to start the application after SQL Server services? (Maybe I have to fix the problem in my codes behind. How?)
It is likely that your SQL Server service is not started when your application starts. Increase the connection timeout. You can do this in the connection string so that you don't have to change your code.