using System.Web.Script.Services;
using System.Web.Services;

[ScriptService]
public class ErrorDataService : WebService
{
    [WebMethod()]
    public bool PublishError(string stackTrace, string message, string url, int? lineNumber)
    {
      // do whatever you want at this point. Log it, create an exception, etc.
      return true;
    }
}
