CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Jul 2010
    Posts
    3

    Ajax 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. #2
    Join Date
    May 2002
    Posts
    10,943

    Re: Ajax Web Method Problem

    If the only change is the server, then AJAX isn't your problem...after all, AJAX is a client-side implementation.

    What debugging errors does Firefox's Error Console give you?
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured