I am calling WebMethod
using angularjs
call. I got response when WebMethod
inside .aspx.cs but not getting response if WebMethod
inside class file(class1.cs).
Call return 403 Forbidden error.
Class file::
using System.Web.Services;
using System.IO;
public class done
{
[WebMethod]
public static string test()
{
string x = File.ReadAllText(@"C:/Users/Admin/Desktop/live.json");
return x;
}
}
How to get response when WebMethod inside class file.