I know this is a common issue, but I have tried so many things and I just cannot figure this out. I am generating two links:
http://localhost:1757/ViewReport/DeleteFileFromServer?id=orderedList2.png&reportid=3f66320f-a092-4c5e-8321-3a0b6def68c2
http://localhost:1757/ViewReport/Downloading?id=orderedList7.png&reportid=3f66320f-a092-4c5e-8321-3a0b6def68c2
And am attempting to trigger the underlying controller from these 2 urls. My routeconfig has one entry in it, which is the default one:
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional}
);
And my two controller functions are:
[HttpGet]
public void Downloading(string id,string reportid){//code}
[HttpGet]
private void DeleteFileFromServer(string id, string reportid){//code}
Downloading gets called when using its url, but DeleteFileFromServer NEVER gets called, even though they have almost an identical url except for the controller name. There is NO special entry in route config, so I cannot figure this out. Any ideas? Thank you.