R
R
Roman Koff2021-07-12 00:12:33
ASP.NET
Roman Koff, 2021-07-12 00:12:33

How to get page generation time in ASP.NET CORE?

In ASP.NET MVC it ​​was possible to get the page generation time using HttpContext.Timestamp
How can I get this data in ASP.NET CORE?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2021-07-12
@vabka

1. HttpContext.Timestamp does not return the page generation time, but the moment in time when the request processing began.
2. To get the time when the request processing started in ASP NET Core, you can create your own Middleware that will remember this time.
3. Perhaps you already remember this time somewhere, you can see the Items collection in the same HttpContext
PS: what is it for?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question