Common Errors - PuzzleServer/mainpuzzleserver GitHub Wiki
500 error when running the project:
On the toolbar, change "IIS Express" to ServerCore". Once you succeed you can switch back to "IIS Express", which is generally faster.
"'CreateModel' does not contain a definition for X" error when loading a page that was created with scaffolding (basically the template is wrong):
https://stackoverflow.com/questions/46349821/asp-net-core-and-scaffold
Generic project splitting issues
There are a few issues inherent in having a website split across multiple projects. While this is work it to minimize duplicated effort (e.g. there's no need to build multiple author pages but different events need to be able to change their layout at the same time), it does mean that some of the automatic features aren't available for our solution (automatic address generation in particular). https://www.blinkingcaret.com/2016/03/16/split-your-web-application-into-smaller-web-applications/
Database elements showing up as null when they shouldn't be
If you are trying to access the database, and your cs code is not loading foreign key relations, you might need a .Include() in addition to you where. Example:
Feedbacks = _context.Feedback.Where((f) => f.Puzzle.ID == id).ToList(); Debug.WriteLine(Feedbacks[0].Submitter.Name); // This will print an empty string, even if the piece of feedback has a submitter.
My understanding is that this is because we lazy-load secondary tables in relations. Something like this is required to actually get the PuzzleUser info.
Feedbacks = _context.Feedback.Where((f) => f.Puzzle.ID == id).Include("Submitter").ToList(); Debug.WriteLine(Feedbacks[0].Submitter.Name); // This will properly display the name of the user