Failed to Integrate CMS with my App

Posted by Community Admin on 03-Aug-2018 12:07

Failed to Integrate CMS with my App

All Replies

Posted by Community Admin on 20-Aug-2010 00:00

Hello All,


I have downloaded the Sitefinity 4.0 beta version and did some R7D on the same. I wanted to integrate the same into our project. Following is my project structure:
UI layer
Business Logic Layer
WCF Service Layer
Data Access Objects Layer

I wanted to have the CMS system API calls behind my WCF service so that the other clients of my application can use the same. So, I copied all the required Web.Config entries from my CMS sample site to the web.config of my WCF service and also added the required references.
Then when I was trying to write the following line of code, I am getting a Null reference exception.
ContentManager manager = new Content Manager();

When I investigated this issue, I found that the Providers for ContentManger are null.

Please help me in this regard. I have already spent much time on this and I need to get this ASAP.

Thanks in advance,
Nagen

Posted by Community Admin on 20-Aug-2010 00:00

Hi Nagendra,

The problem is that all manager classes should be used in the context of the Sitefinity website they are pulling data from. Instead you are using them on an external application. What should be done is that if you want to use WCF services to pull data from a Sitefinity website you have to host those services on the Sitefinity website. The whole back-end of Sitefinity relies on WCF services to pull data from our content providers. This means that you can make calls to those services. You can find more information on how to utilize built in services here. You can also find information on how to create your own WCF services to pull data from the content managers here.


Kind regards,
Radoslav Georgiev
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 20-Aug-2010 00:00

Hello Radoslav Georgiev,

Thank you very much for the quick reply. It was very informative.
I have gone through the links you provided in the reply and found that there are some WCF services available. But I am not able to find the services in my system for ex, localhost/.../LocalizationResources.svc. Basically I am not able to find "localhost/.../" path. Please guide me in this regard.

Thanks & Regards,
Nagendra

Posted by Community Admin on 20-Aug-2010 00:00

Hi Nagendra,

Please open your website in Visual Studio. There in the folder structure you will see all services available for use. If you wish to use the Generic Content items you should use the Content.svc in Sitefinity/Services/Common/

All the best,
Radoslav Georgiev
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 20-Aug-2010 00:00

Hello Radoslav Georgiev,

Thanks for the kind and quick reply.
For some reason, I am not having the similar folder as what you have. For your reference I have attached the file herewith. Please guide me on this.

Thanks & Regards,
Nagendra

Posted by Community Admin on 20-Aug-2010 00:00

Hi Nagendra,

Thank you for getting back to me.

Looking at the folder structure I can say that you are working with Sitefinity 3.x version. You have posted your question in a forum which is related to Sitefinity 4.0 Beta version. Excuse me but having the wrong impression of the version you are using I have pointed you do resources which are not applicable in your case.

When working with Sitefinity 3.x you will have to develop your own services which would work with our managers. The bellow linked blog posts contain useful samples on creating webservices to work with our managers:
Use the Content Manager API in a Web Service
Enable loading of CMS pages through an AJAX Web Service

This forum thread also contains a small sample on working with WCF Data services and Sitefinity.

Best wishes,
Radoslav Georgiev
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 20-Aug-2010 00:00

Hello Radoslav Georgiev,

Sorry for the confusion. I see what you mean. The png file I have attached is for Sitefinity 3.x. basically i have installed both the Sitefinity 3.x and 4.0 trail versions and that created the confusion. I found the similar folder structure in another folder. Thanks for your reply.

Now another question:
When I am trying to browse the Content.svc, I am getting the following exception:

Could not load file or assembly 'Telerik.OpenAccess, Version=2010.1.310.2, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342' or one of its dependencies. The system cannot find the file specified.


What does this mean, have I not installed v4.0 or something else?

Thanks,
Nagen

Posted by Community Admin on 20-Aug-2010 00:00

Please ignore my previous reply. I have again downloaded Sitefinity 4.0 and was able to create a site properly.


Thanks,
Nagen

This thread is closed