If you're getting a stock 500 error when attempting to run a legacy .NET application on a Windows Server 2012 instance on IIS 8.5, make sure your application pool ID is set up properly.
On IIS 8.5, the Application Pool Id is normally set to ApplicationPoolIdentity instead of NetworkService - here is how to change it:
Also, make sure that your Application Pool is referencing the .NET 2 framework and not the .NET 4 framework.
When you're a freelance web developer, it can sometimes be tempting to go full-on with a client and give them a detailed plan of their project with your costs - then not charge them anything for your efforts.
Here's why I think this is a bad idea and what I think you should do to protect your time investment in thinking through someones business idea - before you hand over your knowledge.
Pretty simple really - you're not calling the correct method to render your partial views.
You need to use:
@await Html.PartialAsync("MyPartial", Model);
When scaffolding Controllers and Views (for say, a simple CMS Admin functionality for a given Object), you may find that your Select dropdowns are not populated with any SelectListItems (in the form of <option> tags).
This is because there is a bug in the Visual Studio 2015 scaffolder which, while correctly implemented in the Create view, is not in the Edit view.
You will end up with:
<select asp-for="PropertyId" asp-items="ViewBag.MyItems" />
But what you need is:
<select asp-for="PropertyId" asp-items="ViewBag.MyItems"></select>
Easy to miss.