Windows Azure Mobile Service HTML/JS RRS feed

  • Pergunta

  • When i try to connect my Phonegap (Html/JS) app on a Windows Azure database, i receive the following error: "Error: Undefined". I really don't know what is happening, here is my code:


            <meta charset="utf-8" />
            <meta name="format-detection" content="telephone=no" />
            <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
            <link rel="stylesheet" type="text/css" href="css/index.css" />
            <script src=''></script>
            <script src='cordova-2.5.0.js'></script>
            <script src=""></script>
            <title>Hello World</title>
            <div class="app">
                <div id="deviceready" class="blink">
                    <p class="event listening">Connecting to Device</p>
                    <p class="event received">Device is Ready</p>
            <script type="text/javascript" src="phonegap.js"></script>
            <script type="text/javascript" src="js/index.js"></script>
            <script type="text/javascript" charset="utf-8" src="PushNotification.js"></script>
            <script type="text/javascript">


        try {
              //Windows Azure Connection
              var client = new WindowsAzure.MobileServiceClient(
        var item = { text: "Test" };
        } catch (ex) {
              navigator.notification.alert('Error: ' + ex.description);

    The rest of the code is working fine.

    **** I downloaded the Windows Azure Mobile Service Example and hosted it on localhost and it works fine, but when i compiled it on a Phonegap app i get the same error that i mentioned before.

    I think it can be a CORS problem, but how can i get the domain of the app? Once it'll be a lot of apps in a lot of diferents devices. 

    Thanks for your attention!

    quinta-feira, 24 de outubro de 2013 16:15