This is a migrated thread and some comments may be shown as answers.

reports connectiing to db on site startup

7 Answers 98 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
David Carnley
Top achievements
Rank 1
David Carnley asked on 10 Oct 2008, 12:08 AM
I am noticing that, when I start my site in the debugger, all of my reports are attempting to contact the SQL Server.  I am not loading a page that has any reports, or any reference ot the report viewer.  And yet all of my reports open their connections prematurely.  I am using Q2 2007.  any ideas?

-David

7 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 10 Oct 2008, 12:39 PM
Hi David,

We were not able to verify your claim. We've used SQL Server Profiler to monitor the requests to the database when we run a page with and without a ReportViewer showing a report. The one not interacting with the report does not record any sql activity. These tests were ran with the latest Telerik Reporting version (Q2 SP2). Can you explain how do you monitor the sql activity?

Regards,
Steve
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
David Carnley
Top achievements
Rank 1
answered on 10 Oct 2008, 02:15 PM
it was really by accident that I noticed... my reports DLL has the connection string for my production server imbedded in it.  Recently I had a change to my server security and now when I use that DLL in my develoment environment the connection cannot be made to the SQL Server address. 

I noticed that my site was taking a very long time to initialize, and I noticed that .NET was showing a Sql Server named pipes errors in the output window when starting a debug session.  I set it to break on all errors, and discovered that the connectivity errors were coming form the report initialization methods.  I opened a VPN connection to my prod server so that the connection strings imbedded in the report DLL would work, and the error msgs went away and the debug session started very quickly.

Later tonight I can get you specific methods and error messages, but I am not at that office today.

This is using Q2 2007.

0
David Carnley
Top achievements
Rank 1
answered on 17 Oct 2008, 09:03 PM
I was finally able to get a capture of the error...

This error is thrown when first loading the website, no attempt is being made to open any report on teh loaded page.  It will throw similar error for EVERY report referenced on the site named in a ReportViewer.  This means it takes FOREVER for my site to come up in debugger (waiting through multiple db time-outs). 


{"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)"} 



at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)
   at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
   at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
   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.QuietOpen(IDbConnection connection, ConnectionState& originalState)
   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 ScreeningwebReports.DataSetSettingsTableAdapters.DataSetSettingsTableAdapter.Fill(DataSetSettingsTableDataTable dataTable) in C:\Development\SourceControl\SWReports\ScreeningwebSolution\ScreeningwebReports\DataSetSettings.Designer.cs:line 845
   at ScreeningwebReports.CompanyHeader..ctor() in C:\Development\SourceControl\SWReports\ScreeningwebSolution\ScreeningwebReports\CompanyHeader.cs:line 27

0
Steve
Telerik team
answered on 20 Oct 2008, 07:42 AM
Hello David,

We do not see how this generic sql error is related to our reporting product. As you can see from the stack trace, there is never a Telerik namespace invoked that might be involved in this. Please try debugging in order to pinpoint where this problem comes from. Even if every report is trying to connect to your db without being opened, which we have not been able to verify, then it would still not explain why it cannot connect to it. Check your connectionStrings and if you have remote connections enabled. More info is available here.

Best wishes,
Steve
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
David Carnley
Top achievements
Rank 1
answered on 20 Oct 2008, 02:31 PM
I know why it is not able to make the connection; that's not the problem.  The problem is, why is it even trying to?

at ScreeningwebReports.CompanyHeader..ctor() in C:\Development\SourceControl\SWReports\ScreeningwebSolution\ScreeningwebReports\CompanyHeader.cs:line 27

CompanyHeader.cs is a class that was constructed by the reports designer as part of a report named "CompanyHeader". 

Is there some setting in the Reports that would tell it to verify settings or connectivity when the dll is loaded, or anything like that?  That's what it appears to be doing, just checking that it can connect.




0
Steve
Telerik team
answered on 22 Oct 2008, 09:08 AM
Hi David,

As we've already explained - we do not "test" connectivity and we have not been able to verify this using SQL Profiler, which is a tool created for the sole purpose of monitoring the connections to the database. Unless you provide us with steps how to reproduce this on our end, we would not be able to help any further on this.

Sincerely yours,
Steve
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
David Carnley
Top achievements
Rank 1
answered on 22 Oct 2008, 02:36 PM
OK, thanks.  If I get any resolution, or manage to create a reproducable test project I can send you, I'll let you know.
Tags
General Discussions
Asked by
David Carnley
Top achievements
Rank 1
Answers by
Steve
Telerik team
David Carnley
Top achievements
Rank 1
Share this question
or