In here i call webmethod from Jquery Ajax.In the success function i saw there's a error called "Authentication Failed"
My WebMethod
[WebMethod,ScriptMethod] public static List
GetAllUploadedFiles() { List UploadedFilesDetails = new List(); try { SqlCommand comGetAllFiles = new SqlCommand("SP_GetAllUploadedFiles", conDB); comGetAllFiles.CommandType = CommandType.StoredProcedure; if (conDB.State == ConnectionState.Closed) conDB.Open(); SqlDataReader rdr = comGetAllFiles.ExecuteReader(); DataTable dt = new DataTable(); dt.Load(rdr); foreach (DataRow r in dt.Rows) { UploadedFilesDetails.Add(new UploadedFiles { Id = (int)r["Id"], UserId =(Guid)r["UserId"], FilePath = r["FilePath"].ToString(), Date =(DateTime) r["Date"] }); } } catch(Exception ee) { } finally { conDB.Close(); } return UploadedFilesDetails; }
My Ajax Function
In my Web.Config file
Sanwar RanwaPosted Feb 18, 2019, 3:14 AM
Sagar Pandurang KapPosted Feb 13, 2019, 1:13 AM
In your App_Start folder, within your RouteConfig....
Comment out the following line or change its RedirectMode: