Try our conversational search powered by Generative AI!

The ConnectionString property has not been initialized

This error occurs when a page inherits from our own base class, which in turn inherits from EPiServer.TemplatePage. The code works in 4.61, but we get this error in CMS. The error occurs when we try to access CurrentPage in Page_Init. Any suggestions? What can cause the connection string to be uninitialized? Is that even the real problem? InvalidOperationException: The ConnectionString property has not been initialized.] System.Data.SqlClient.SqlConnection.PermissionDemand() +856947 System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection outerConnection) +22 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105 System.Data.SqlClient.SqlConnection.Open() +111 EPiServer.DataAccess.DataAccessBase.OpenConnection() +143 EPiServer.DataAccess.PageListDB.ListPageEndPoints() +91 EPiServer.DataFactoryCache.?() +92 EPiServer.DataFactoryCache.?() +197 EPiServer.DataFactoryCache.?(DataFactory ) +11 EPiServer.DataFactory..ctor(ApplicationConfiguration config) +155 EPiServer.Global.get_EPDataFactory() +54 EPiServer.EditPage.get_CurrentPage() +52 ...
Aug 03, 2007 15:57
Is this just a local problem for one page/function or is the problem simply that the database cannot be connected with the current connection string?
Aug 16, 2007 13:39
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.