RadScheduler WCF binding on SharePoint site

2 posts, 0 answers
  1. Aleksandras
    Aleksandras avatar
    1 posts
    Member since:
    May 2011

    Posted 26 Nov 2013 Link to this post

    I'm trying to make WCF binding to work on SharePoint site. Basically all code is nearly the same as it is in demo example.
    After some investigation I found out that on OnClientRequestSuccess() event I see appointments array - so it looks like it manages to get appointments from the service. However on OnClientDataBound() event - there are no appointments. As a result - there are no visible appointments in the view by some reason.

    I tried similar scenario with isolated Web project (outside SharePoint site) - and it works. So it's somehow related to SharePoint and related changes.. Any ideas?

    Main difference related to SharePoint is in *.svc file, it looks like that:

    <%@ ServiceHost Language="C#" Debug="true" Service="CustomPlannerService, $SharePoint.Project.AssemblyFullName$" Factory="Microsoft.SharePoint.Client.Services.MultipleBaseAddressWebServiceHostFactory, Microsoft.SharePoint.Client.ServerRuntime, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

    Also I had to implement some sort of authorization, because anonymous access is not supported:
    protected void RadScheduler1_ResourcesPopulating(object sender, ResourcesPopulatingEventArgs e)
    HttpCookie cookie = FormsAuthentication.GetAuthCookie(User.Identity.Name, false);
    string cookieHeader = string.Format("{0}={1}", cookie.Name, cookie.Value);
    e.Headers.Add(HttpRequestHeader.Cookie, cookieHeader);

    My web.config, which is located in ISAPI folder under SharePoint root (it's just an additional/local web.config):
    <?xml version="1.0" encoding="utf-8" ?>
        <customErrors mode="Off"/>
            <jsonSerialization maxJsonLength="5000000"/>
          <service name="CustomPlannerService">
            <endpoint address="" behaviorConfiguration="CustomPlannerServiceBehavior" binding="webHttpBinding" contract="CustomPlannerService"/>
            <behavior name="CustomPlannerServiceBehavior">
            <behavior name="">
              <serviceMetadata httpGetEnabled="true"/>
              <serviceDebug includeExceptionDetailInFaults="false"/>

    Update: found out that issue was coming because my webservice was returning data in slightly different format. Managed to workaround it and now events are shown in the Scheduker.
  2. Boyan Dimitrov
    Boyan Dimitrov avatar
    1728 posts

    Posted 29 Nov 2013 Link to this post


    I would like to clarify that we are not aware of such problem with RadScheduler in SharePoint populated from WCF service. It is quite unusual issue considering the fact that the service is accessible and the data is successfully loaded from the service. Usually the problem you might face is that the request to the services fails or the service could not be accessed.

    Boyan Dimitrov
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. Telerik UI for ASP.NET Core is out
Back to Top