I've sitefinity hosted in asphostportal.com. then I am trying to call via ajax a WebMethod hosted in a traditional ASP.Net
WebForm code-behind page. Here is the code for the WebMethod:
public static object States()
StateProvince states = new StateProvince ;
ApplicationServiceClient proxy = null;
proxy = new ApplicationServiceClient();
states = proxy.GetStateProvinces();
The WebMethod works just fine in my stand-alone development
environment or if deployed normally to IIS, but when I deploy the aspx
page to Sitefinity, I get the following exception when it's called:
Server Error in '/' Application.
Unknown web method States.aspx.
Parameter name: methodName
I'm not sure if Sitefinity is hijacking the URL and post-pending the ".aspx" or what is going on here.
Here is the jquery call that is calling the web method:
contentType: "application/json; charset=utf-8",
// implementation omitted
error: function(xhr, msg)
I can replicate the problem by posting the request manually using Fiddler.
Again, this works just fine everywhere except when deployed to Sitefinity. Anybody have any thoughts?