13 | Request ID: @Model.RequestId
14 |
19 | Swapping to the Development environment displays detailed information about the error that occurred. 20 |
21 |22 | The Development environment shouldn't be enabled for deployed applications. 23 | It can result in displaying sensitive information from exceptions to end users. 24 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 25 | and restarting the app. 26 |
27 | -------------------------------------------------------------------------------- /SKVersion2/MCP/Azure/MCPServer.Azure/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using Microsoft.AspNetCore.Mvc.RazorPages; 3 | using System.Diagnostics; 4 | 5 | namespace MCPServer.Azure.Pages 6 | { 7 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 8 | [IgnoreAntiforgeryToken] 9 | public class ErrorModel : PageModel 10 | { 11 | public string? RequestId { get; set; } 12 | 13 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 14 | 15 | private readonly ILoggerLearn about building Web apps with ASP.NET Core.
10 |Use this page to detail your site's privacy policy.
9 | -------------------------------------------------------------------------------- /SKVersion2/MCP/Azure/MCPServer.Azure/Pages/Privacy.cshtml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using Microsoft.AspNetCore.Mvc.RazorPages; 3 | 4 | namespace MCPServer.Azure.Pages 5 | { 6 | public class PrivacyModel : PageModel 7 | { 8 | private readonly ILogger