More in this section

Forums / General Discussions / News from multiple sources (providers)

News from multiple sources (providers)

6 posts, 0 answered
  1. HMcCracken
    HMcCracken avatar
    4 posts
    Registered:
    29 Aug 2007
    09 Dec 2010
    Link to this post
    I have 2 separate instances of Sitefinity 4.x with 2 separate databases, and I am wanting to display News (and Events) from both SF instances in one of the instances.

    I accomplished this in 3.x however am having problems in 4.x with all the new config files.  Would you be able to step me through the process in 4.x?

    Thanks.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    09 Dec 2010
    Link to this post
    Hi HMcCracken,

    You can do this from Sitefinity >> Administration >> Settings >> Advanced. You have to set

    1.new connection string in DataConfig.config

    2. modify the configuration by adding parameter - connectionString

    Please take a look at attached screenshot.

    All the best,
    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. HMcCracken
    HMcCracken avatar
    4 posts
    Registered:
    29 Aug 2007
    09 Dec 2010
    Link to this post
    I have completed that bit however when I navigate to the News module I still only see the news items from the current instance. How exactly are they supposed to appear?  Mixed in or should I be able to switch between providers in that page?

    In the DataConfig, this is what I have:

    <add connectionString="data source=[masked.ip];UID=[username];PWD=[password];initial catalog=[CURRENTSITE]" providerName="System.Data.SqlClient" name="Sitefinity" />
    <add connectionString="data source=[masked.ip];UID=[username];PWD=[password];initial catalog=[OTHERSITE]" providerName="System.Data.SqlClient" name="SitefinityInstance2" />

    And then in the NewsConfig I have this:

    <add version="4.0.907.0" name="OpenAccessDataProvider" />
    <add description="National News" resourceClassId="" connectionString="data source=[masked.ip];UID=[maskedusername];PWD=[maskedpassword];initial catalog=[OTHERSITE]" applicationName="SitefinityInstance2" enabled="True" version="4.0.907.0" name="SitefinityInstance2" />
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    09 Dec 2010
    Link to this post
    Hi HMcCracken,

    There is a parameter - applicationName that should be different if you want to see the items separately from both the providers.
    You can also restart the application after the modifications to the Settings section. When you go to News, you should see two tabs that represents your providers.

    All the best,
    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. Dallas Beek
    Dallas Beek avatar
    10 posts
    Registered:
    19 May 2010
    14 Feb 2011
    Link to this post
    I'm trying to do basically the same thing.  I want to pull the news from the corporate site

    In DataConfig.config
    <add connectionString="data source=server;UID=user;PWD=pass;initial catalog=Site" providerName="System.Data.SqlClient" name="Sitefinity" />
    <add connectionString="data source=server;UID=user;PWD=pass;initial catalog=Corp" providerName="System.Data.SqlClient" name="Corporate" />

    In NewsConfig.config
    <providers>
        <add version="4.0.1091.0" name="OpenAccessDataProvider" />
        <add description="Corporate News" resourceClassId="" connectionString="Corporate" applicationName="Corporate" type="Telerik.Sitefinity.Modules.News.Data.OpenAccessNewsProvider" enabled="True" version="4.0.907.0" name="CorporateProvider" />
      </providers>

    But I'm getting an error
    Field 'UrlName_' of class 'Telerik.Sitefinity.GenericContent.Model.Content' is described as compiled and artificial at the same time. --> Telerik.Sitefinity.Model, Version=4.0.1091.0, Culture=neutral, PublicKeyToken=b28c218413bdf563/namespace[Telerik.Sitefinity.GenericContent.Model]/class[Telerik.Sitefinity.GenericContent.Model.Content]/field[UrlName_]

    What does that mean?
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    15 Feb 2011
    Link to this post
    Hi HMcCracken,

    Could you try to use the same version for both the projects? It looks like you use two projects with different version .

    Best wishes,
    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
6 posts, 0 answered