Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jul 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

  • #2
    New to the CF scene
    Join Date
    Jul 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •