Consuming Lightswitch oData in Gridview

3 posts, 1 answers
  1. Thomas
    Thomas avatar
    15 posts
    Member since:
    Jan 2013

    Posted 03 Feb 2013 Link to this post

    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. Answer
    Rossen Hristov
    Admin
    Rossen Hristov avatar
    2477 posts

    Posted 04 Feb 2013 Link to this post

    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.

  3. Thomas
    Thomas avatar
    15 posts
    Member since:
    Jan 2013

    Posted 04 Feb 2013 Link to this post

    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
Back to Top