News from multiple sources (providers)

Posted by Community Admin on 03-Aug-2018 11:34

News from multiple sources (providers)

All Replies

Posted by Community Admin on 09-Dec-2010 00:00

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.

Posted by Community Admin on 09-Dec-2010 00:00

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

Posted by Community Admin on 09-Dec-2010 00:00

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" />

Posted by Community Admin on 09-Dec-2010 00:00

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

Posted by Community Admin on 14-Feb-2011 00:00

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?

Posted by Community Admin on 15-Feb-2011 00:00

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

This thread is closed