Deploy .NET to Windows

From MgmtWiki
Jump to: navigation, search

Full Title

Deploying a ASP.NET core to a Windows computer. Mostly concerned with Windows 10.

Context

  • This only applies to .NET core as the .NET framework brings with it a huge array of dependencies that we are trying to get rid of.

Goals

  • Bring up a secure web site deployment with a minimum of fuss.
  • While a straight desk-top solution is possible, there is a challenge with loop back that makes consideration of local web site attractive.
  • At first the challenge is getting the Web Site working well.
  • The assumption here is that the design is not fully fleshed out as the User Experience needs to be functional before it can be fully evaluated.
  • Later the problem is to get the performance to be good while the deployment expands to multiple instances.

Problems

  • The largest part of the problem is not getting the web site to run, but rather to ensure that it is secure using SSL certificates and HTTPS.

Solutions

First create a solution in ASP.NET 3.1 or later. Try not to overload the solution with extraneous dependencies.

ASP.NET solutions

  1. in Visual Studio
    1. right click on the project
    2. click publish
    3. click folder and then NEXT
    4. enter the Folder Location (or accept the one offered) - click Finish
    5. If you like the options - Click Publish (the result will be in the "Target Location"
    6. Go to that location and run the .exe, the display window will tell you where to point your browser to see the UX.
  2. Simple build the project w/I Visual Studio. or ms build
    1. Go to the project folder to bin/Release (or debug if you prefer)
    2. Build

XAML deployments

Either Xamarin in .Net 4 and earlier or Maui in .NET6.

================ Certificate 0 ================
Serial Number: 8f68e93d4e66871c887b0746e69f68bb
Issuer: CN=Network Solutions DV Server CA 2, O=Network Solutions L.L.C., L=Herndon, S=VA, C=US
 NotBefore: 9/26/2018 12:00 AM
 NotAfter: 9/17/2019 11:59 PM
Subject: CN=trustregistry.us, OU=nsProtect Secure Xpress, OU=Domain Control Validated
Non-root Certificate
Cert Hash(sha1): ef96a6edfe748ada67cefeee6cf49de46707eef4
  Key Container = {7E9AF5F5-A40F-42C7-A5D0-ED58AB3A1F0B}
  Unique container name: bdbc4122a6c91f3c7d76e0f0a30150a2_c99fc568-d037-4591-84ac-a83617d2c480
  Provider = Microsoft Software Key Storage Provider
Private key is NOT exportable
Encryption test passed
CertUtil: -repairstore command completed successfully.
PS Cert:\LocalMachine\my>

References