Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Return Not Found From Controller

$
0
0

Hi,
in startup.cs i use this code to manage errors (404 , 500 , ...)
and its worked correctly when i search a action thats not found and go to error action .

  app.UseStatusCodePagesWithReExecute("/"+CultureInfo.CurrentCulture.Name+"/errors/{0}");




but in controller when a id is not exsist i use this code

return NotFound();

but its not work i want when i use NotFound its return to error action 


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>