© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
9 replies
hutonahill

Temporary Pause

I am using .NET 8

I've got an ASP.NET API that i would like to pause. The goal of this is to prevent any endpoints from being called for a short amount of time. I could do this procedurally with a constant variable that's checked, but I would rather not send nothing.

Is there some kind of HTML code i could return that would indicate that the API is offline but like on purpose? Instead of just returning nothing.

I also need a way to return this response to the user when they try to access the API while its paused. Is there a way for be to disable all the endpoints and run a default endpoint?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,828Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ C# pause an event
C#CC# / help
3y ago
❔ why this code works temporary?
C#CC# / help
3y ago
❔ How to pause BlockingCollection consumption?
C#CC# / help
4y ago
Creating new/rewriting temporary files in loops
C#CC# / help
3mo ago