StrataFrame Forum

SqlException in Appmain

http://forum.strataframe.net/Topic8329.aspx

By Tim Dol - 4/19/2007

I'm getting the following error on 4 laptops trying to run my application.  The rest of the laptops/workstations (approx 10) can login without a problem. The setup seems to be the same on all clients and I have double checked the application versions and everything seems to be fine.

Any ideas on what is causing the problem?

Thanks,
Tim

SqlException

            Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

 

Source     : .Net SqlClient Data Provider

 

Stack Trace:

   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)

   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)

   at System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync()

   at System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32 bytesExpected)

   at System.Data.SqlClient.TdsParser.ConsumePreLoginHandshake(Boolean encrypt, Boolean trustServerCert, Boolean& marsCapable)

   at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup)

   at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)

   at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)

   at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)

   at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)

   at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)

   at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)

   at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)

   at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)

   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)

   at System.Data.SqlClient.SqlConnection.Open()

   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)

   at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)

   at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)

   at MicroFour.StrataFrame.Data.DbDataSourceItem.GetDataTable(DbCommand Command, OnChangeEventHandler CallBack)

   at MicroFour.StrataFrame.Data.SqlDataSourceItem.GetDataTable(DbCommand Command, OnChangeEventHandler CallBack)

   at MicroFour.StrataFrame.Data.DataLayer.GetDataTable(DbCommand Command, Boolean RegisterNotification)

   at MicroFour.StrataFrame.Business.BusinessLayer.FillDataTable(DbCommand CommandToExecute)

   at MicroFour.StrataFrame.Security.BusinessObjects.SFSPreferencesBO.FillAll(Int32 ProjectPK)

   at MicroFour.StrataFrame.Security.BusinessObjects.SFSPreferencesBO.RetrieveSecurityPreferences()

   at Avanti.MenuSystem.AppMain.InitApplication(InitializingApplicationEventArgs e)

   at MicroFour.StrataFrame.Application.StrataFrameApplication.Raise_InitializingApplication(InitializingApplicationEventArgs e)

   at MicroFour.StrataFrame.Application.StrataFrameApplication.RunApplication()

   at Avanti.MenuSystem.AppMain.Main()

 

By Trent L. Taylor - 4/19/2007

These machines are giving you a valid message.  They cannot connect to the SQL Server and are timing out.  This can be caused from firewalls (including the Windows FIrewall), incorrect connection strings (turn on DAL debuging or reset the connection strings), or the server flat out not being there.  You might look at each of these and if none of these options work let me know.
By Tim Dol - 4/20/2007

I will check the firewall and turn on debugging this morning so hopefully this will provide some further insight. I created a ODBC DSN just to test DB access and it worked fine.

Thanks

Tim

By StrataFrame Team - 4/20/2007

If you're using the connection manager to manage get the connection string for this workstation, you might try using the ConnectionManager.ShowAvailableConnections() and change the connection string.

It also might be a DNS problem if the connection string is using the server name rather than the ip address of the server.