I have application that is connecting to the DB and if I enter incorrect information about DB server I wait a lot of time for responce and in console (MS output) I see a lot of lines like this:
A first chance exception of type ‘System.Data.SqlClient.SqlException’ occurred in System.Data.dll
How I can configure my app that it will return error after first error line : A first chance exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll. And is it possible or I need to wait long time for exception ?
The wait is most likely due to the timeout values in the connection string settings. Lower those values and it will fail faster.