+ There are no external authentication services configured. See this article + about setting up this ASP.NET application to support logging in via external services. +
+
+ 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/aspnetcore/security/authentication/add-user-data/samples/9.x/SampleApp/Pages/Error.cshtml.cs b/aspnetcore/security/authentication/add-user-data/samples/9.x/SampleApp/Pages/Error.cshtml.cs new file mode 100644 index 000000000000..a87c44aa6250 --- /dev/null +++ b/aspnetcore/security/authentication/add-user-data/samples/9.x/SampleApp/Pages/Error.cshtml.cs @@ -0,0 +1,27 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; +using System.Diagnostics; + +namespace WebApp1.Pages +{ + [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] + [IgnoreAntiforgeryToken] + 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.
+Use this page to detail your site's privacy policy.
diff --git a/aspnetcore/security/authentication/add-user-data/samples/9.x/SampleApp/Pages/Privacy.cshtml.cs b/aspnetcore/security/authentication/add-user-data/samples/9.x/SampleApp/Pages/Privacy.cshtml.cs new file mode 100644 index 000000000000..fdc8882f4741 --- /dev/null +++ b/aspnetcore/security/authentication/add-user-data/samples/9.x/SampleApp/Pages/Privacy.cshtml.cs @@ -0,0 +1,19 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace WebApp1.Pages +{ + public class PrivacyModel : PageModel + { + private readonly ILogger