Well im trying a simple
i have a simple web service like page containing
public partial class WebApi : System.Web.UI.Page
{
[WebMethod]
public static GetImageResult GetRandomImage()
...
i have added the following to "Global.asax.cs" (Application_BeginRequest)
string absolutePath = Request.Url.AbsolutePath.Substring(1);
if (absolutePath.StartsWith("WebApi/", StringComparison.OrdinalIgnoreCase))
{
Context.RewritePath("/WebApi.aspx/" + absolutePath.Substring(7));
}
but asp.net seems to have a problem with this the function is never called and javascript just reports "Method Not Allowed".
Is there some thing more i have to do to make this work?