From 7ff227b37fcc74599bff43c67a5a273e65dda30e Mon Sep 17 00:00:00 2001 From: Ingo Date: Tue, 28 May 2024 09:03:16 +0200 Subject: [PATCH] remvoe --- YAF.SampleApp/Pages/Error.cshtml | 26 --------------- YAF.SampleApp/Pages/Error.cshtml.cs | 50 ----------------------------- 2 files changed, 76 deletions(-) delete mode 100644 YAF.SampleApp/Pages/Error.cshtml delete mode 100644 YAF.SampleApp/Pages/Error.cshtml.cs diff --git a/YAF.SampleApp/Pages/Error.cshtml b/YAF.SampleApp/Pages/Error.cshtml deleted file mode 100644 index 6f92b956..00000000 --- a/YAF.SampleApp/Pages/Error.cshtml +++ /dev/null @@ -1,26 +0,0 @@ -@page -@model ErrorModel -@{ - ViewData["Title"] = "Error"; -} - -

Error.

-

An error occurred while processing your request.

- -@if (Model.ShowRequestId) -{ -

- Request ID: @Model.RequestId -

-} - -

Development Mode

-

- 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/YAF.SampleApp/Pages/Error.cshtml.cs b/YAF.SampleApp/Pages/Error.cshtml.cs deleted file mode 100644 index 3b3c3444..00000000 --- a/YAF.SampleApp/Pages/Error.cshtml.cs +++ /dev/null @@ -1,50 +0,0 @@ -/* Yet Another Forum.NET - * Copyright (C) 2003-2005 Bjørnar Henden - * Copyright (C) 2006-2013 Jaben Cargman - * Copyright (C) 2014-2024 Ingo Herbote - * https://www.yetanotherforum.net/ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - - * https://www.apache.org/licenses/LICENSE-2.0 - - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#nullable enable -using Microsoft.AspNetCore.Mvc.RazorPages; - -using System.Diagnostics; - -using Microsoft.AspNetCore.Mvc; - -namespace YAF.SampleApp.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); - - public ErrorModel(ILogger logger) - { - } - - public void OnGet() - { - RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; - } -} \ No newline at end of file