我得到了多設備混合應用程序的Web服務問題。我想爲手機應用程序使用Web服務。我嘗試使用ajax進行web服務,但是當我啓動ripple emulator並單擊按鈕'send'時,它會顯示「無法加載資源:服務器響應的狀態爲500(內部服務器錯誤)」錯誤。但是,如果我將解決方案平臺更改爲Windows-x64,它可以正常工作。多設備混合應用程序的Web服務錯誤
這裏;
<!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>
您能檢測到問題嗎?
服務器拋出500的異常是什麼? – Flores 2014-10-04 15:20:39
如果你得到它的工作,我會從這個消息混淆該網址,或者你將很快成爲垃圾郵件中繼.. – Flores 2014-10-06 06:43:57
File:xhr_proxy,Line:0,Column:0 – TeknobilSoft 2014-10-06 13:22:40