Go Back   CodingForums.com > :: Client side development > JavaScript programming > Ajax and Design

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-28-2010, 04:21 PM   PM User | #1
rompetoto
New to the CF scene

 
Join Date: Jul 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
rompetoto is an unknown quantity at this point
AJAX and ASP.NET Web Method Problem

I have an application which has been using JQuery AJAX and VB.NET Web Methods just fine in an earlier version of IIS. I have recently moved over to IIS7 and now i am getting ajax errors. It seems like no data is getting sent to the web methods...

Here is a code snippet of my ajax:
Code:
function doAjax(_url, _name, _dataToSend, _sFunc){
	$.ajax({
		type: "POST", 
		async: false, 
		url: _url + "/" + _name + "/", 
		data: "{'text':'" + _dataToSend + "'}", 
		contentType: "application/json; charset=utf-8", 
		dataType: "json", 
		success: function(msg){ _sFunc(msg.d); },
		error:function (xhr, ajaxOptions, thrownError){ 
			if(SHOW_AJAX_ERRORS) alert(_name + "_ERROR ::: " + xhr.status); 
		}  
	});
}
And i just fill in the function with my needed parameters for each us of it.

Anyways, the problem is, is that it is always going to the error function.

Anyone have any idea???

Thanks
rompetoto is offline   Reply With Quote
Old 07-29-2010, 05:44 PM   PM User | #2
rompetoto
New to the CF scene

 
Join Date: Jul 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
rompetoto is an unknown quantity at this point
More info on the problem, when i change the data type of the ajax request to "html", the doAjax method does return a success, but it returns the whole page as a message. I do not think it is even touching my web method in the code behind file.

PLEASE HELP, THIS IS URGENT!
rompetoto is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:10 AM.


Advertisement
Log in to turn off these ads.