I'm having trouble getting an AJAX call to work, The fail error is the common 404 which means that the call cant find the file/function i wish to call. The problem is even when i use an absolute path in the call it still 404's on me. I can physically inspect the file on the server and even using the same path access an image or .txt file in the same directory through the web.
$.ajax({
type: "post",
url: "http://10.xx.xx.xx/Scripts/Core.aspx.vb/GetData",
contentType: "application/json; charset=utf-8",
dataType: "json",
data: '{"selCourse":"'+crsName+'"}',
success: function(result) {
ProcessServerLsnList(result.d);
},
error: function (xhr, status, error) {
AjaxErrorAlert(error);
}
});
As i'm forced to code this from Dreamweaver as a run time compiled codebehind.(Don't ask...) Is there something simple i'm missing that i should check, be it in the asp or iis config on the server or the web.config.
default.aspx Header
<%@ Page Language="vb" AutoEventWireup="true" Src="Scripts/Core.aspx.vb" Inherits="CoreFunctionality"%>
<!DOCTYPE>
<html>
<head runat="server">
Core.aspx.vb
Imports System.IO
Imports System.Web.Services.WebService
public partial Class CoreFunctionality
Inherits System.Web.UI.Page
Public Function GetData(ByVal strData As String) As String
return String.Format("It's blank Jim.", strData )
End Function
End Class
background Info on what i need to implement: User clicks on an item it performs multiple javascript actions then without refreshing, the page retrieves data from the server and performs several more javascript actions, before reacting to the users request.