- Request ID: @Model.RequestId
-
- Swapping to the Development environment displays detailed information about the error that occurred. -
-- The Development environment shouldn't be enabled for deployed applications. - It can result in displaying sensitive information from exceptions to end users. - For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development - and restarting the app. -
+@page +@model ErrorModel +@{ + ViewData["Title"] = "Error"; +} + +
+ Request ID: @Model.RequestId
+
+ Swapping to the Development environment displays detailed information about the error that occurred. +
++ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +
diff --git a/Source/Examples/AspNetCore31/Pages/Error.cshtml.cs b/sample/AspNetCore31/Pages/Error.cshtml.cs similarity index 96% rename from Source/Examples/AspNetCore31/Pages/Error.cshtml.cs rename to sample/AspNetCore31/Pages/Error.cshtml.cs index 0ef17fe..c1776a4 100644 --- a/Source/Examples/AspNetCore31/Pages/Error.cshtml.cs +++ b/sample/AspNetCore31/Pages/Error.cshtml.cs @@ -1,31 +1,31 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.RazorPages; -using Microsoft.Extensions.Logging; - -namespace AspNetCore31.Pages -{ - [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] - public class ErrorModel : PageModel - { - public string RequestId { get; set; } - - public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); - - private readonly ILoggerLearn about building Web apps with ASP.NET Core.
-Learn about building Web apps with ASP.NET Core.
+Use this page to detail your site's privacy policy.
+@page +@model PrivacyModel +@{ + ViewData["Title"] = "Privacy Policy"; +} +Use this page to detail your site's privacy policy.
diff --git a/Source/Examples/AspNetCore31/Pages/Privacy.cshtml.cs b/sample/AspNetCore31/Pages/Privacy.cshtml.cs similarity index 95% rename from Source/Examples/AspNetCore31/Pages/Privacy.cshtml.cs rename to sample/AspNetCore31/Pages/Privacy.cshtml.cs index a330188..d0b7a34 100644 --- a/Source/Examples/AspNetCore31/Pages/Privacy.cshtml.cs +++ b/sample/AspNetCore31/Pages/Privacy.cshtml.cs @@ -1,24 +1,24 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.RazorPages; -using Microsoft.Extensions.Logging; - -namespace AspNetCore31.Pages -{ - public class PrivacyModel : PageModel - { - private readonly ILogger