ASP.NET 6 Gotchas…

  1. entity framework migrations only work with classname plis a suffix of id as table id, otherwise, an error… (BY DEFAULT…)
  2. do not mix services.AddTransient<AccountService>(); instances with services.AddSingleton<IAccountRepository, AccountRepository>(); services for dependence injection.they result to some funny exception without proper details
  3. package management is easier but with wierd errors upon upgrade or adding a new package, like:

  1. there is no bearer tokens, but i suppose they are working on that. you only got Cookies…
  2. wwwroot is not a normal folder, so you cant include it i your scripts or styles reference
  3. how to configure mvc default routing

you have to do the following…


name: “default”,

template: “{index?}”,

defaults: new { controller = “Home”, action = “Index” }


and use the following controller

public class HomeController : Controller


public IActionResult Index()


return View();




public IActionResult About()


ViewData[“Message”] = “Your application description page.”;

return View();




public IActionResult Contact()


ViewData[“Message”] = “Your contact page.”;

return View();




this will serve the following urls:





also, the above will handle unavailable routes without the cost of redirecting, eg, http://localhost:3453/404 will show the page in http://localhost:3453/ given the route http://localhost:3453/404 isnt specified.

  1. Ajax and cookies are not good friends…

About Kabue Charles

As a software architect, I am specialized in .NET and JavaScript. As an entrepreneur, I invest my time, money, energy and will in creating things that will make lives better. As a philosopher, I learn about happiness, people and my environment. As a poet, I write about human transcendence. As a man, I am modest moralist, a centrist and a man of quotable quotes

Posted on December 1, 2015, in ASP.NET 6, Learning and tagged . Bookmark the permalink. Leave a comment.

Say Something....

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: