LaunchCode-Education-Archived / csharp-web-development

Unit 2 (C# Track) of the LC101 Curriculum, following fundamentals in JavaScript
https://education.launchcode.org/csharp-web-development/
GNU General Public License v3.0
5 stars 9 forks source link

Chapter 10 Notes #93

Open scottkuhl opened 4 years ago

scottkuhl commented 4 years ago

The videos and matching repository were created with Visual Studio for Mac. It seems highly likely that most students will be using Windows. Should these videos be changed to the Windows version?

On Windows the default debugging experience is going to be IIS Express and not Kestrel. So, the localhost:5000 and localhost:5001 are not going to be correct. It's going to be a bizarre random port instead. If you look in the launchSettings.json file you will see what I mean.

{
  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:61846",
      "sslPort": 44312
    }
  },
  "profiles": {
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "environmentVariables": {
        "DOTNET_ENVIRONMENT": "Development"
      }
    },
    "CleanArchitecture.WebUI": {
      "commandName": "Project",
      "launchBrowser": true,
      "applicationUrl": "https://localhost:5001;http://localhost:5000",
      "environmentVariables": {
        "DOTNET_ENVIRONMENT": "Development"
      }
    }
  }
}

This is one of the big differences between Mac and Windows. The Windows users can run the Kestrel version, but they need to change this from IIS Express to the Project Name.

image

The links to Microsoft documentation have version 3.1 of ASP.NET Core in the query string. I don't know if this was intentional. (I found a similar link in Chapter 13, I'll assume this is a documentation wide issue.)