Deployment problem

Thread is closed for posting
3 posts, 1 answers
  1. Markus
    Markus avatar
    36 posts
    Member since:
    Dec 2008

    Posted 14 Jul 2009 Link to this post


    The project:
    - RepLibrary (Telerik Report)
    - DalLibrary (Telerik Open Access)
    - Web Application

    - Web access datas (no problem), passed IScopeObject to ReportingLibrary when generating a Report, Report access datas (no problem in the development environment)
    - To be a bit clearer: In the report, the provided dataset, incl -Tableadapter, method is used to fill the report with data. For the reason of localization, i have to go, via the DalLibrary and the passed Scope from the Web, to get other text from the database.
    - No problems in development, it works good.

    Now, I deploy the solution on the hosting provider, the data access for the Web Application works good (changed connectionstring defined in web.config). But calling a report, followin error message appears:
    A network-related or instance-specific error occurred while establishing a connection to SQL Server. 
    The server was not found or was not accessible. 
    Verify that the instance name is correct and that SQL Server is configured to allow remote connections. 
    (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)  
    The stack:
    [SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to 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) +4844759  
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194  
       System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) +4858065  
       System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +90  
       System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +342  
       System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +221  
       System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +189  
       System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +185  
       System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +31  
       System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +433  
       System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66  
       System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +499  
       System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +65  
       System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117  
       System.Data.SqlClient.SqlConnection.Open() +122  
       System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +31  
       System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +112  
       System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) +162  
       System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +115  
       REP_LCSP.dsKundenModulByOrderIdTableAdapters.dsKundenModulByOrderIdTableAdapter.Fill(dsKundenModulByOrderIdTableDataTable dataTable) in \\shiraz\SHIRAZ_inetpub\wwwroot\SOUPAC\REP_LCSP\dsKundenModulByOrderId.Designer.cs:1051  
       REP_LCSP.subRegisterConfirmModul..ctor(IObjectScope _Scope, SByte _Sprache) in \\shiraz\SHIRAZ_inetpub\wwwroot\SOUPAC\REP_LCSP\subRegisterConfirmModul.cs:49  
       REP_LCSP.repRegisterConfirmMaster.InitializeComponent() in \\shiraz\SHIRAZ_inetpub\wwwroot\SOUPAC\REP_LCSP\repRegisterConfirmMaster.Designer.cs:51  
       REP_LCSP.repRegisterConfirmMaster..ctor(IObjectScope _Scope, SByte _Sprache) in \\shiraz\SHIRAZ_inetpub\wwwroot\SOUPAC\REP_LCSP\repRegisterConfirmMaster.cs:55  
       LCSP.Public.register.doSaferpaySuccess() in \\shiraz\SHIRAZ_inetpub\wwwroot\SOUPAC\Web\public\register.aspx.cs:1890  
       LCSP.Public.register.Page_Load(Object sender, EventArgs e) in \\shiraz\SHIRAZ_inetpub\wwwroot\SOUPAC\Web\public\register.aspx.cs:327  
       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14  
       System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35  
       System.Web.UI.Control.OnLoad(EventArgs e) +99  
       System.Web.UI.Control.LoadRecursive() +50  
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627 

    I guess, the RepLib is still trying to read from the development database. And that's not good. I don't know which part, the report generating or the Open Access part. There are two sections in the app.config of the RepLibrary:

    <?xml version="1.0"?>  
        <section name="openaccess" type="Telerik.OpenAccess.Config.ConfigSectionHandler, Telerik.OpenAccess.Config, Version=, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342" /> 
        <add name="REP_LCSP.Properties.Settings.LC_SP" connectionString="Data Source=Shiraz;Initial Catalog=LC_SP;Persist Security Info=True;User ID=xyz;Password=abc" providerName="System.Data.SqlClient" /> 
      <openaccess xmlns="">  
          <reference assemblyname="DAL_LCSP" configrequired="True" /> 
          <connection id="ConnStringLib">  
          <backendconfiguration id="mssqlConfiguration" backend="mssql">  
        <mappings current="mssqlMapping">  
          <mapping id="mssqlMapping" /> 

    After reading a lot of posts, i tried to deploy the app.config files of the libraries as well. DalLibrary didn't want to run, so i put app.config back to "embedded resource". I don't know if the RepLibrary config file extraction worked, because i still get the same error, when generating a report. So i defined that app.config back to "embedded Resource" as well.

    Does anyone have a clue/hint?

  2. Answer
    Alexander avatar
    727 posts

    Posted 15 Jul 2009 Link to this post

    Hello Markus,

    When you deploy an OpenAccess project, the app.config file should be set as "embedded resource", you have already done that. It seems the problem is related to the reporting project only. You can try moving the reporting connection string from the App.config to the Web.config file. Hope this will solve the problem.

    Best wishes,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Markus
    Markus avatar
    36 posts
    Member since:
    Dec 2008

    Posted 15 Jul 2009 Link to this post

    Hi Alexander

    Thanks a lot for your advise. That did the trick!

Back to Top