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

Consuming Lightswitch oData in Gridview

2 Answers 65 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 03 Feb 2013, 07:01 PM
Hi,
i try to bind RadGridView to Lightswitch oData like in this sample

http://blogs.telerik.com/blogs/posts/12-09-10/consuming-lightswitch-odata-services-with-microsoft-visual-studio-2012-and-telerik-raddataservicedatasource.aspx?utm_source=twitter&utm_medium=sm&utm_campaign=button

As i work in debuging mode an use the local Service refference, it works. But if i deploy the Lighstwitch Service to a web-Server, i get no data.

Direct calling the Service in a browser on the same machine works fine.

Any hints?

Regards
Thomas

2 Answers, 1 is accepted

Sort by
0
Accepted
Rossen Hristov
Telerik team
answered on 04 Feb 2013, 08:03 AM
Hi,

Maybe the service is not accessible on this remote server (permissions, etc.), but we have no idea why. Can you confirm that this service is accessible if you try to access it directly with your browser? Maybe Fiddler can help identify what happens between the client and the server.

All the best,
Rossen Hristov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Thomas
Top achievements
Rank 1
answered on 04 Feb 2013, 01:49 PM
Ok, i think, i´ve found a solution.

I need a clientaccesspolicy.xml file in the root of my web-application.

Fiddler was a very good tip.

<?xml version="1.0" encoding="utf-8"?>
<access-policy>
  <cross-domain-access>
    <policy>
      <allow-from http-request-headers="*">
        <domain uri="*"/>
      </allow-from>
      <grant-to>
        <resource path="/" include-subpaths="true"/>
      </grant-to>
    </policy>
  </cross-domain-access>
</access-policy>

Regards

Thomas
Tags
GridView
Asked by
Thomas
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Thomas
Top achievements
Rank 1
Share this question
or