Error when trying to use the demo code

2 posts, 0 answers
  1. Cory Aston
    Cory  Aston avatar
    24 posts
    Member since:
    May 2006

    Posted 03 Feb 2009 Link to this post

    The telerik trainer software is working great.  But I can't use the code that is sent with it when a database connection is required.  I am getting the following error:

     

    Server Error in '/WebSite' Application.

    An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)



    Stack Trace:

    [SqlException (0x80131904): An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)]
       System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +800131
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +186
       System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) +737554
       System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +114
       System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +421
       System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +181
       System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +173
       System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +357
       System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +30
       System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
       System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
       System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +494
       System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
       System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
       System.Data.SqlClient.SqlConnection.Open() +111
       System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121
       System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137
       System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
       System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770
       System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17
       System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
       Telerik.Web.UI.GridTableView.PerformSelect() +4
       System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
       Telerik.Web.UI.GridTableView.DataBind() +304
       Telerik.Web.UI.RadGrid.DataBind() +77
       System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
       System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69
       System.Web.UI.Control.EnsureChildControls() +87
       Telerik.Web.UI.GridBaseDataList.get_Controls() +12
       Telerik.Web.UI.RadAjaxControl.PopulatePlainPanels(Control parent, List`1 list, Control root) +66
       Telerik.Web.UI.RadAjaxControl.OnPagePreRender(Object sender, EventArgs e) +1174
       System.EventHandler.Invoke(Object sender, EventArgs e) +0
       System.Web.UI.Control.OnPreRender(EventArgs e) +2117788
       System.Web.UI.Control.PreRenderRecursiveInternal() +86
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
    

    I've looked up that error on the web and done a couple of things...

    1) installed the adventureworks database
    2) updated the sql server express instance to allow both named pipes and TCP/IP connections.

    Is there something else that I need to do to make the items work???

    Thanks!

    Cory Aston
  2. Ivo
    Admin
    Ivo avatar
    689 posts

    Posted 05 Feb 2009 Link to this post

    Hello Cory Aston,

    Thank you for this report.
    We are now working on the new version of the Telerik Trainer which should be released shortly. Please try the latest preview available at http://www.telerik.com/download/TT2.3.2.12.zip. This new version has much better database support. The Trainer now allows you to configure what database to use. If you have a local SQLServer Express it automatically uses it. It can find any servers that are local or are on the network and allow browsing. You can configure how to connect (Windows Integrated is default), and test your connection. When the trainer loads a session that uses a database, it downloads it if not already present, and automatically attached it to the SQL Server (if local). It then changes the config file of the loaded session so it points to the database and uses your configured authentication. So now database examples work automagically with no configuration. There is also a new Database tab in the Preferences.

    Please try this new build and let us know if you still experience any problems.

    Kind regards,
    Ivo
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top