LoadOnDemand via WCF service hosted in another site on the same server

4 posts, 0 answers
  1. Daniel
    Daniel avatar
    7 posts
    Member since:
    Jan 2012

    Posted 14 Jun 2012 Link to this post

    Hello,

    I am trying to set up a RadComboBox as follows:

    <telerik:RadComboBox ID="rcbEntities" runat="server" Width="440px" Height="140px"

                                    ShowToggleImage="False" EmptyMessage="Start Typing..." MinFilterLength="3" EnableLoadOnDemand="true"

                                    ShowMoreResultsBox="True" EnableVirtualScrolling="True" HighlightTemplatedItems="True"

                                    OnClientSelectedIndexChanged="rcbEntities_SelectedIndexChanged"

                                    OnClientItemsRequested="rcbEntities_ClientItemsRequested">

                                    <WebServiceSettings Method="GetEntities" Path="~/TestService.svc" />

                                </telerik:RadComboBox>


    Everything works fine as long as the WCF service is in the same project as the aspx page containing the control. However, I'd like to be able to pull data from a service hosted on the same server, but under a different site in IIS, together with all the other data services in the company.

    Do you have a detailed example of a simple service that is defined in a separate VS project / IIS site and is being called from a RadComboBox to perform autocomplete ?


    Thanks!
    Daniel
  2. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1600 posts

    Posted 19 Jun 2012 Link to this post

    Hello Daniel,

    Unfortunately this is not possible due to XSS restrictions that are present in every major browser. In short, this means that one is not able to access web service located in another domain using JavaScript since this may expose security vulnerabilities. Is it necessary to place the service in another domain?

    Greetings,
    Genady Sergeev
    the Telerik team
    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 their blog feed now.
  3. Daniel
    Daniel avatar
    7 posts
    Member since:
    Jan 2012

    Posted 19 Jun 2012 Link to this post

    Thanks Genady,

    The service will not be on another domain -- just a different IIS site under the same domain name and even the same physical server. Does this make a difference?

    Daniel
  4. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1600 posts

    Posted 22 Jun 2012 Link to this post

    Hello Daniel,

    We don't have such example, however, if the domain name is the same there should be no problem to consume the service from RadComboBox.

    Regards,
    Genady Sergeev
    the Telerik team
    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 their blog feed now.
Back to Top