Files
eShopOnWeb/src/WebRazorPages/Pages/Error.cshtml.cs
Steve Smith 6c41a1bab9 Upgrade to 2.2 (#171)
* Initial Web2 project working

* Initial WebRazorPages project working

* Adding additional sln files

* Removing old project

* Fixed integration tests

* Getting FunctionalTests working.

* Got Swagger working in Web

* Moved web2 to web
2018-12-28 10:04:35 -08:00

20 lines
540 B
C#

using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using System.Diagnostics;
namespace Microsoft.eShopWeb.RazorPages.Pages
{
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public class ErrorModel : PageModel
{
public string RequestId { get; set; }
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
public void OnGet()
{
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
}
}
}