Implied route parameters in ASP.NET Core Form Tag Halpers

With a route like /change/{id} the ID parameter is implicitly implied if the view contains a form with method="post" back to the same action name, for example:

View:

<asp-form asp-action="change" method="post">

Controller:

[HttpPost]
public ActionResult Change(int id, Model model)

When changing the form action to to include a change confirmation step:

<asp-form asp-action="confirmChange" method="post">

The id route parameter was not included by default anymore, so the controller action was receiving a default(int):

[HttpPost]
public ActionResult ConfirmChange(int id, Model model)

ASP.NET Core seems to include the current route parameters when posting back to the same action name.

The fix was fairly simple, you must explicitly include the route parameters on the <asp-form> tag when posting across action names.

<asp-form asp-action="change" asp-route-id="@Model.SomeId" method="post">

See also: Stack Overflow on updating route parameters.

Errors installing SSH Server on domain joined Windows 10 laptop using WSUS

While attempting to setup SSH access to a Windows 10 machine, following this guide: https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse, I kept running into a generic Windows install failed error. It became apparent that the issue was because the system was failing to download the optional windows feature.

Turns out that for some reason the WSUS server that the machine was connected to didn't have that optional feature, so a local gpedit was necessary to configure the machine to directly download optional features from Windows Update.

windows-gpedit-change

After checking the box here, it was as simple as re-running the install from the Settings app.

Going without a Framework or a Theme

One of my side projects is https://time2temp.com -- a simple site for checking bbq times and temperatures. When I originally put the site up, I grabbed an html5up theme, slapped some inline Vue templates, and a bit of javascript to load it up.

It worked, but it was HEAVY: 20 network requests over 500kb!

20 requests at 500kb+

To serve a single "page" that essentially has a list, that was wildly overkill. How can I make that more simple and more fast?

Drop the framework, and more importantly, drop the bloated CSS theme that included tons of features not used in my simple one page site.

11 requests at 300kb

Finally, trimming down the bloated theme and pulling out only the few parts I was actually using resulted in a much slimmer, and by extension faster site that is cheaper to operate:

5 requests at less than 20kb

I also converted the logo from a fancy css based thing to a purely static png one, that is only 6kb. That was a huge savings in terms of data transfer.