Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 01, 2012 02:16 AM by Otomii Lu - MSFT
Contributor
2475 Points
922 Posts
Feb 28, 2012 06:25 AM|LINK
Hi
I am calling a RIA wcf service from jQuery. For that I have used the following code
try { var request = $.ajax({ url: "servicename.svc", type: "POST", data: { error : errMsg }, dataType: "html" }); request.done(function (msg) { alert("success" + msg); }); request.fail(function (jqXHR, textStatus) { alert("fail" + textStatus); }); } catch (e) { alert(e); }
in the service we have a method called LogException and inside the method we have a parameter called error of type string.
But the call is failed. Please advice
Star
8309 Points
1441 Posts
Feb 28, 2012 08:15 AM|LINK
Hi,
do you get any error message? If so, could you please post it?
Feb 28, 2012 08:18 AM|LINK
request.fail method is called. I am getting following error - failerror.
Feb 28, 2012 08:20 AM|LINK
You misunderstood me. Could you please provide the complete error message?
Feb 28, 2012 08:27 AM|LINK
From the above code I am getting this error message. When the error occurs
fail method calls. Do I need to change the code to get the detail error message. Please advice
3064 Points
490 Posts
Microsoft
Mar 01, 2012 02:16 AM|LINK
Hi karang ,
please try to use fiddler to moniter the infomation when you send the data.
And one more link that might help you:
http://forums.asp.net/p/1773643/4856586.aspx/1?Re+Not+able+to+consume+WCF+service+using+javascript+Net+4+0+
karang
Contributor
2475 Points
922 Posts
Call fail
Feb 28, 2012 06:25 AM|LINK
Hi
I am calling a RIA wcf service from jQuery. For that I have used the following code
try { var request = $.ajax({ url: "servicename.svc", type: "POST", data: { error : errMsg }, dataType: "html" }); request.done(function (msg) { alert("success" + msg); }); request.fail(function (jqXHR, textStatus) { alert("fail" + textStatus); }); } catch (e) { alert(e); }Karan Gupta
http://gyansangrah.com
Please click "Mark as Answer" if this helped you.
Horizon_Net
Star
8309 Points
1441 Posts
Re: Call fail
Feb 28, 2012 08:15 AM|LINK
Hi,
do you get any error message? If so, could you please post it?
If my post solves your problem, please mark as answer.
karang
Contributor
2475 Points
922 Posts
Re: Call fail
Feb 28, 2012 08:18 AM|LINK
Hi
request.fail method is called. I am getting following error - failerror.
Karan Gupta
http://gyansangrah.com
Please click "Mark as Answer" if this helped you.
Horizon_Net
Star
8309 Points
1441 Posts
Re: Call fail
Feb 28, 2012 08:20 AM|LINK
You misunderstood me. Could you please provide the complete error message?
If my post solves your problem, please mark as answer.
karang
Contributor
2475 Points
922 Posts
Re: Call fail
Feb 28, 2012 08:27 AM|LINK
From the above code I am getting this error message. When the error occurs
fail method calls. Do I need to change the code to get the detail error message. Please advice
Karan Gupta
http://gyansangrah.com
Please click "Mark as Answer" if this helped you.
Otomii Lu - ...
Contributor
3064 Points
490 Posts
Microsoft
Re: Call fail
Mar 01, 2012 02:16 AM|LINK
Hi karang ,
please try to use fiddler to moniter the infomation when you send the data.
And one more link that might help you:
http://forums.asp.net/p/1773643/4856586.aspx/1?Re+Not+able+to+consume+WCF+service+using+javascript+Net+4+0+