On my website, I had an old angular directive thats not in use anymore but a lot of search engine providers are trying to hit a particular url on my site:
/Spn/{{adId}}
Here is the ActionMethod:
public ActionResult Spn(int adId)
{
.. my code here
return RedirectToAction("Index");
}
Everytime this happens an errors gets logged to elmah, but this is becoming really annoying to see these errors in Elmah, what is the best way to prevent this error from logging? The error occurs before the code is hit inside the action method.
Here is an error: [ArgumentException: The parameters dictionary contains a null entry for parameter 'adId' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult Spn(Int32)