This is a migrated thread and some comments may be shown as answers.

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

3 Answers 52 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 14 Jun 2012, 09:23 PM
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

3 Answers, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 19 Jun 2012, 07:13 AM
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.
0
Daniel
Top achievements
Rank 1
answered on 19 Jun 2012, 01:30 PM
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
0
Genady Sergeev
Telerik team
answered on 22 Jun 2012, 07:46 AM
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.
Tags
ComboBox
Asked by
Daniel
Top achievements
Rank 1
Answers by
Genady Sergeev
Telerik team
Daniel
Top achievements
Rank 1
Share this question
or