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

Forums / Bugs & Issues / No connection with the name of "DefaultConnection" was found

No connection with the name of "DefaultConnection" was found

5 posts, 0 answered
  1. JGarland
    JGarland avatar
    30 posts
    Registered:
    11 Nov 2006
    30 Dec 2010
    Link to this post
    Getting this error. It was working fine last night. No changes have been made to the environment.
    Did an IISreset - still doesnt work. Database is up and running. Other Sitefinity sites on the same server are working.

    [ConfigurationErrorsException: No connection with the name of "DefaultConnection" was found.]
       Telerik.DataAccess.NolicsHelper.SetConnection(String connectionName, String providerName) +1105
       Telerik.Cms.Data.DefaultProvider.Initialize(String name, NameValueCollection config) +217
       Telerik.ManagerBase`1.InstantiateProvider(ProviderSettings providerSettings, Type providerType) +673
       Telerik.ManagerBase`1.InstantiateProvider(ProviderSettings providerSettings) +91
       Telerik.ManagerBase`1.SetProvider(String providerName) +203
       Telerik.ManagerBase`1..ctor(String providerName) +89
       Telerik.Cms.Web.UrlHelper.Initialize(CmsHttpModule cmsModule) +44
       Telerik.Cms.Web.CmsHttpModule.Init(HttpApplication context) +86
       System.Web.HttpApplication.InitModulesCommon() +65
       System.Web.HttpApplication.InitModules() +43
       System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +729
       System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +298
       System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +107
       System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +289

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    30 Dec 2010
    Link to this post
    Hi JGarland,

    You are getting the error because there is not a connectionString called  "DefaultConnection" in your web.config file.

    Please make sure that you have the following lines in your web.config file

    <dataAccess defaultConnection="DefaultConnection">       
       <connections>
        <add name="DefaultConnection" driver="Telerik.DataAccess.Providers.ExtendedSqlServer2005Provider, Telerik.DataAccess" connectionStringName="Sitefinity" />
        <add name="GenericContentConnection" driver="Telerik.Cms.Engine.Data.Providers.GCSql2005Provider, Telerik.Cms.Engine.Data" connectionStringName="Sitefinity" />
       </connections>
      </dataAccess>


    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. JGarland
    JGarland avatar
    30 posts
    Registered:
    11 Nov 2006
    30 Dec 2010
    Link to this post
    It is in there. I havent changed anything.

    <

     

    dataAccess defaultConnection="DefaultConnection">

     

    <

     

    connections>

     

     

    <

     

    add name="GenericContentConnection" driver="Telerik.Cms.Engine.Data.Providers.GCSql2005Provider, Telerik.Cms.Engine.Data" connectionStringName="Sitefinity"/>

     

    </

     

    connections>

     

    </

     

    dataAccess>

     

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    30 Dec 2010
    Link to this post
    Hello JGarland,

    The lines you posted have only GenericContentConnection but there is no connection for "DefaultConnection", which you explicitly set as defaultConnection. Please check the highlighted part of my code snippet.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. JGarland
    JGarland avatar
    30 posts
    Registered:
    11 Nov 2006
    30 Dec 2010
    Link to this post
    Ok, added a second line in <connections> for "DefaultConnection" seemed to have worked. Weird.

    <add name="GenericContentConnection" driver="Telerik.Cms.Engine.Data.Providers.GCSql2005Provider, Telerik.Cms.Engine.Data" connectionStringName="Sitefinity"/>
      
    <add name="DefaultConnection" driver="Telerik.Cms.Engine.Data.Providers.GCSql2005Provider, Telerik.Cms.Engine.Data" connectionStringName="Sitefinity"/>
Register for webinar
5 posts, 0 answered