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

Forums / Bugs & Issues / Problem with SF API running as WCF service

Problem with SF API running as WCF service

4 posts, 0 answered
  1. Scott McNeany
    Scott McNeany avatar
    44 posts
    Registered:
    09 Mar 2010
    29 Jul 2010
    Link to this post
    I'm running a WCF service that retrieves generic content so that non-Sitefinity sites can connect to the service to get content. This way, the applications themselves do not need the SF dlls and the bloated web.config entries for SF.

    This works...most of the time. However, every once in awhile I will run into an issue where I get the error below. The error doesn't make sense, because the provider is registered and the service working most of the time is proof of that.

    System.ServiceModel.FaultException`1[[System.ServiceModel.ExceptionDetail, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]: Missing provider: Wiki

    The issue seems to occur when I've had my browser open on the site for an extended period of time and a local web process running (.NET web site), and then come back and perform an operation that requires the service to be hit. If I close my browser and restart my local my local website, it works again. 

    We are getting ready to use this service in our QA environment, so we need to get this cleared up as soon as possible. If you have any suggestions as to how we could resolve this issue, please let me know. 

    Thank you,

    Scott McNeany
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    29 Jul 2010
    Link to this post
    Hi Scott McNeany,

    Thank you for using our services.

    It looks like the website goes idle or something like this. The error message says that it cannot find a provider with name Wiki - this issue will occur if the provider did not properly initialize. When the website gets restarted the all the generic content providers get properly initialized and the web service starts working again.

    This error is rather strange I would say as it is not normal for providers to stop functioning after some period of time. Could you please check your error log file (~/App_Data/sitefinity.log) to see if there are any other errors preceding this one? If there are they might help us see what is going wrong with this provider.

    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
  3. Scott McNeany
    Scott McNeany avatar
    44 posts
    Registered:
    09 Mar 2010
    13 Aug 2010
    Link to this post
    Radoslav,

    Thanks for your help. I've narrowed down this issue to where I can reproduce it consistently. I have my WCF service deployed to the server. If I make a change in the web.config file (I assume this forces a re-initialization of the providers), it will throw the error below.

    What's very interesting is that I can run this code in a loop and it will fail for about 10 seconds, then start working, as long as I have proper error handling code in place so that execution continues.

    System.Configuration.ConfigurationErrorsException: Missing provider: Wiki
       at Telerik.Cms.Engine.ContentManager.OnInitialized()
       at Telerik.ManagerBase`1.Initialize()
       at Telerik.ManagerBase`1..ctor(String providerName)
       at Telerik.Cms.Engine.ContentManager..ctor(String providerName)
       at Telerik.Cms.Engine.ContentManager..ctor()
       at Core.CmsIntegration.Service.RepositoryClasses.CmsContentItemRepository..ctor() in C:\Projects\Core\Core.CmsIntegration\Dev\Source\Core.CmsIntegration.Service\RepositoryClasses\CmsContentItemRepository.cs:line 35
       at Core.CmsIntegration.WcfService.ContentService.GetContent(String category) in C:\Projects\Core\Core.CmsIntegration\Dev\Source\Core.CmsIntegration.WcfService\ContentService.svc.cs:line 52
       at SyncInvokeGetContent(Object , Object[] , Object[] )
       at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs...).
       --- End of inner exception stack trace ---
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    17 Aug 2010
    Link to this post
    Hi Scott McNeany,

    Any change to web.config file makes the website to restart itself. Once the site is restarted you need to wait until it is properly initialized. The initialization of data providers goes in the order in which they are declared in the web.config file. So the Wiki provider will be initialized after News and Blogs for example.

    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
Register for webinar
4 posts, 0 answered