+1-888-365-2779
Try Now
More in this section

Forums / Deployment / Error after deploying

Error after deploying

7 posts, 1 answered
  1. Karen
    Karen avatar
    22 posts
    Registered:
    04 Aug 2010
    07 Jun 2011
    Link to this post
    Hello, I am unable to deploy my SF 4.1 website on Virtual Private Server that runs IIS 7.5, it is working ok on my development machine but after hosting here http://pbc.lynxsel.com/ I get the following error

    The type ExceptionManager cannot be constructed. You must configure the container to supply this value.


    I followed the instructions provided here http://www.sitefinity.com/documentation/installation-and-administration-guide/deploying-sitefinity/deploy-projects-to-private-virtual-server.aspx
    The .NET framework 4.0 is installed
    The IIS recommended settings is installed
    The database is also migrated and the connection string is appropriately changed in DataConfig.config

    Please advise
    Thanks
  2. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    07 Jun 2011
    Link to this post
    Hello Karen,

    Thank you for contacting Telerik Support.

    Make sure that you have set your project on IIS as described in this article: Configuring the IIS to host Sitefinity projects (section Configuring folder permissions). The most common reason for getting this exception is if your application pool identity does not have sufficient permissions over the App_Data folder and its content. If your website is added to source safe make sure it is checked out and is not read only.

    All the best,
    Victor Velev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Karen
    Karen avatar
    22 posts
    Registered:
    04 Aug 2010
    07 Jun 2011
    Link to this post
    Hi Victor

    Thanks for prompt answer, however after giving the permission to the folder I started to get another error relating MS SQL connection

    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)


    I am completely sure that the connection string in DataConfig.config is correct, may be there is another place where the connection string should be specified too?

    Regards
    Karen
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    07 Jun 2011
    Link to this post
    Hello Karen,

    Please check this thread

    http://www.sitefinity.com/devnet/forums/sitefinity-4-x/general-discussions/openaccessexception.aspx

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Karen
    Karen avatar
    22 posts
    Registered:
    04 Aug 2010
    07 Jun 2011
    Link to this post
    Hello Ivan

    Actually this is not my case, as I have about 10 other databases on that server that are used by other websites and no connection issue appears so far.

    There is actually very strange issue here, I created a TestConnection.aspx file and put the following code there
    protected void Page_Load(object sender, EventArgs e)
            {
                string connectionString = GetConnectionString();
                using (SqlConnection connection = new SqlConnection())
                {
                    connection.ConnectionString = connectionString;
                    connection.Open();
                }
            }
     
            static private string GetConnectionString()
            {
                return "{MY CONNECTION STRING GOES HERE}";
            }

    It works perfect on any other website hosted on the same IIS as the SF website (i.e. http://securepark.lynxsel.com/TestConnection.aspx)

    But it is not connecting to database if I put the same page to the folder where SF website is (http://pbc.lynxsel.com/TestConnection.aspx)

    Any idea why?

    Regards
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    09 Jun 2011
    Link to this post
    Hello Karen,

    Sitefinity uses DataConfig form App_Data/Configuration folder

    You can get the connection as shown below

    var dataConfig = Config.Get<DataConfig>();
    IConnectionStringSettings connStrEl;
    var connectionName = "Sitefinity";
    if (dataConfig.TryGetConnectionString(connectionName, out connStrEl) && connStrEl.ProviderName.Equals("System.Data.SqlClient"))
    {
        Response.Write("There is a connection -Sitefinity");
    }
    else
    {
       throw new ConnectionNotFoundException(connectionName );
    }


    The pass the connection string to your code. We use the same logic so this should give you proper results.

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
  7. Karen
    Karen avatar
    22 posts
    Registered:
    04 Aug 2010
    10 Jun 2011
    Link to this post
    Thanks for help Ivan
7 posts, 1 answered