Error after deploying

Posted by Community Admin on 05-Aug-2018 10:50

Error after deploying

All Replies

Posted by Community Admin on 07-Jun-2011 00:00

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 www.sitefinity.com/.../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

Posted by Community Admin on 07-Jun-2011 00:00

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

Posted by Community Admin on 07-Jun-2011 00:00

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

Posted by Community Admin on 07-Jun-2011 00:00

Hello Karen,

Please check this thread

www.sitefinity.com/.../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

Posted by Community Admin on 07-Jun-2011 00:00

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. 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 (pbc.lynxsel.com/TestConnection.aspx)

Any idea why?

Regards

Posted by Community Admin on 09-Jun-2011 00:00

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

Posted by Community Admin on 10-Jun-2011 00:00

Thanks for help Ivan

This thread is closed