After long fight to publish my asp.net core app to webserver I finally did it and now everything working beside index method from admin controller which is specified as default.
public IActionResult Index(int page = 1)
{
ViewBag.Title = "Admin Panel";
var model = new AdminViewModel()
{
Paging = new PaginationSettings()
{
ItemsPerPage = 4,
CurrentPage = page,
ShowFirstLast = true,
TotalItems = _newsData.GetAll().Count()
},
Category = _newsData.GetAllCats()
};
model.Newses = _newsData.Pagination(page);
return View(model);
}
Browser only throwing 500 error and saying that the website is not working. If anybody know what to do pleas reply. //Edit: This is error from logfile:
warn: Microsoft.Extensions.DependencyInjection.DataProtectionServices[59] Neither user profile nor HKLM registry available. Using an ephemeral key repository. Protected data will be unavailable when application exits. warn: Microsoft.AspNetCore.DataProtection.Repositories.EphemeralXmlRepository[50] Using an in-memory repository. Keys will not be persisted to storage.