diff --git a/aspnetcore/test/localhost-tld.md b/aspnetcore/test/localhost-tld.md index fa59e6f797eb..7b01857b3ba5 100644 --- a/aspnetcore/test/localhost-tld.md +++ b/aspnetcore/test/localhost-tld.md @@ -4,7 +4,7 @@ description: Learn how using localhost as top-level domain can make testing easi monikerRange: '>= aspnetcore-10.0' ms.author: tdykstra ms.custom: -ms.date: 08/26/2025 +ms.date: 11/19/2025 title: Support for the .localhost top-level domain uid: test/localhost-tld --- @@ -23,7 +23,9 @@ ASP.NET Core's built-in HTTP server, Kestrel, correctly treats any `*.localhost` ## Browser compatibility -While web browsers automatically resolve `*.localhost` names to the local loopback address, other apps might treat `*.localhost` names as regular domain names and attempt to resolve them via their corresponding DNS stack. If your DNS configuration doesn't resolve `*.localhost` names to an address, they fail to connect. You can continue to use the regular `localhost` name to address your apps when not in a web browser. +While most modern evergreen browsers automatically resolve `*.localhost` names to the local loopback address, Safari on macOS doesn't support this feature. In Safari, you should use the regular `localhost` name instead of `*.localhost` domain names. + +Some client apps other than Safari and evergreen web browsers treat `*.localhost` names as regular domain names and attempt to resolve them via their corresponding DNS stack. If your DNS configuration doesn't resolve `*.localhost` names to an address, they fail to connect. You can continue to use the regular `localhost` name to address your apps when not in a web browser. ## HTTPS development certificate diff --git a/aspnetcore/tutorials/first-mvc-app/controller-methods-views.md b/aspnetcore/tutorials/first-mvc-app/controller-methods-views.md index 2641de413811..e82da5f254cf 100644 --- a/aspnetcore/tutorials/first-mvc-app/controller-methods-views.md +++ b/aspnetcore/tutorials/first-mvc-app/controller-methods-views.md @@ -18,7 +18,7 @@ By [Rick Anderson](https://twitter.com/RickAndMSFT) We have a good start to the movie app, but the presentation isn't ideal, for example, **ReleaseDate** should be two words. -![Index view: Release Date is one word (no space) and every movie release date shows a time of 12 AM](~/tutorials/first-mvc-app/working-with-sql/_static/9/m90.png) +![Index view: Release Date is one word (no space) and every movie release date shows a time of 12 AM](~/tutorials/first-mvc-app/working-with-sql/_static/9/m90_not_formatted.png) Open the `Models/Movie.cs` file and add the highlighted lines shown below: @@ -26,6 +26,10 @@ Open the `Models/Movie.cs` file and add the highlighted lines shown below: `DataAnnotations` are explained in the next tutorial. The [Display](xref:System.ComponentModel.DataAnnotations.DisplayAttribute) attribute specifies what to display for the name of a field (in this case "Release Date" instead of "ReleaseDate"). The [DataType](xref:System.ComponentModel.DataAnnotations.DataTypeAttribute) attribute specifies the type of the data (Date), so the time information stored in the field isn't displayed. +Using the data annotations above, run the application and refresh the `/Movies` page. Because the view markup uses the `@Html.DisplayNameFor` and `@Html.DisplayFor` methods to render the property name and value, the updated `Index` view shows all the fields properly formatted. For example, **Release Date** is now two words and the time information is no longer shown. + +![Index view: Release Date is two words and every movie release date is shown without the time](~/tutorials/first-mvc-app/working-with-sql/_static/9/m90_formatted.png) + The `[Column(TypeName = "decimal(18, 2)")]` data annotation is required so Entity Framework Core can correctly map `Price` to currency in the database. For more information, see [Data Types](/ef/core/modeling/relational/data-types). Browse to the `Movies` controller and hold the mouse pointer over an **Edit** link to see the target URL. diff --git a/aspnetcore/tutorials/first-mvc-app/working-with-sql.md b/aspnetcore/tutorials/first-mvc-app/working-with-sql.md index 5258dabc25c3..071003e527d8 100644 --- a/aspnetcore/tutorials/first-mvc-app/working-with-sql.md +++ b/aspnetcore/tutorials/first-mvc-app/working-with-sql.md @@ -120,7 +120,7 @@ Test the app. Stop it and restart it so the `SeedData.Initialize` method runs an The app shows the seeded data. -![MVC Movie app open in Microsoft Edge showing movie data](~/tutorials/first-mvc-app/working-with-sql/_static/9/m90.png) +![MVC Movie app open in Microsoft Edge showing movie data](~/tutorials/first-mvc-app/working-with-sql/_static/9/m90_not_formatted.png) > [!div class="step-by-step"] > [Previous: Adding a model](~/tutorials/first-mvc-app/adding-model.md) diff --git a/aspnetcore/tutorials/first-mvc-app/working-with-sql/_static/9/m90.png b/aspnetcore/tutorials/first-mvc-app/working-with-sql/_static/9/m90.png index fecb8f044b3a..d9dd848e8679 100644 Binary files a/aspnetcore/tutorials/first-mvc-app/working-with-sql/_static/9/m90.png and b/aspnetcore/tutorials/first-mvc-app/working-with-sql/_static/9/m90.png differ diff --git a/aspnetcore/tutorials/first-mvc-app/working-with-sql/_static/9/m90_formatted.png b/aspnetcore/tutorials/first-mvc-app/working-with-sql/_static/9/m90_formatted.png new file mode 100644 index 000000000000..537b30107ae6 Binary files /dev/null and b/aspnetcore/tutorials/first-mvc-app/working-with-sql/_static/9/m90_formatted.png differ diff --git a/aspnetcore/tutorials/first-mvc-app/working-with-sql/_static/9/m90_not_formatted.png b/aspnetcore/tutorials/first-mvc-app/working-with-sql/_static/9/m90_not_formatted.png new file mode 100644 index 000000000000..36bdd1253cd3 Binary files /dev/null and b/aspnetcore/tutorials/first-mvc-app/working-with-sql/_static/9/m90_not_formatted.png differ