WCF Service Post Request from JQuery in window phone not working
-
Wednesday, April 11, 2012 9:59 AM
I am working on window phone and use PhoneGap I create WCF service and call it from AJAX JQuery Its working Fine when ever i send a GET request but it occure error when i send a POST request
My WCF service code here:
[WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.WrappedRequest, ResponseFormat = WebMessageFormat.Json)]
Container LoginService(string username, string password);Calling JQuery Code Here:
$.ajax({ type: "POST",
url:"http://localhost:8021/Service1.svc/loginservice" ,
// dataType: 'jsonp',
data: '{ "username":"abdul","password":"pass"}',
success: function (val) { navigator.notification.alert(val.Message, alertdismiss, 'Message', 'ok'); },
error: OnError,
async: false,
cache: false
});What wrong with this code when it run on window phone ???
any help will be great appreciated
- Moved by Jesse JiangMicrosoft Contingent Staff Thursday, April 12, 2012 8:49 AM (From:Windows Mobile Development)
All Replies
-
Thursday, April 12, 2012 6:24 AM
Hi,
Please try your query in Windows Phone 7 forums as this forums is dedicated to Windows Mobile.
Community forums for Windows Phone 7
As it is phonegap related , you may also need to try phonegap related forums.
-Malleswar
- Proposed As Answer by Jesse JiangMicrosoft Contingent Staff Thursday, April 12, 2012 8:49 AM
- Marked As Answer by Mr. WhartyMicrosoft Community Contributor, Moderator Thursday, May 31, 2012 6:33 AM