Unanswered Azure SQL ODATA access

  • Wednesday, June 08, 2011 12:39 AM
     
     

    I have enabled SQL Azure ODATA service but I am having a problem accessing the data across domains.

    What is the best way to resolve the cross domain issue for pure JavaScript web site?

    Can I have a plain http access (not https) to my Azure SQL Odata service for initial debugging and testing?

All Replies

  • Wednesday, June 08, 2011 3:01 AM
     
     

    Hi 

    SQL Azure OData Service can be accessed from both HTTP or HTTPS application. 

    Can you please post the errors you are getting while accessing the SQL Azure OData service ? 

    Please verify the following 

    1. Check whether "Allow Microsoft Services" is enabled in SQL Azure Firewall

    2. Test SQL Azure ODATA service from odata explorer such as http://metasapiens.com/sesame/data-browser/preview/ or http://www.silverlight.net/content/samples/odataexplorer/, Both of these 2 ODATA Explorer websites are running in HTTP and accessing SQL Azure OData service running on HTTPS

    The following articles explains you how to access it from Javascript and ASP.Net

    http://www.asp.net/ajaxlibrary/OData-HOW-TO-Query-an-OData-Service-Using-Ajax.ashx

    http://www.asp.net/ajaxlibrary/OData-HOW-TO-Insert-Data-with-an-OData-Service-Using-Ajax.ashx

    http://www.asp.net/ajaxlibrary/OData-HOW-TO-Update-Data-with-an-OData-Service-Using-Ajax.ashx 

     


    Arunraj Chandrasekaran, MCTS, Author: SQLXpertise.com
    If you found this post useful, let us know by clicking "Vote as Helpful" and Propose as Answer
  • Thursday, June 09, 2011 4:51 PM
     
     

    Hello,

    I have the firewall configured properly because I can access the data from our office. Moreover, I can access the odata service from the browser by typing the URL that I was given when enabled the ODATA service for Azure SQL - https://odata.sqlazurelabs.com/OData.svc/v0.1/mySQLServer/myDatabase/

    However, when I try to access this resource from a java script on a web site running on different domain I am not getting data back although, the call goes out and the odata.sqlazurelabs.com responds with some data but I cannot inspect it because it is encrypted.

    So my first question is how I access the odata.sqlazurelabs.com/OData.svc over HTTP connection since in the configuration portal https://www.sqlazurelabs.com/ConfigOData.aspx I am presented with the https link only.

  • Thursday, June 09, 2011 6:55 PM
     
     

    Hi Kganev,

    SQL Azure OData service is not available over HTTP.

    Did you checked out the article I mentioned above ?

    This below article contains a sample using SQL Azure OData service, Please check it out.


    Arunraj Chandrasekaran, MCTS, Author: SQLXpertise.com
    If you found this post useful, let us know by clicking "Vote as Helpful" and Propose as Answer