Search code examples
javascriptweb-servicesvisual-studio-2013multi-device-hybrid-apps

Web service error for Multi device hybrid apps


I got multi device hybrid apps web service problem.I want to use web service for phone apps. I am try to use ajax for web service but when I start ripple emulator and click button 'send' it gives "Failed to load resource: the server responded with a status of 500 (Internal Server Error)" error. But if I change solution platform to Windows-x64 it works fine.

Here ;

<!DOCTYPE html>

 <html>
 <head>
 <title>Web Service Test</title>

<script src="js/JavaScriptjs.js"></script>
<script type="text/javascript">

    function SendMail() {                  

        var parameters = "{'userName':'" + 'blablabla' + "','userEmail':'" + '[email protected]' + "','Subject':'" + 'blabla' + "','userMessage':'" + 'bla' + "'}";            

        $.ajax({
            type: "POST",
            url: "http://www.teknobilsoft.com/WsTeknobilsoft.asmx/SendMailMessage",
            data: parameters,
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            crossDomain: true,
            cache: false,
            processdata: true,
            success: function (msg) {
                alert(msg);
            },

        });
    }
</script>
</head>
<body>

 <form name="Demo" action="" method="post">
     <div>
         <input type="button" value="send" onclick="SendMail();" />
     </div>
 </form>
 </body>
 </html>

Can you detect problem please?


Solution

  • It seems like the ripple emulator has problems with http POSTs:

    There is an open Ripple issue about it.