No service for type ‘Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionaryFactory’ has been registered

Solution: Use AddMvc() instead of AddMvcCore() in Startup.cs and it will work.

Please see this issue for further information about why:

For most users there will be no change, and you should continue to use
AddMvc() and UseMvc(…) in your startup code.

For the truly brave, there’s now a configuration experience where you
can start with a minimal MVC pipeline and add features to get a
customized framework.

https://github.com/aspnet/Mvc/issues/2872

You might also have to add a reference
toMicrosoft.AspNetCore.Mvc.ViewFeature in project.json

https://www.nuget.org/packages/Microsoft.AspNetCore.Mvc.ViewFeatures/

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)