Relative Content

Tag Archive for asp.net-core.net-core

.NET Core removes headers in Exception handler

I have tried to add couple of headers in a response when I got an exception, but as I understood, Kestrel removes all headers if you add them if add them in IExceptionHandler‘s implementation.

Is controller suffix is mandatory in .NET Core (.NET 6)

public class Home : controller { public IActionResult Index() { return view(); } } I created above class without controller suffix. And below is my routing in startup.cs class .NET 6: app.UseEndpoints(endpoints => { endpoints.MapControllerRoute( name: “default”, pattern: “{controller=Home}/{action=Index}/{id?}” ); }); I just wanted to confirm whether appending “Controller” as a suffix is simply a […]