I have API on IIS and which are consume by other mobile apps the API are hosting on IIS I want the API to not be accessible after sometime like can be accessible from 8-07 pm how to do it
Loading
I have API on IIS and which are consume by other mobile apps the API are hosting on IIS I want the API to not be accessible after sometime like can be accessible from 8-07 pm how to do it
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Pasang TamangRank #449 · 5.6K reputationPosted Mar 1, 2023, 12:48 AM EST
Hi,
I think rate limiting is what you need to implement. Please go through below article to understand detail about rate limiting
https://www.c-sharpcorner.com/article/implement-rate-limiting-in-asp-net-core-web-api/
Regards,
Pasang
Jignesh KumarRank #91 · 22.9K reputationPosted Mar 1, 2023, 1:41 AM EST
Hi Mark Tabor,
As pasang said you can implement rate limiting feature to restrict request during specific time
or
you can set down time for api using scheduler to start/stop at specific time
or
Create powershell script to achieve this.
Mark TaborRank #914 · 2.3K reputationPosted Mar 5, 2023, 1:50 AM EST
Pasang Tamang & Jignesh Kumar thanks for the reply Rate limiting is something else like number of request send to the API , What I need is to stop the IIS on specfic time and start on specific time on daily bases , i have set the scheduler but it won't work.
Jignesh KumarRank #91 · 22.9K reputationPosted Mar 5, 2023, 8:16 AM EST
HEllo MArk Tabor,
Could you please share your scheduler details it may help to identify issue?
Mark TaborRank #914 · 2.3K reputationPosted Mar 12, 2023, 2:49 PM EDT
Jignesh yu can see this below image it did not start my iis
Mark TaborRank #914 · 2.3K reputationPosted Mar 31, 2023, 2:19 PM EDT
Thanks Tuhin there is not any time tab i am following the steps you mentioned
Tuhin PaulRank #7 · 71.9K reputationPosted Feb 28, 2023, 10:23 PM EST
Hi Mark,
One way to restrict access to an API on IIS based on a specific time period is to use the "IP and Domain Restrictions" feature in IIS. Here are the steps to set up time-based access restrictions:
By setting the start and end times for a specific rule, you can control when the API can be accessed by mobile apps. If you want to apply these time-based restrictions to multiple APIs, you can use the "Configuration Editor" in IIS to apply these settings at the server level. This will allow you to manage time-based restrictions across multiple sites and applications in IIS.