Using ASP.NET Core controllers, you can add e.g. the attribute [Authorize] to methods or whole classes to prevent unauthorized access.

The following example extends this functionality by allowing access if the client user resides in the local network.

 

 

Reference

  [email protected]